x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

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 !

Calemike.

Product Version: Not Selected
Tags:
more ▼

asked Jul 30 '14 at 10:47 AM in Rendering

avatar image

Calemike
46 12 12 19

avatar image Devero Jul 30 '14 at 11:05 AM

Kind of like a spritecard ;)

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

Possible.

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.

more ▼

answered Jul 30 '14 at 10:57 AM

avatar image

mindfane
3.4k 154 51 271

(comments are locked)
10|2000 characters needed characters left

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

 KillsBg = UCanvas::MakeIcon(HUDMainTexture, 15, 16, 235, 62);
 TimePlaceBg  = UCanvas::MakeIcon(HUDMainTexture, 262, 16, 255, 62);
 PrimaryWeapBg = UCanvas::MakeIcon(HUDMainTexture, 543, 17, 441, 81);
 SecondaryWeapBg = UCanvas::MakeIcon(HUDMainTexture, 676, 111, 293, 50);

//Draw the texture

 Canvas->DrawIcon(KillsBg, KillsPosX, KillsPosY,    ScaleUI);

Maybe that can help.

more ▼

answered Jul 30 '14 at 11:08 AM

avatar image

Devero
2.3k 114 61 233

avatar image mindfane Jul 30 '14 at 11:23 AM

If he does not need any mesh in there, he can simply use DrawText ndoe with a custom Font asset whcih will be a sprite atlas

avatar image Calemike Jul 30 '14 at 11:36 AM

Hi ,

Thanks for the quick replies, I appreciate :)

Unfortunatly Devero I'm not coding at all (except some basic MEL scripting in maya for particles).

I like the idea of a custom font that I can use instead of textures, I could even use this to my text menu !

How can I proceed ?

avatar image Calemike Jul 30 '14 at 12:25 PM

Actually I discover material instances as mentionned by mindfane. I'll give a try with pan UV with vector param.

I'll let you know if I succed :)

(comments are locked)
10|2000 characters needed characters left

Hi,

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 !

Calemike.

more ▼

answered Jul 31 '14 at 09:06 AM

avatar image

Calemike
46 12 12 19

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question