- Home /
Combining textures into one image.
I have two (and often more) textures I want to lay on top of each other in order to create one single texture. Basically layering a Skin texture, Shirt, Pants, and Belt textures (and more), so the entire character's textures are on one single image.
What might be an accurate, efficient way to do this in Unity Indie?
Answer by DaveA · Nov 14, 2011 at 08:55 PM
Short of writing your own shader (See Strumpy's Shader Editor, it's free), you might use GetPixels/SetPixels to composite them into a new texture. You could even save that new texture to a file, effectively caching it. Since you wouldn't need to do this every frame, only when choices change, it should be fine performance-wise.
Ah, GetPixels and SetPixels would be a reasonable way then? It's been a long time since I last tried using them, but I do remember messing up my old script and causing it to be poor for performance.
I'll try this again the right way this time.
If anyone has some other suggestions, with more automatic rendering stuff 'n' such, I'd also like to hear those.
Yeah I've been using it for doing video processing, and it's not horrible (not the best tho), but if it's pretty infrequent, it should be just fine.
Your answer
Follow this Question
Related Questions
Repeating Material texture 0 Answers
dynamic images for textures ar runtime 2 Answers
Layering multiple 2d images on one texture 3 Answers
Combine material's main texture and main color 1 Answer
Set image as material 0 Answers