Why are my materials importing like this from Blender?

Hi all; I’m trying to import this sky ripped from a game into UE5.

I had to import it into Blender first to do some editing, but when I export from Blender (as fbx or obj) and import it into UE5, I get this result.
My textures become completely messed up, and going into the materials is a bit overwhelming for me and I don’t understand this issue. I’ve tried googling it but not found a fix for this specific issue.

Any help or guidance on what to do would be appreciated.

Thanks!

If you’re just trying to replicate the blender mat, import the texture used at the top of the blender graph into UE, and plug the top pin of that into base color (or emissive, since skies are usually unlit) and plug the bottom pin (alpha channel) into alpha on material output. Can’t read the math nodes on the blender screen, but it looks like it’s multiplying and clamping the alpha channel before going into alpha on the material box.

As for why, Blender and UE materials rarely play together. Usually have to recreate them every time.

You may be able to just use the original materials from the sky before you exported it for editing. Go into the imported static mesh and re-assign from the new generated materials to the originals.

If not, you might be able to compare between them to fix. As illspiritx illustrates, the material should be really basic. The generated material you show is overly complex to what is in blender. The material you build in unreal should be very similar to the blender one.

You may need to pay attention to the blend mode (in you material details)… you may want ‘masked’ if you want a similar hard clip behavior. Masked may be more performant esp for something large like a skybox.

Yea, if this is for sky, transparency would be bad news. Clouds should probably lerp over a solid base color or something. Like so:

Unlit generally always best for sky mats. Just gotta uv map the cloud layer onto a giant dome so it wraps properly. One of the sky dome meshes in engine folder might work ok.

So this is as far as I’ve managed to get by using the original textures:

I still have a few issues I’d like to ask about

  1. It appears very low poly, which makes sense since it comes from a PS2 game. How could I smooth it out in a optimal way?
  2. How do I make it so it’s not affected by the world lighting? As changing it to “unlit” just turns it pitch black.
  3. I’m having issues with z-fighting due to the textures overlapping in UE5 where they don’t in Blender. How would I replicate that in UE5? (The “masked” blending mode makes no difference)
  4. As stated above, the “masked” blending mode isn’t doing anything despite the textures having transparency. Why could this be?

I’m also including a shot from the game itself to show how the sky looks in-game. I’m trying to replicate it as closely as I can, though it doesn’t have to be perfect

Thanks for your help :slight_smile:

  1. add more polys if you need them. rendering polys into too much of a problem for modern hardware, it’s draw calls and overlapping transparency that are more of a concern.

  2. use unlit, and plug your textures into your emissive channel rather than the color/diffuse channel.

  3. the larger the skybox is, the more chance your individual elements will z-fight. you might scale down your cloud layer a bit to be more in front of the moon mesh… separate distances between layers should help. scaling the whole skybox down may help here too, depending how big it is compared to your camera clipping value.

  4. masked is either on/off based on alpha value threshold (in details panel). it is faster for the gpu to cull out pixels behind so it renders faster than translucency but creates a hard edge. looking at your clouds in the example image you will need translucency there as it fades in the layers behind. the background star layer can be opaque (fastest performance). you might just cut out the moon geometry along the circle so you can get away with opaque, if not masked might work. using masked might end up with jaggies on the edge so your mask might extend out from the blue moon a few pixels so it’s not visible with the black moon background on black stars.

The most performant way is to bake this down into a single material, but that is a different beast and what you have should work fine, honestly.

Try using EditorSkySphere in Engine\Content\EditorMeshes\ for the skybox mesh.

To make the clouds less blocky, use the method I posted above where you blend between sky color and cloud texture with a lerp using the alpha channel of cloud texture,.

To fix moon, try using a Skybox Image node. Here’s a quick and dirty example of adding moon and stars to the base “layer” of sky:

The wire trailing off the bottom is going to a mask texture for clouds, Since you already have a cloud texture with alpha, Wire up that last lerp like my previous screenshot.

@Countsie @illspiritx

Thank you both for your help. I apologise for the late reply, life got busy and work took priority over this project. I haven’t had a chance to try out what you’ve both said yet, but I will try it as soon as I get a chance to. Just wanted to write this to acknowledge you both and thank you for your help so far.

If I have any more issues when I try it I will get back to you here in this thread.

Thanks again!

Hello again! @Countsie @illspiritx

Finally got back to this and made a bit of progress. The only issue I am having now is I’m unable to find a way to get the transparency mask to work in UE5.

In Blender, you can see how the textures dither out into transparency or are masked (also seen in the texture pngs), but in UE5 this hasn’t carried over, and setting the blend mode to “masked” makes no difference. I’m an utter noob when it comes to nodes and usually just copy tutorials, so I would greatly appreciate some help here so I can learn :slight_smile:

Thank you!

The node examples I’ll show are for the large blue moon, but the issue is for every texture

In Blender:

In UE5 (after deleting all unnecessary nodes):

Raw texture pngs:

If you want to try a mask: drag from the A (alpha channel) to the Opacity Mask input on your material node. You can adjust how it clips to transparencey using the Opacity Mask Clip Value under where you switched to Masked mode.

Honestly though, for this situation, I would just switch to Translucent rather than Masked, that will give a clean edge on you moons and fade your images properly against each other. Drag the A to the Opacity. Make sure the your meshes are separated enough they don’t z-fight.

Just played around with your textures a bit and came up with this:

Zipped up the uassets for the material here if you want to have a looky: https://www.illspirit.com/files/M_RatchetSky.zip

Isn’t perfect, but could probably be tweaked a bit to work. Colors are a bit washed out in my screenshot because there’s an Earth-y sky atmosphere in the level making everything want to turn blue lol.

Ok, it’s not perfect, and I still need to mess with the level lighting a bit, but I’ve managed to get this
For a silly Meccha Chameleon modded in map, I think it works!

I did it by creating masks for the textures by taking the original PNGs and turning them black and white, learning how to plug those in using multiply and lerp nodes, putting them all on translucent and it’s finally got the effect I wanted. I also found turning off nanite support on the mesh helped greatly

Thank you both so much for your help, I couldn’t have fumbled through this without you both. Now I can take what I’ve learned here and apply it to future maps I’d like to make!