I’ve modeled a leaf pile in Blender by duplicating a single leaf and have imported it into Unreal Engine. The texture I’m using is designed for one leaf. In Unreal’s static mesh editor, the UV channel 0 shows individual leaves layered on top of each other. My objective is to create a color variation in the leaf texture for each instance it appears in the pile mesh. How can I achieve this within Unreal Engine?
No.
You need a set of UVs witch each mesh uv in a different coordinate to be able to apply variation.
Take it back to blender.
Add a UV channel. Make sure you are viewing that, then just unwrap again.
You also probably need a lightmap UV, so the one you just created this way is probably good enough for both purposes.
However for the sole purpose of variation, you may want to take each individual UV island and pack it at the center of each pixel, so that you van create a texture thats very small - 256x256px would cover 65,536 leaves for instance - so normally, 24x24px is a good ebough texture to bring custom variations into the mix this way (576 leaves is probably way more than what you have already).
Thank you, your suggestion was successful. However, constantly adjusting the UVs for each mesh was difficult, so instead, I edited the materials directly in Unreal Engine’s modeling mode. I applied several materials to the mesh and painted various colors randomly
That it is.
There are some non free python plugins that can do this for you in blender.
Maya has the pivot painter thing which essentially also does this at a base level.
But remeber, how deep you have to optimize depends solely on your use case.
For instance, to get a render i’d never bother even mapping the lightmap outaide of the engine.
Just let the engine habdle the UV and use the lightmap the engine produces for whatever overall cloud texture variation i want applied.
On the other hand, for something like a mobile game one better make sure the asset eats as minimal memory/GPU as possible, so youd go the proper way about it with as small a texcture as you can.
As a bonus, if you control what you create you can pack many items into the same texture.
So with 256x256 you can cover variations for tons of items in the same pack, or even different biohmes etc.
As a bonus byproduct, Arranging different textures randomly into the compressed variation UVs guarantees some similar level of randomness you find in nature.
One last thing to point out -
for mobile / minimalistic approaches, you probably wouldn’t have single leaves in the model - you would bake it out and figure something different with decals or similar.
Even if it just costs you the 1 drawcall, you end up having too many tris for the device to render rather quickly.
Its sort of the same reason that you’d make a wall a 2 tris panel instead of sculpting out every brick within the wall…
However, one can always produce the best possible asset and bake it down to less so sculpting work isnt wasted…
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.