There seems to be a new behavior in Verge3D 2.3.1 for Blender and I do not know if it is a feature or bug.
The state camera icon (the restrict rendering button) in the Blender outliner tells the Verge3D exporter the initial visibility state of an object. If the camera icon for an object is off, Verge3D will render the scene and that object will be invisible.
In prior versions of Verge3D, an object’s visibility was inherited from its parent. In 2.3.1 an object’s visibility does not consider its parent’s visibility. In general, this is how three.js worked.
This behavior matters to me. Many of my scenes have deeply nested outlines. It is very convenient to change the visibility of a single parent object and have all its children appear or disappear. Is this new behavior intended?
Hi, Jem. Indeed this change was intentional. The rationale for this is to make Verge3D more compatible with existing 3D packages because both 3ds Max and Blender manifest this behavior. Another reason for this change was to reduce side effects and fix various bugs inside the engine.
If you need to make it work how it was before you have several choices:
1) Create groups and show/hide objects by groups
2) Use object.traverse() method to show/hide object with it’s children
3) Switch recently introduced object.disableChildRendering option to enable/disable child rendering.
I will have to keep this new behavior in mind when I develop new projects. For my legacy projects, I added the line: myParentObject.disableChildRendering = true;
to my code and everything works as it did before.
Thank you for the explanation and suggestions,