this post was submitted on 11 Oct 2023
11 points (100.0% liked)

Godot

5679 readers
51 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

[email protected]

Credits

founded 1 year ago
MODERATORS
11
submitted 11 months ago* (last edited 11 months ago) by [email protected] to c/godot
 

I'm trying to port my game from Unity to Godot and I got stuck on the issue of recreating the material I used in Unity, specifically the Normal Map. It doesn't seem to work properly as it did in Unity and I don't know what I am supposed to do.

See the video, where I show that enabling the Normal Map property on the Material of MeshInstance3D basically just disables the lighting on that surface. I tried recreating the normal map in some online software, but that didn't change anything.

Weird thing is that the material works correctly in the material preview on the right side of the editor, but not when applied to the mesh. Any idea what could I try to fix this?

Edit: The issue actually resolved itself after I applied the textures to another MeshInstance3D. I don't know why it didn't work on the first mesh...

top 3 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 11 months ago* (last edited 11 months ago) (1 children)

What version of Godot are you using?

Edit: If you haven't already, check that you're using the right normal configuration. I think Unity defaults to DirectX which has the green channel of the normal map flipped.

[–] [email protected] 4 points 11 months ago (1 children)

I'm using Godot 4.1.1.

According to Unity they use OpenGL https://tinyurl.com/2p8frxtf Unity uses Y+ normal maps, sometimes known as OpenGL format.

The same as Godot https://tinyurl.com/by9tsm3f Godot requires the normal map to use the X+, Y+ and Z+ coordinates, which is known as an OpenGL-style normal map.

The problem actually resolved itself already. I applied the textures to another MeshInstance3D and it worked there for some reason, I have no idea why it didn't work on the first mesh...

[–] [email protected] 3 points 11 months ago

Weird bug, glad it fixed itself for you. I'd consider reporting it if you can reproduce it at all.