I hope some one with insight concerning rendering and materials would help me with this dilemma.
Scenario: I have parking lot with filled with 1000 cars. There is jut one car mesh and material. For variation material has parameters for color and detail texture. My question is which puts less strain on rendering:
- Every car spawned in construction script create dynamic material instance and initialize color and details expected for material.
- Create dynamic material instances in game mode for each different car type and add to specific list. Then when you spawn car you just get the material instance based on car type from the list.
I think second is better, but I recall reading somewhere that it does not matter.
Thanks in advance.