POV-Ray : Newsgroups : povray.general : Generate normal map : Re: Generate normal map Server Time
29 Apr 2024 01:00:56 EDT (-0400)
  Re: Generate normal map  
From: William F Pokorny
Date: 11 Oct 2019 04:01:01
Message: <5da036bd@news.povray.org>
On 10/9/19 1:21 AM, Josh wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
...
> 
> Thank you so much for sending this. I think I got it working. But from what I
> can tell, the normal map isn't quite right. All the colors are 'washed out'. I
> would expect that near the center of the asteroid, the color would be RGB
> 128,128,255, and that near the right edge the red component would be 255, and
> near the left edge the red component near 0, and the same for the green, close
> to 0 and 255 near the edges. Maybe mind didn't render correctly or it isn't
> quite right yet.
> 
> 
A guess. Perhaps the normal map image needs to be in a linear color 
space and not POV-Ray's default sRGB output space. Unsure whether the 
base sprite would need this too. Depends on what your game engine wants 
in the end.

You can specify the output file gamma to use (for PNGs) in your ini 
file. However, if the base image needs sRGB and the normal image map a 
linear representation, it might be easier to use the command line. For 
just the normal map image something like:

povray +ua +k0.0 File_Gamma=sRGB +am2 +a0.1 +r3 +oI.png BaldEagle.pov

povray +ua +k1.0 File_Gamma=1.0 +am2 +a0.1 +r3 +oN.png BaldEagle.pov

for two images using different color space encodings.

Bill P.

Aside: Anyone know if there is a short flag for File_Gamma? Looked like 
no, but not had my morning coffee.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.