Hello everyone,
I have an issue of algorithmy. Here is what I have to explain the context : I have one camera, displaying the object in his “normal” texture, and I want another camera to show the same object but with a different texture (Infrared texture), because I want a normal and an Infrared camera.
But I can’t find an optimised way to do that… Because I have a lot of objects which some are pretty heavy. Duplicating the object will make the program very very slow…
Thanks for your help.
Whats about an video texture with 2 frames … 1 frame normal…/2nd frame infrared… camera 1 stop@first frame… or frame 1 / camera 2 stop @last frame … or 2nd frame…
u Can have more than 2 different textuers that way
You are wrong about duplicating objects making your program super slow, just put the normal ones to 1 layer and infrared to another layer, then one camera draws normal objects (choosing their culling mask), and another infrared ones, enable and disable cameras when you need another one to be drawn (you can also make both cameras visible at the same time). Also remove colliders from infrared ones to not be interacted by physics. Make infrared objects be a child of normal one and you are good to go.
You can also simply change the material of object to make it infrared. If you want to do so you are probably interested in this question. This should be used if you want to switch between modes, but won’t really work if you want to display both infrared and normal object at the same time.