Advertisement

POVRay Laser Beam Help Needed

Started by January 04, 2001 09:20 AM
5 comments, last by Moot 23 years, 10 months ago
I''m currently using POV to render 2D spacecraft for my game. I''m using POV because it''s free and I want to be able to rerender the sprites at various angles. I''m very pleased with the results and now have lots of shiny, metallic spaceships flying around the screen. I now want to add some weapons and want a kind of "glowing energy" look for them, like the laserbeams or proton torpedoes in Star Wars. Does anyone know the best way of achieving this in POV? It''s that fuzzy, anti-aliased ''glow'' around a bright centre that I want. Thanks, Moot
quote: Original post by Moot

I now want to add some weapons and want a kind of "glowing energy" look for them, like the laserbeams or proton torpedoes in Star Wars.

Does anyone know the best way of achieving this in POV? It''s that fuzzy, anti-aliased ''glow'' around a bright centre that I want.


There is a halo keyword that you can use (I don''t remember the syntax, so you''ll have to check the manual) on either a cylinder or sphere to get the effect that you''re looking for. Hope this helps.
Advertisement
Thanks, pwd, I''ll check it out.

Does anyone here use POV? If anyone has a .pov file they can send me or post here showing this kind of effect I''d really appreciate it. I know I''m being lazy, but I''m spending my time coding the game engine at the moment.
quote: Original post by Moot

Thanks, pwd, I''ll check it out.

Does anyone here use POV? If anyone has a .pov file they can send me or post here showing this kind of effect I''d really appreciate it. I know I''m being lazy, but I''m spending my time coding the game engine at the moment.


First, an apology - POVray doesn''t use the halo keyword anymore (It''s been a while since I''ve used it). Version 3.1 and after have an interior{media{...}} modifier instead. Here''s a little code I put together for 3.1:
camera {        location <0,10,-10>        look_at <0,0,0>}union{sphere{        <0,0,0>, 1         /*scale prior to media for a more sparse system*/               hollow        texture        {                pigment {color rgbf 1}        }        interior        {                media                {                        //emission 0.2                        // equivalent to ambient                                                scattering {2, 1/*color*/}                        // the first number is a ''magic'' number, either 2 or 3                        // looks ok, 1 and 5 can also be used                        density                        {                                spherical                                color_map                                {                                        [0.0 rgb <0,0.0,0>]                                        [0.5 rgb <1,0,0>]                                        [0.8 rgb <0,0.8,0>]                                        [1.0 rgb <1,1,1>]                                }                        }                }        }        scale 1  }//include our own light source light_source{        <0, 0, 0>        color rgb<1,0.5,0>        media_attenuation on        fade_distance 1        fade_power 2}        translate <0,0,0>}plane {y, -10 hollow        texture{pigment{color rgb <0.5,0.5,0.5>}}} 


It should come out as a glowing sphere with a bright core (and will also light nearby objects). Scaling the sphere before the interior modifier be a start for an impact graphic, and probably using a cylinder w/a cylindrical spot light could give a laserbeam effect.
That''s exactly the effect I''m looking for. Many thanks, pwd, for taking the time to post that.

Moot
Wow ... they REALLY have changed since I last typed some POV scripts ... nice to see it''s still used.
Especially with the scripting stuff they have added, you can do some pretty clever things no other modeler would allow without extensive work.

youpla :-P
-----------------------------Sancte Isidore ora pro nobis !
Advertisement
No problem. It was kind of fun doing some special fx again

-pwd

This topic is closed to new replies.

Advertisement