I am not sure where to post this, so I post it here. Feel free to say if this is the wrong place :).
I am creating a tycoon-style game. As you might know, there are many ‘people’ walking around in such game. In my game I want to have about 50-100 people on the screen. I want the user to be able to set the clothes for the people.
The user can decide the color of the pants, the color of the t-shirts and more.
But how would one implement this the best in a game?
I could of course make every man in the game a collection of objects (the t-shirt is an object, the pants is an object and it moves together in one object, ‘the man’). But I think this costs a lot of performance for 50-100 people.
Another solution would be to change the texture of the object. I could analyze the texture and change it to the right colors. It would take a lot more time to create and implement, but I think it would be a lot faster.
My question:
What do you guys think would be the best solution (for the performance)? Or does anyone have other ideas?
Thank you for your time. If something is not clear, please say so and I will provide some more information.
The standard shader has a color selection option for the albedo texture slot should be very easy to change the color if you just using the same shirt/pant type. If you doing variety the cutout shader .option would do the trick.
Thats up to you no need to really create seperate objects as you can assign materials . Lets say you have a person so design him with trousers and a long sleeve shirt in mind. Then make a few textures lets say trouser long sleeve short sleeve short pants etc. Assign a materail for the shirt and another for the pants . Use the cutout to switch between clothes so a trousers can become shorts long sleeve can be short sleeve or t-shirt etc.
Thank you for your time,
I was trying to implement what you are saying. But I have no idea where to start. I understand I need to make the pants and sleeves different objects and assign two different materials on them.
But how would I make the trousers switch from long to short trousers?
@hopeful
Thank you for your reaction. I did not know UMA and it looks pretty solid.
But the technique tawdry described looks more promising to me. Using a shader to change where the object needs to looks for his texture. (This is what I thought he meant?)
That way I could simply create a pant object and make it look to different pants. And a shirt object that looks to different shirts.
If this is possible it would be great, but I have no idea how I would implement this.
Because I do not think someone could explain this, I decided to go with my own techique. I create a player with different objects for different parts. An object for the pants, an object for the shirt and so on.
Every object has its own material, and I change the texture of that material to customize.
I do not know if that is the best way to handle it, but I think it will work