POV-Ray : Newsgroups : povray.advanced-users : Using POV-Ray to generate an RGB normal map? : Re: Using POV-Ray to generate an RGB normal map? Server Time
4 May 2024 08:39:27 EDT (-0400)
  Re: Using POV-Ray to generate an RGB normal map?  
From: Fingers
Date: 7 Sep 2006 16:00:01
Message: <web.450076e75dce606226c7adc80@news.povray.org>
"Slime" <fak### [at] emailaddress> wrote:
> > Has anybody experimented with creating RGB normal maps in POV-Ray? Is it
> > possible?
>
> Yes, I've been finding POV-Ray quite useful for the task. I have the
> following in an include file:
>

Thanks for your response! Using functions hadn't crossed my mind. Your
method is very cool, although not quite what I was thinking of. What I'm
looking for is getting the actual normal of the surface... Say you want a
wall texture with a bunch of pipes on it; you could make the pipes out of
(3D) cylinders, toruses and such, then render in an orthogonal view with a
routine that takes the surface normal at each pixel and turns it into RGB.

Your idea is going in the right direction though, as I could use a two-pass
system to first render a heightfield using gradient z and then make a
normal map with your macros. It'd have interpolation errors at the edges of
"protruding" elements but texture filtering would cause those anyway in the
OpenGL app. I'll have to experiment with this.

Thinking further, can you set the Red, Green and Blue outputs of a function
separately? If I could just use three different slope patterns, one for
each channel, this'd be a piece of cake.


Post a reply to this message

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