Author Topic: Can you change textures (on a car) without using duplicate meshes?  (Read 911 times)

(to anyone who might get their hopes up, this is a purely hypothetical situation)

Let's say you have a race car which is thoroughly UV mapped and covered in various decals.

You want to have several different versions, let's say 10, of these liveries. Different patterns, colors, fictional brand names, and so on.

I could have 10 different datablocks, each using their own shape file with the only difference being in materials, but that would be... what it sounds like. I would rather have one vehicle and switch between these liveries with scripting.

The only way I'm aware of being able to do this would be to duplicate all of the affected faces ten times and assign different materials to them, always hiding the nodes of the other 9 versions of the body.

Someone please tell me there's a better way.
« Last Edit: June 30, 2016, 04:23:46 AM by Teneksi »

I think you can use IFL materials for this.

Create a file called something.ifl and place it in your add-on, inside it make a list of absolute paths to different png files.
Then set up your model to use this file in blender (do you just call the ifl file the same as the material? I don't know).

To change the color call %vehicle.setIflFrame("something", index)
Not sure how well these work with the new download system, but it's worth a try.

Yeah, ifl materials might work, but everyone on the server needs to have the add-on, I think.