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"

Applying Material to Part of a Static Mesh

I imported a model from Blender and I am trying to apply different materials to the different parts of the mesh. I dragged the material over and clicked build and waited for the shaders to finish loading. And when its ready the part I applied the mesh to looks nothing like the actual material. I created a basic 3rd person shooter blueprint project and am just using the starter content to learn what I'm doing. I attached a picture of what I'm seeing. I applied a wood floor material and what I'm seeing is a brownish color when it should actually look like a wood floor. Is there anything I can try to fix this or anything known that causes this? Any help is appreciated.

alt text

Product Version: UE 4.9
Tags:
issue.png (505.3 kB)
more ▼

asked Dec 19 '15 at 02:57 AM in Using UE4

avatar image

jman2015
36 9 15 17

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Hi jman,

It sounds like the material is using the incorrect UV channel.

In your material blueprint, try adding a "texture coordinate" node before your wood texture node. Connect the texture coordinate node to the UV node on the texture node (is this answer using the word node enough?). In the details panel for the texture coordinate node you should be able to switch which UV channel the material is using. When you apply changes to the material with the correct UV channel selected, the wood material should show up.

Let me know if this works! Cheers, -Noah

more ▼

answered Dec 19 '15 at 03:04 AM

avatar image

NoahBeggs
243 5 8 18

avatar image jman2015 Dec 19 '15 at 03:21 AM

Are these answers correct even though the material is from the starter content?

avatar image Jacky Dec 19 '15 at 03:27 AM

Starter Content materials and any other material you create uses UV channel 0 of the mesh by default. So if your UV's are unwrapped in channel 1 then yes, Noah's suggestion is correct.

avatar image jman2015 Dec 19 '15 at 03:34 AM

How do I check what channel the UV's are unwrapped in?

avatar image jman2015 Dec 19 '15 at 03:39 AM

Here is the updated material after adding the texture coordinate node. Where would I check the UV channels? alt text

issue2.png (255.0 kB)
avatar image NoahBeggs Dec 19 '15 at 03:43 AM

Change the value of "coordinate index", first entry in the details panel. That refers to the channel being used.

As for how to check which UV channel to use, you should be able to tell from Blender, but an easy way to tell in UE4 is just to test values for the coordinate index starting at 0, apply changes, and see which one works.

avatar image jman2015 Dec 19 '15 at 03:46 AM

Do I just hit "Save" and the "Apply" in the material editor or do I need to also rebuild or anything?

avatar image NoahBeggs Dec 19 '15 at 03:58 AM

Simply hitting "Apply" should do the trick.

avatar image jman2015 Dec 19 '15 at 05:18 AM

I tried 0-7 and none worked. I'll try Jacky's answer and see how it goes.

avatar image jman2015 Dec 19 '15 at 05:56 PM

Cool I got it figured out I think. I'm a programmer first so I do not know much of anything about blender. So I am now just playing around to get to know importing and changing materials of models. I figured out that you all are correct I think it had no UV mapping. But I want to just download and have it work if I can. I know if I get assets from UE4 marketplace they will just work. I plan to use the marketplace in addition to other sites on the web. So besides making sure the model(s) are UV mapped is there anything else I need to look for in a model so I can make sure it works out of the gate?

avatar image NoahBeggs Dec 19 '15 at 06:19 PM

For static meshes, besides being UV mapped it needs to have normals facing in the correct direction, that's a common issue too. It also needs to have one or more material slots. All of these can be checked and fixed very easily in Blender too, or in your 3D package of choice.

avatar image Jacky Dec 19 '15 at 06:40 PM

Every mesh has one material slot by default. Having more than one is up to how the mesh is designed. Like, if you are making a vehicle you need at least two material ID's; one for the windshield(translucent) and one for the rest of the body. But if it is just a wooden table then one material ID is enough.

You are right about normals direction though. In addition to that you may also see meshes with no or wrong smoothing groups sometimes, which again can be fixed in Blender.

avatar image NoahBeggs Dec 19 '15 at 06:50 PM

Well cool, didn't realize objects always had one by default. You learn somethin new every day!

avatar image jman2015 Dec 21 '15 at 02:10 PM

Thanks for the help everyone I really appreciate it. Maybe I should get to know Blender a little better too... Has anyone bought anything from the UE4 marketplace? Is all of this taken care of when you buy assets from the marketplace?

avatar image Jacky Dec 22 '15 at 01:42 PM

You shouldnt have material ID or UV mapping issues with marketplace content but you should still check user reviews before you buy just in case.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The mesh has no UV mapping. You need to unwrap it's UV's in your modeling program. If you dont want to do that you can generate lightmap UV's for channel 0 inside the editor > static mesh editor as a dirty solution.

more ▼

answered Dec 19 '15 at 03:06 AM

avatar image

Jacky
16.7k 671 167 674

avatar image NoahBeggs Dec 19 '15 at 03:11 AM

That's a good point, if the object hasn't been UV unwrapped it would also cause this issue. If you want to unwrap the object in blender here's a basic guide Blender UV mapping.

avatar image smilingrob Dec 19 '15 at 03:54 PM

I noticed in Blender if I unwrap using Cube mapping where I want default repeating textures, they are consistently scaled between meshes and polys. If you use static lighting in UE4, then also add a second UV map to the mesh in Blender and Unpack using lightmap.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

you might try to change the textcoord values, try something like 0.1 instead of 1 for both slots. this works for me :)... or if the problem still exist send me the blend file so I can help

more ▼

answered May 09 '16 at 01:05 PM

avatar image

othman_alazzam
6 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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