Hi Bob, huh, I would say it depends on your implementation. Currently the way you describe it requires a volumetric rendering approach.
The thickness calculation seems to be the most tricky part. If you have your volume data, then use osgVolume for that (I haven't tested it, so I do not know how well it suits your expectations). Other possible solution is to render all your triangles in slices which are perpendicular in viewing direction. So you specify clip planes and render your model in several passes. Of course no backface culling or any other culling except of this clip planes should be active. So you render your slices into a several textures (actually you only need depth values). Using osgPPU you combine all that textures and compute thickness. After all passes (depends on complexity of your model, how much passes you want to use), i.e. 128 passes, you will have as result thickness of each pixel in viewing direction. This thickness texture can then be projected on the model in your scene back. Since hte projection is from the view point, you shouldn't see any big artifacts. So this is a way, how I would try to do it. Maybe there exists better approaches. Cheers, art ryoumans wrote: > Hi, > > I'm trying to come up with a design using OSG to build what i'm calling an > "X-ray" viewer. Basically i have relatively simple geometry, a "shell" or > "skin" of a vehicle and then the "interior." I want to view the interior as > "penetrated" by the X-rays, which is based on a "thickness" calculation and a > "distance" and "aspect" angle, all hopefully done in shaders. I envision the > shaders setting the fragment alpha and/or color when rendering the "shell", > then after to render the "interior" and combine with the "shell" texture to > create the final view, showing through the interior in desired parts. > Finally, i desire to get a histogram of the colors of the interior to see how > the "shell" performed on the x-rays with the interior. > > Do you see this as an appropriate application / use of osgppu? i'm running > osg 2.8.1. will ppu work with that. i've got osgppu 0.4 i think. > > also, i'm thinking i need to create the ppu nodes programmatically instead of > reading ppu files, so i need examples of that type. i'm just starting to > look through them. > > > Thank you! > > Cheers, > Bob ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16098#16098 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org