I’m working on a project where we’d like to have 500 low-poly cars in a basic scene. I have some questions on the best approach.
We’re basically looking to achieve:
- Each car body can have it’s own color (the tires/windows can stay the same)
- Each car can animate it’s position, rotation
Here is a screenshot of an example 3D model we hope to purchase once some of this is figured out.
I assumed that displaying 500 of these cars with a typical model import may cause performance issues, as this demo will be running on an average laptop. Am I right to assume that?
So I started going down the road of using an InstancedMesh and testing with some cubes for now until I get the models.
Performance seems great, but a big unknown has come up.
Since each car would need to share the same mesh/material, how can I change each individual car body color without the wheels/windows also becoming that color? (e.g. I’d like the car body to be blue, but the wheels/windows to be grey)
Is this possible to achieve with InstancedMesh possibly using a texture? Maybe the wheels/windows could be part of the texture and the body could just be transparent showing the material color?
Is using InstancedMesh the right thing for this scenario? Would there be another method to displaying 500 of these cars in a performant way that offers me more control over individual color?
Thanks a bunch guys. Any info appreciated.