On Thu, 2005-02-10 at 18:18 +0100, Manfred Weiler wrote: > Hi Allan, > > > The overall goal of the application is to show a vol.rendering of an > > object which can be view inside by using a cut. Other 3d-textures will > > represent physical properties within the volume, e.g. fluid flow. This > > will be rendered by a fragment program when drawing the polygon of the > > plane cutting the volume. > > Let me put this clear. You want an opaque plane through the volume > with volume properties mapped onto the plane and in addition to that > a second 3D-texture defining a different property which is volume rendered? > or combined with the first volume on the sliceplane using special pixel > shaders? > > > My approach has been to inherit the OSGDRVolume to my own class and > > extend it with getDrawMode() and setDrawMode(UInt32). This allows for > > choosing between multiple rendering modes and will ease expansion. > > > > However, I cannot read the status of initialization since the variable > > shadingInitialized is private within OSGDVRVolume, so I'm stuck already. > > Is there a special reason for it not to be protected? > > Honestly, we never thought about extending the volume node in such a way. > But wouldn't you need your own rendering routine anyway? So you could > easily use an own private variable "initialized". > > But you should definitely be more specific about what you are trying > to achieve. Maybe there is a more elegant way than reimplement DVRVolume. > > Manfred.
I guess I have been a bit vague about what I'm trying to achive. 1. One viewport will show a normal vol.rend. of an object. However, it will be cut by a plane. This helps one determining the position of the cut-plane. 2. Another viewport will render an opaque plane through the surface. The plane is the one cutting the object and the camera will view along -1*plane normal. 3. A third viewport will render the exact same thing as viewport 2, but will process other 3d textures representing some physical properties, e.g. flow, while rendering. For clarity, there are 3 of these each representing flow along x,y and z axis respectively. A fragment program combines these into a vector which is visualized by using the projection of the vector onto the cut-plane as a color. My intention was to have different rendering routines in the specialized DVRVolume, all selectable via setDrawMode(UInt32). Different types of viewports have been created to choose the apropriate mode. Thus one can choose the appropriate mode simply by adding the proper viewport to a window. Regarding the rendering: yes, I do need my own rendering routine, but I don't see why it should be a major problem to put it in the DVRVolume. The texture is also located here. I may need to extend the OSGBrick with the actual rendering code, but there ought to be no problems here either. I'm stuck, however, since the volume renderer has been implemented using private instead of protected and only the the OSG specific code is virtual, besides the shader. Regarding the use of multiple 3d volumes during a rendering pass, I'm not to sure how to do it. Since I haven't looked into it yet I'm not sure whether there is a problem at all. I hope to have clarified what the purpose of my work is. Any comments appreciated. /Allan ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
