Hi Robert,

I have simulated a ray (line segment) which has a given position and 
orientation in the scene. Then I compute the distance between the start point 
of the ray and the first object which is intersected by this ray. This distance 
value is then a gain in a function. 

Now I would meassure the distances of up to 4000 rays. The start points of 
these rays are concentrated in one point and divergent like the rays of a 
pinhole camera. I need the distances use it as gains in a function that is 
computed every frame step in the same code.

If you have any questions, please let me know.

Regards, Roland

  





-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Robert Osfield
Gesendet: Montag, 6. Oktober 2008 18:08
An: OpenSceneGraph Users
Betreff: Re: [osg-users] Linesegment, shader

Hi Roland,

You'll need to be a be more specific about the nature of your problem,
as this make a huge difference about what solutions you could possibly
pursue.  For instance if you don't need any results on the CPU and you
want the results to be screen space then using shaders is a very good
way tackle the problem, but if you need to results back on the CPU
then using a GPU to do this would only work effectively in cases were
you can wait for a CPU to GPU back to CPU round trip which is very
expensive.

Robert.

On Mon, Oct 6, 2008 at 4:23 PM, Leitner, Roland <[EMAIL PROTECTED]> wrote:
>
> Dear all osg users,
>
> I meassure the distance of a ray (linesegment) from a given point (start
> point of the ray) to the first intersection of this ray with any object
> in the scene. Now I need more than one ray (up to 4000 rays) to simulate
> a sensor. I have read that it could be done with a fragment shader, to
> meassure the distances from any view pose to the object in sight. So,
> maybe you have any ideas to solve this problem.
>
> Best regards,
>
> R. Leitner
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to