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"

Skeletal mesh imported from blender has too many materials.

I have a skeletal Mesh that uses only three materials and no sub meshes. I know the problem stems from how the mesh was made, I used pieces from mesh in another file with it's own material and joined them to the mesh, assigning them the final material of course. Blender seems to retain this information as when it's imported in the Unreal you can see clearly where the patches are.

Here is the mesh in blender with one of the patches selected. note that it's using the exact same material as the surrounding area.

alt text

And this is an image from Unreal. as you can see It made the patch it's own element and there far more then just 3 elements.

alt text

Making each patch it's own mesh is pretty unacceptable and unreasonable. I tried using modifiers and all sorts of stuff to see if made new faces. But nothing seems to be working, And there doesn't seem to be anyway to say combine Material Elements in Unreal which would be a favorable solution if possible.

Product Version: UE 4.7
Tags:
pic1.jpg (143.7 kB)
pic2.jpg (92.4 kB)
more ▼

asked Jun 09 '15 at 06:50 PM in Using UE4

avatar image

JoSilver
236 8 13 22

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

2 answers: sort voted first

After trying to use my previous solution I realized that for large meshes this process was time consuming even with find and replace. So I decided to try my hand at writing a program that actually did the editing for me but this meant take a deeper look in to the FBX file format. So I started skimming through the FBX of a small mesh with the same problem. I noticed it had index for materials up to 10 despite the fact that that there were only 3 or so materials in blender and about 4 indexes used for the the mesh for example it was using materials 0, 3, 4, and 10. So where are all those extra materials coming from I thought to myself. Then finally I got to where the materials were defined and to my surprise it was making materials for not only materials applied to the mesh but textures in the blender file.

The textures were things like UV map layouts and some textures but ultimately stuff that was not even used by the mesh.

After clearing out the textures by Shift clicking the X on the texture in the UV editor and saving and reloading the file. I tried exporting and sure enough it stopped exporting the extra materials and assigning them incorrectly to the geometry.

To keep it simple.

  1. Shift click the X on extra and useless materials in the material panel to remove them from the file.

  2. Shift click the X on any textures you find in the UV editor to remove them from the file.

  3. Save and reload the file so all unused data is fully purged.

  4. Export and everything should be fine!

I hope that's the end of it for now. There seemingly no answer to the problem out there that doesn't involve edited the FBX file by hand. Hope this helps anyone in need.

more ▼

answered Jul 25 '15 at 05:49 AM

avatar image

JoSilver
236 8 13 22

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

Recently I've come across a solution that helps but is far from perfect and requires some trial and error without being destructive to the mesh in Blender, It require opening up the FBX File and editing the "LayerElementMaterial" Portion of the file. I notice in a mesh with only 3 materials in blender it had 4 unique material indexes because of the patching in the FBX file, For some reason blender remembers that there used to be a previous material on the face and exports it despite not existing in the blender file anymore. So you have to find out which indexes when combined make up the faces of the original material in blender

Example

Materials: 1,2,3,4,1,1,2....

Materials 1 and 2 are part of the same group in blenders so change all 2's to 1's or all 1's to 2's so the correct file might look like.

Materials: 1,1,3,4,1,1,1....

Without a doubt this is not a great solution but it's better then trying to fix it in blender or working around the extra groups in UE4.

more ▼

answered Jul 23 '15 at 09:43 PM

avatar image

JoSilver
236 8 13 22

(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