Home › Forums › General Questions › Instancing
- This topic has 13 replies, 8 voices, and was last updated 4 months ago by jerenz.
-
AuthorPosts
-
2019-01-24 at 1:10 am #10815Avier3DCustomer
Hello peeps,
I’m working on an architectural model that has hundreds of furniture assets, while there’s only ~8 original models, I have them all duplicated by instancing in Blender.Is there a way of forcing V3D to recognize the instancing, and hence save geometry load?
although once rendered the total amount of tris is high, by instancing the saved data is much, much smaller.
Any clues?
Cheers.
2019-01-24 at 8:13 am #10817Yuri KovelenovStaffHi,
This is a very good question! In Blender, make sure that geometry is shared by similar objects. Check the number of users for such objects in Object Data tab – it should not be equal to one if geometry is shared.
In order to instantiate objects with their geometry shared, use the Duplicate Linked operator (Alt-D) rather than Duplicate Objects (Shift-D).
If you already duplicated the geometry, you can make it shared by clicking on the small button near the mesh name and selecting the same mesh for all similar objects.
As a result, the binary file of the exported scene will be much lighter!
Attachments:
You must be logged in to view attached files.2019-01-30 at 7:57 pm #10895Avier3DCustomerAh right! so does V3D recognize the instances (and GLTF does transport it)? I’m just wondering if using it does save data volume.
2019-01-30 at 11:35 pm #10896jemCustomerI can confirm that this technique works. I use it in all of my scenes. The resulting .bin file is much smaller. You will save data.
Jeremy Wernick
2019-01-31 at 7:28 am #10897Yuri KovelenovStaff2019-10-31 at 10:19 am #20901NaxosCGCustomerHello,
What about 3dsmax’s instanced geometries ?
Does the Verge3D exporter use them as instances ?Regards.
"1+1=3... for large values of 1"
2019-10-31 at 10:51 am #20906Yuri KovelenovStaff2019-10-31 at 10:54 am #20908NaxosCGCustomerWell I’m not sure – but you can make an experiment and see if the size of the binary file .bin is decreased when using instances rather than copies.
Ok, i’ll do.
"1+1=3... for large values of 1"
2021-02-03 at 1:48 am #37956xeonCustomerOK….I think something has changed since the last time this thread was discussed. I also use Duplicate Linked objects in blender and had success using them in Verge until recently. I am using Blender 2.91.2 and Verge3.5.
Now my assumption is the instancing is no longer working in Verge with the update of how Collections work in Blender now, but I need someone to validate that I am right or wrong.
To recreate start with a new Verge app and new blender scene with one UV sphere (or any object) with default lighting. In my cases yields 1932 triangles validated using Blenders stat overlay. To determine the number of triangles used by Verge I used the Print Performance Info puzzle by itself and tested the output of a single sphere… and received 1932 triangles. Then I added a Duplicate Linked sphere of the original and Blender reports back no additional triangles in the stat window. Then when I publish this in the same Verge3d settings….it generates 3852 triangles. Not what I was expecting.
This is a simple example that can be repeated but I am wondering if I am missing a step or if there is some other setting I need to verify that is selected so Verge3d will interpret this correctly or is this a new bug?
Attachments:
You must be logged in to view attached files.Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2023-06-14 at 8:27 am #64604huibCustomerHey, bumping this thread because there wasn’t a official reply and we are experiencing the same thing. Instances made in Blender don’ t get translated over properly.
Saved a scene with a bunch of trees, all instanced. Resulting .gltf file 500 KB.
Joined all the trees into one object, saved again, Resulting in a .gltf file of 300KB.
With regards to loading times on phones for example this is huge.
Can we get an update on this please :)?2023-06-14 at 8:37 am #64605kdvParticipantYou just compare wrong files. GLTF is a JSON-format file with objects’ properties (position/rotation/scale, material names, texture names etc.). The more separate objects in the scene the more size of GLTF. Geometry buffers are stored in BIN and loaded from there by index from object’s properties.
Instanced meshes (.bin 0,63 Mb) vs individual meshes (.bin 1,23 Mb).
It’s OK with instanced geometries in Blender/Verge3D.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-06-14 at 10:09 am #64611huibCustomerOkey thanks for clearing that up. I should have known this haha!
Did a test with a model of a tree, went from 24mb instanced version to 660mb unique meshes version, so that clearly works!2023-06-14 at 10:38 am #64614kdvParticipantand received 1932 triangles. Then I added a Duplicate Linked sphere of the original and Blender reports back no additional triangles in the stat window. Then when I publish this in the same Verge3d settings….it generates 3852 triangles. Not what I was expecting.
And what were you expecting? The count of used tris in the scene (in Blender) and the count of rendered tris (in Verge3D) are two big differencies as they say in Odessa. Look at the count of geometry buffers. In both cases it is 2 (used geometries). The count of rendered geometries is different (rendered geometries, render calls). Blender’s statistics doesn’t show the overall amount of tris rendered. Only the unique ones. Instanced geometries won’t make you app work faster, they will make the app’s .bin smaller decreasing loading time…
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-07-22 at 9:34 am #76115jerenzParticipantMy scene has a lot of trees instances in blender, when I export as verge 3d gltf, the .bin is small.
Then in verge 3d , i use the batch geometry puzzle for the tree collection, thus reducing thousands of render calls , but rendered geometry stays the same .
However , when using the batch geometry puzzle, I lost the (object info ,random node) functionality to give my each trees slightly different tint.Is this the best way to do it? Or anyway I can do it better?
Attachments:
You must be logged in to view attached files. -
AuthorPosts
- You must be logged in to reply to this topic.