One texture for multiple meshes.
Hi everyone !
Another question regarding textures. I'm doing my level selection screen, And would like to have a mesh per level number (imagine having 01 02 03 04 05 and you select the one you want), I'm doing a mesh per level as I'm scaling up the selected number.
Right now I'm using a material per mesh, and a texture per material, I end up with 10 textures and 10 materials... that's not cool.
Anyway, I want to use a texture that contains all the levels numbers, then attach it to one material, assign this material to all my meshes, and for each meshes, move my UVs to the right number (mesh 01, use only the location of 01 on the texture).
That's my first step, if someone have the solution, I guess it's something I have to use in the material editor, then in the blueprint construction of my mesh. Thanks for helping !
Many thanks !
But within your material, you must use a panner and zoom to select the correct UV coordinates for each number tile.
The inputs to the panner must be made Material params (A Vector should be enough)
After that you can create mutltiple Material instances out of this material (1 for each number).Set the correct values for the panning params in these material instances. After that apply those to the meshes.
answered Jul 30 '14 at 10:57 AM
I'm just looking into this for my HUD and the following example is what i'm looking into: UCanvas::MakeIcon
//get the uv location
//Draw the texture
Maybe that can help.
I finally get it to work using material instancer, texture parameter and vector parameter. I still have one texture per number, but I have only one material, so I'm pretty happy with that :)
Thanks everyone for the help !
answered Jul 31 '14 at 09:06 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here