TomaszFurca Posted June 23, 2017 Share Posted June 23, 2017 Some time ago I started optimize my scene. After some fixes, now I have problem with grouping objects in BabylonJS. For export I use tower of Babel. I experimented with linking, parenting and joining. Linking When objects is linked in Babylon i can see only one object. Parenting This method do not change anything about draw calls - it is same without parenting. Joining This method show all objects correct with smaller draw calls. But i must divide to smaller groupis to avoid inncorect collisions (check link https://ibb.co/gVcROQ to show how bounding boxes are builded). In this screen it is not perfect, so i must divide to more groups my trees. Can anyone help me to export/import my scene to Babylon with optimal perfomance? I think about one object for all tress for example. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted June 23, 2017 Share Posted June 23, 2017 Not sure TOB is that relevant after instancing. A mesh is a mesh. I know parenting has nothing to do with draw calls. I have not actually heard of linking or joining. Is this correct terminology? Quote Link to comment Share on other sites More sharing options...
TomaszFurca Posted June 24, 2017 Author Share Posted June 24, 2017 Joining makes selected obejcts into one. After read some articles about optimize scene I found terminology linking objects. I don't know, which method is correct, but i try all possibilities to optimize my scene. Do you have any idea do resolve my perfomance problem? Quote Link to comment Share on other sites More sharing options...
JohnK Posted June 24, 2017 Share Posted June 24, 2017 Perhaps you could share the articles where you found the terms joining and linking as in BabylonJS the term merging is used to form one mesh from many. However merging meshes means one material. For example merging the trunk and leaves on your tree would mean the they would both have to be the same colour. Also you could not have a character colliding with one tree. Have you looked at the solid particle system? You could make a forest from the trunks and branches (as separate solid particles) with their own colours and the forest would be one mesh. By making the forest mesh immutable then there is only one draw call. However if you wish a character to collide with a tree then it is possible but memory and CPU time is increased. Quote Link to comment Share on other sites More sharing options...
TomaszFurca Posted June 24, 2017 Author Share Posted June 24, 2017 SPS is great tool, but i want prepare scene i blender, so i can't use SPS. All in one video Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted June 26, 2017 Share Posted June 26, 2017 Why do you not use Blender & the exporter to optimize? I did not have time to watch your video, but have put many things in exporter to transfer things already optimized. Running through checklists for optimization, rather than developing for optimization, just seems like turd polishing to me. For all your background meshes, check 'Freeze World Matrix'. Saves computing a world matrix for a mesh every frame when it never moves / rotates / or scales differently. You can also check 'check ready only once' for unique materials. Be ready to uncheck if this causes side effects. Tower of Babel generates fairly friendly code to get around this though. Every time you instance a mesh, the materials are marked as unready. For using BABYLON.InstancedMesh, you can establish this in Blender. Blender also has tools like Joining and Limited Dissolve. For these you may want to do them at the end of dev & increment your .blend file to save both ways. Always delimit by UV when using Limited Dissolve on a mesh with textures. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.