We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Are Instances Working?

Home Forums Graphics / Blender Are Instances Working?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #77522
    masj
    Participant

    Hi,

    I have a scene in Blender with many instanced objects (collections of objects that share the same material and mesh data, but with individual transform values).
    When I export as a glTF/glb, the instances are kept in tact (file size is very small).
    When I use the scene in Verge3D, it seemed to lag a bit, so I checked the performance data.

    It doesn’t look like any of the instanced objects are of the type InstancedMesh (they don’t have the isInstancedMesh property), and my Render Calls are high and flagged red in the console (though geometry buffer is sufficiently low).
    Is this how things are supposed to be, or is there a recommended way to optimize this that I’m not doing? :cry:

    Thanks in advance. :good:

    Attachments:
    You must be logged in to view attached files.
    #77524
    kdv
    Participant

    It doesn’t look like any of the instanced objects are of the type InstancedMesh (they don’t have the isInstancedMesh property)

    exactly, they are not of type InstancedMesh. they are just separate objects sharing the same material and geometry.

    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.

    #77525
    masj
    Participant

    so…is that okay? Should I be concerned with the number of Render Calls, or is this just how Verge3D (and webgl?) does instances with glTF/glb files?

    #77526
    kdv
    Participant

    Should I be concerned with the number of Render Calls

    Yes, you should. You’d better merge those objects into one object if they are not supposed to move.

    And I assume (but not for sure) that you are using several post-processing effects or several light sources casting shadows. That’s why there so many render calls.

    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.

    #77527
    masj
    Participant

    Unfortunately, that kind of defeats the purpose of doing instances in the first place, as I’m animating transforms dynamically per instance. If I combined them into a single object, i’d have much more geometry data to deal with (likely another bottleneck w/ exponentially more triangles), and to get the animation effect I’m after, I’d have to do something like use thousands of bones (which I can do), but not sure how performant that solution would be.

    If it just Verge3D that handles instancing like this, or webgl/three.js in general, I’m curious? If each instance was dynamically created in JS as an InstanceMesh, would that change anything, or same result?

    And no – one directional light, no shadows. Only bloom and outline effect on a couple objects, (neither of which are the instances).

    #77528
    kdv
    Participant

    use thousands of bones (which I can do), but not sure how performant that solution would be.

    it will be much faster in v3d.

    If each instance was dynamically created in JS as an InstanceMesh, would that change anything, or same result?

    Verge3D supports objects of type InstancedMesh but doesn’t provide you with instruments to create them. Only JS coding :unsure:

    Only bloom

    This post-processing effect significantly increases the amount of render calls (up to 3 times more).

    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.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.