Geometry primitive and bool operations #1362
-
Dear All, I'm considering migration from the old OpenCascade to VulkanScenGraph. I would have two questions :
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi John, The VSG doe have basic shape primitive rendering via the vsg::Builder class, this supports creation of sphere, box, cylinder, cone, quads and points. At present it doesn't have support for specifying the resolution to create the geometry but but this should be possible with a future refinement. However, your typical of usage you might want to move the task more onto the GPU so to make it easier to refine the geometry based on viewpoint without loading up the CPU to regenerate the geometry. The VSG doesn't directly support boolean operation on geometry or rendering. This is not a feature that sits within a general purpose scene graph library, but is better suited for an add on library or integration with a 3rd party library that specializes in this area. One approach to constructive solid geometry that I experimented briefly 8 years ago, on top of the OpenSceneGraph, was to render geometries to screen space depth textures the compose the final rendering use these textures based on boolean logic what should be rendered. The VSG is better suited to the task as its shader architecture is more sophisticated. Unfortunately the project that I wrote this experimental code for didn't go ahead so the code never saw the light of day. The advantage of this approach is the you can change the geometries and positions on the fly without needing to regenerate any data, this should make it very interactive and lightweight. The disadvantage is you never have the actual final geometry that you can use as input to other tools. So it's likely you'll to compute this yourself or have another 3rd party library do it for you. Cheers, |
Beta Was this translation helpful? Give feedback.
-
To build upon what Robert said, OpenCascade is an everything-and-the-kitchen-sink library that aims to provide everything you need to build CAD tools, whereas the VulkanSceneGraph is specifically a computer graphics and rendering library. Like how a specialised tool like a screwdriver can be better than using the screwdriver part of a Swiss army knife, you might find you can make a better renderer more quickly with the VSG than OpenCascade, but it doesn't mean that it'll do everything the general tool does. You won't have the knife, magnifying glass, tweezers or toothpick anymore if you replace a Swiss army knife with a screwdriver, and you won't have all the computational geometry tools anymore if you replace OpenCascade with the VSG. Instead, you'd need to either find a replacement library for those parts, come up with your own in-house implementation, or keep using OpenCascade for those parts. |
Beta Was this translation helpful? Give feedback.
Hi John,
The VSG doe have basic shape primitive rendering via the vsg::Builder class, this supports creation of sphere, box, cylinder, cone, quads and points. At present it doesn't have support for specifying the resolution to create the geometry but but this should be possible with a future refinement. However, your typical of usage you might want to move the task more onto the GPU so to make it easier to refine the geometry based on viewpoint without loading up the CPU to regenerate the geometry.
The VSG doesn't directly support boolean operation on geometry or rendering. This is not a feature that sits within a general purpose scene graph library, but is better suited for an add on lib…