chrishayesmu / Blender-Spritesheet-Renderer

MIT License
16 stars 4 forks source link

Normal Map output doesn't look like a normal map #3

Closed KoshakiDev closed 3 years ago

KoshakiDev commented 3 years ago

Steps to reproduce:

  1. Have a 3D model with a material
  2. In "Control Materials", set the role setting to "Normal (Unity)" and the mode setting to "Material Per Target"
  3. Set the target object to be the 3D model and the material to be the 3D model's material
  4. Press the "Start Render"

Expected normal map result: image

Real result: platbot_normal_unity

Possible issues I may have done the wrong steps to achieve a normal map. If I did, please let me know.

chrishayesmu commented 3 years ago

Hi, I think there's some confusion over what the role setting does. It simply provides metadata which will be included in the .ssdata JSON file alongside the rendered output, so that when you're importing the spritesheet into e.g. Unity, it can automatically determine how to use each spritesheet. However, it does not actually handle rendering the normals; you need a Blender material which can do that for you.

As an example, here's a material which I use to render normals from the perspective of the camera.

image

Each material set has a button at the top labeled "Assign in Scene", which will set up the scene materials as defined in the set. Whatever you see in the viewport after clicking that is what you'll get in the render.

KoshakiDev commented 3 years ago

Aha! I get it! Thank you for clearing up and sharing the normal map material layout.

chrishayesmu commented 3 years ago

Glad that helps! I should just point out that I'm far from a Blender expert, and that material I shared is mostly just stuff I found on Google. It seems to work for my purposes, but if anything is weird with it, you might want to start fresh with something from someone who knows what they're doing.