Hi Andrey,

Just a thought, but wouldn't this only work for orthographic projections?

I believe the traditional ray tracing approach to this problem is to use an
octree.

Kim.


On 30 November 2011 17:53, Andrey Ibe <xry...@gmail.com> wrote:

> hello good people!
>
> i need a bit of advice ragarding some more advanced rendering techniques.
> advanced for me, anyway.
>
> i am trying to build a simple ray tracing application on top of the basic
> osgviewer program.
>
> to start off, i am trying to "look" at the loaded model and decide where
> to cast rays, e.g. i don't want to cast any rays where the model would be
> missed. i was thinking of using the stencil buffer and the first thing i
> need is to draw say white pixels where the model is and say black pixels
> where the model is not. then display this buffer as the frame buffer, you
> know what i mean. is this possible? i remember doing something similar with
> GLUT long, long time ago. //if i was able to do this kind of evaluation on
> the per-pixel basis, i think, i could add some more advanced features like
> the color of the first hit object (instead of white) and then maybe
> continue with some real ray tracing, as i mention in the following lines.//
>
> later on, according to where the model would be hit (the white pixels), i
> would cast rays using line intersectors. haven't thought about details here
> yet.
>
> it would be kind of any of you if you could give me some pointers,
> especially for the first part with the buffers that i am currently dealing
> with - is it even possible? is my concept good? - for my knowledge in this
> area has gotten very poor :( and i am also new to the osg.
>
> thank you very much in advance.
>
> Andrey
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=44140#44140
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to