0
$\begingroup$

I'm making a 2D game, and I use models and render them as png in various angles. Thing is, since they are models, I'd like to be able to export the normals in png. I found a way to put the normals as texture in the model:enter image description here

Thing is, I need the model to be in a specific rotation for it to work. Which rotation should it be? I tested with various, but couldnt find any good one:

enter image description here

To clarify, heres a functional normal mapping image: enter image description hereenter image description here

Any help is greatly appreciated!

$\endgroup$

1 Answer 1

0
$\begingroup$

Using a material to get the normal map works, but the drawback is that you have to change the material back to the actual one after you exported the normal map. I'd suggest to use the compositor for this task.

enter image description here

You take the Normal render pass and multiply all rgb channels by 0.5, then add 0.5.

In the difference between the top and bottom picture, you can see a specific property of normal maps. The coloring is independent of object rotation and dependent on viewer position.

From wikipedia:

" A normal pointing directly towards the viewer (0,0,-1) is mapped to (128,128,255). Hence the parts of object directly facing the viewer are light blue. The most common color in a normal map. A normal pointing to top right corner of the texture (1,1,0) is mapped to (255,255,128). Hence the top-right corner of an object is usually light yellow. The brightest part of a color map. "

The faces whose normal points in the bottom left corner are always green, no matter which faces normal of the sphere point there.

$\endgroup$
1
  • $\begingroup$ Much thanks for your answering. I did a different thing, i just enabled normals view: $\endgroup$
    – Caue
    Aug 3, 2023 at 14:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .