Normals in Godot?

Discuss issues pertaining to the various game/web runtimes of Creature here.
Post Reply
cm343
Posts: 6
Joined: Fri Dec 15, 2017 1:45 pm

Normals in Godot?

Post by cm343 » Sat Jul 28, 2018 12:00 pm

Is it possible to use normals from Sprite Bump in Godot? I know there is a way to define a normal map for a 'sprite' node in Godot, but I can't see anywhere to define a normal map in a CreatureGodot node.

Thanks in advance!

chong
Posts: 861
Joined: Thu Feb 19, 2015 2:21 am

Re: Normals in Godot?

Post by chong » Sat Jul 28, 2018 4:57 pm

Hello,

I am not sure how Godot's shader or nomals system works, I know there definitely is one. This might be more of a general Godot-related question than anything else.

Essentially the creature character when rendered in Godot already contains UVs per vertex, you wil need to figure out in Godot how to use those UVs to sample the normal map you want and then modify the normal. Since the characters are essentially a flat plane ( 2D to 3D ), you will just be modifying some unit vector (0, 0, 1) for example that gets changed via the normal map. That is the simplest example I can think of. However you should take a look at the Godot shader docs to see how it can be done.

Thanks

cm343
Posts: 6
Joined: Fri Dec 15, 2017 1:45 pm

Re: Normals in Godot?

Post by cm343 » Sat Jul 28, 2018 6:41 pm

Thanks for that - haven't looked much at shaders at all.

It's really straightforward for a simple 2D sprite in Godot - just add the sprite texture, the normal map and a Light 2D and it's job done. I was hoping there might be a simple, magical way to do it with the Creature runtime :)

Image

Post Reply