Hello Johannes,
Johannes Brunen wrote:
> Hello,
>
> I'm a new user of OpenSG. I'm working in the CAD business and like to do
> some dynamic modifications (highlight, moves,...) on very large models. I
> have read
> the book
> 'Advanced Graphics Programming Using OpenGL' written by T.McReynolds and
> D.Blythe.
>
> They write on this subject:
>
> 'Fast highlighting can be generalized to allow limited manipulation of a
> selected depth-buffered object
> (a foreground object) while avoiding full scene redraws as the object is
> moved. The key idea is that when
> an object is selected the entire scene is drawn without that object, and
> copies of the color and depth buffer
> are created. Each time the foreground object is moved or modified, the
> color buffer and depth buffer are
> initialized using the saved copies. The foreground object is drawn
> normally, depth tested against the
> saved depth buffer. ...'
>
> My question is whether this algorithm can be used with the OpenSG
> framework?
I believe all the necessary pieces are available, so it should be possible:
- every Node has a TravMask field that allows you to exclude it from
rendering (the render only visits a subtree if the bitwise AND of the
subtree's root TravMask and the RenderAction's TravMask is nonzero).
- copies of the depth and color buffer can be obtained with the
FBOViewport for example.
- to render the foreground object, create a separate tree with the
necessary transformations and the object to render:
Node
| [NodeCore: Transform]
|
Node
[NodeCore: Geometry]
NodeCores can be shared between Nodes, so this does not double your
memory usage.
> Has this already be done or is it actually a good idea?
> How would you solve the highlight problem today in the context of the
> scenegraph metapher?
Sorry, no idea, anybody else ?
Hope it helps,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users