stanford-shapenet-renderer icon indicating copy to clipboard operation
stanford-shapenet-renderer copied to clipboard

Normal map issues

Open serenios opened this issue 5 years ago • 3 comments

Hi, recently I'm using your code to render normal maps. But I find that the rendered normal map looks like different to the traditional one.

It looks like stanford-shapenet-renderer-master_r_030_normal png0001 rather than 2 So, I wonder if there could be a way to render normal maps looks like the above one. Thx!

serenios avatar Oct 08 '18 11:10 serenios

Do you mean a bump map?

The normal map created here does the "normal" thing by visualizing the normal vector (ie the vector pointing away from the surface) to RGB.

panmari avatar Oct 08 '18 12:10 panmari

Thanks very much for your reply! Actually I mean normal map in Tangent Space. The predominantly blue looking normal maps. Which looks like this, for example: image if there could be a way to render this kind normal maps.

serenios avatar Oct 08 '18 12:10 serenios

I see. It should be possible to add a Normal Map Node and set the space there to tangent, see https://docs.blender.org/manual/ko/dev/render/cycles/nodes/types/vector/normal_map.html.

The script currently does not use a Normal Map Node, it simply reads out the normal from the render layers that are always present, see https://github.com/panmari/stanford-shapenet-renderer/blob/f77a7932a644f7acaee93176ae21bdd87c13e765/render_blender.py#L73

I'm happy to accept a CL that adds an option for rendering tangents!

panmari avatar Oct 08 '18 18:10 panmari