I have parametric growing trees that are currently made up of cylindercones (my custom TCastleCylinder with top and bottom radius) and spheres (for knuckles to fill gaps between cylindercones that are at angle). These trees are taking more memory than I would like… 200 trees that grow to have 4 branches runs out of memory. I was thinking an extrusion would both look better and be more efficient in memory. The whole main trunk could be one extrusion with each branch being one extrusion.
Are there any examples for using the extrusions? Do you have plans to wrap extrusions into a castle primitive like you have for Cones and Cylinders or just leave it at the x3d TExtrusionNode level?
Or maybe extrusions won’t let me vary the radius as it goes? Unclear.
We support X3D extrusion node, Extensible 3D (X3D), ISO/IEC 19775-1:202x, 13 Geometry3D component . The “cross section” can be scaled at each point.
But admittedly, Extrusion is not a way to save memory. Extrusions are internally just converted to meshes, since that’s what GPUs understand.
We don’t plan to expose extrusions (the X3D TExtrusionNode concept) in more “friendly” way at this point, I have to admit.
Extrusions in X3D turned out to be quite complicated for people, and they don’t cover a lot of practical cases. In most cases I saw people using extrusions, eventually ended up wanting to “escape” the constraints of the extrusion… E.g. to make a tree trunk from which numerous branches diverge. This is trivial to express as a mesh (and when designing it in Blender, you would indeed use Blender’s “extrude” operation a lot) but it doesn’t fit into X3D Extrusion.
So the practical advise for people using extrusions is to use the “extrude” operation in Blender. This is flexible: it makes an extrusion, but just by modifying the mesh, so you can switch between thinking about extrusions and not freely.
So we don’t push much for using Extrusion X3D node. That said it exists, we support it following the spec, if it fits you – go ahead and use it (you can put TExtrusionNode into TShapeNode and load it into TCastleScene).
I thought it may be more efficient since I wouldn’t need the spheres at each node just to fill any small gaps between cylinders. And perhaps having one object from root to tip of tree instead of many cylinders and spheres would be more efficient. The trees are dynamically generated, growing from ‘seed’, so not modelled in blender.