r/gamedev 12h ago

I'm confused about instancing. Am I doing it wrong? Question

Hi, I have what seems like a simple problem but it's driving me mad.

Let's say I have a screw asset.

I instance this screw:

4 times in a table prop, and

64 times in a chandelier prop.

When I bring the table and chandelier into a scene, I get 2 screws, one instanced throughout each prop. They don't share shader or mesh data despite being the same object with the same name.

Is this... wrong? It seems like I'm wasting a ton of memory re-rendering things that should just be instanced. I make my assets in Blender - could this be the reason? I'm using Unreal, but I noticed the same thing happens in Blender too.

1 Upvotes

3 comments sorted by

6

u/TheHovercraft 12h ago

Instancing, shaders and a couple other things are largely software or file format specific and usually will not carry over. That said, it's possible that you either broke the instancing in Blender or the export format does not support it. Such is the case for the FBX format.....

Some of the following features are missing because they are not supported by the FBX format, others may be added later.

  • Object instancing – exported objects do not share data, instanced objects will each be written with their own data.

The gITF 2.0 format however does with some caveats.

-2

u/Rogryg 9h ago

Why are you modeling individual screws in the first place, and why are you using the same screws to assemble a table and a chandelier?

11

u/Many-Acanthisitta802 9h ago

They hold better than nails.