Please be aware there is a known issue with images on the Community. We are working to resolve this issue as quickly as possible. We apologize for the inconvenience. If you need urgent help in the meantime, please reach out to technical support or your Threekit representative.

Gem Shader - too many draw calls

Comments

5 comments

  • andrewq
    andrewq

    Client wants the gems to look good individually, but as you might know they need to be separate meshes. This is all fine and good until the scene has like 25 diamonds per chain link. Performance is definitely tanking and there is no compromise to be made on the appearance of the diamonds. Is there a hack I can use? I tried grouping diamonds into 3s or 4s but even then the effect is lost.

    0
  • Daniel  Sturk
    Daniel Sturk

    Hi Andrew,
    You are correct that unfortunately the meshes must be separate nodes for the effect to work, and having a large number of nodes in the scene will hinder performance.
    However, as long as the gems’ meshes are not unique, the shader can optimise them quite heavily. A common pitfall when uploading a model into the platform is that the meshes are not instanced/linked despite appearing the same, and thus can’t be optimised by the shader. There’s no front-end way of checking whether they are correctly instanced at the moment, but one way to guarantee they are is the following:

    1. Import the model
    2. Open the model asset
    3. Delete all but one of the gems
    4. Duplicate one of the gems as many times as needed to replace the missing gems
    5. Ensure there are no operators added to the ‘Polymesh’ or ‘Null’ (model) nodes representing the gems
      I just tested by exporting .glb and .fbx from Blender and importing into the platform and both times it did work correctly, however I have seen it done incorrectly many times as well
    0
  • andrewq
    andrewq

    This is excellent advice and works great with my use case (these diamonds are all the same shape). Thank you for the quick reply.

    0
  • Daniel  Sturk
    Daniel Sturk

    My pleasure. Have a great day

    0
  • adamgravois
    adamgravois

    Yeah, this is useful to know, thanks. (I just confirmed that Maya can export instances through FBX as well.)

    0

Please sign in to leave a comment.

Powered by Zendesk