[osg-users] Visualizing a light cone in scene

Suraj Paul suraj at isac.gov.in
Tue Jan 10 02:44:28 PST 2017


Hi all,

I am trying to visualize in openscenegraph a scene where there is a moving aircraft and a 'searchlight' attached to it. 

I am given the orientation of searchlight w.r.t aircraft in terms of angle between the vertical axes of searchlight beam and that of aircraft. Also the positions of aircraft is given along its trajectory.

I need to show the cone of light in the scene and part of terrain lit so far by the given searchlight while the aircraft is in motion.

Please see the attachment 1.

My approach:

I determined the point vertically below the moving aircraft by doing terrain intersection and use this point (shown in green in attachments )as the center of cone. Then i render the cone using its height as distance between the green dot and the location of aircraft. 

This method gives me a cone that is tilted and its tip doesnt touch the aricraft. This happens coz this approach doesnt provide me means of specifying the coordinates of the tip of the cone, and so, the cone rendered is tilted one as shown in attachment 2 in red. 

Is there any better method of doing this? Perhaps rendering the cone of a spotlight kind of thing? Please help. 

Also, if the canting angle between the searchlight and aircraft is changed the light cone generated in reality will not  be always right circular (i.e. the cone height need not be perpendicular to cone base). 
How to handle such scenarios? I feel rendering a spotlight beam could take care of this issue.

Any suggestions or guidance about how to go ahead?


... 

Thank you!

Cheers,
Suraj

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69944#69944




Attachments: 
http://forum.openscenegraph.org//files/tilted_cone_995.jpg
http://forum.openscenegraph.org//files/conical_scanners_114.jpg





More information about the osg-users mailing list