POV-Ray : Newsgroups : povray.general : Generate normal map : Re: Generate normal map Server Time
23 Apr 2024 20:50:00 EDT (-0400)
  Re: Generate normal map  
From: Bald Eagle
Date: 1 Oct 2019 19:25:00
Message: <web.5d93df42892ac194eec112d0@news.povray.org>
"Josh" <nomail@nomail> wrote:

> Sorry, I should have been more clear. I need to create a normal map of the
> asteroid because the generated sprite (lit only with ambient light) and normal
> map, are going to be used in a 2D game that has its own lights.

> The game engine
> uses the sprite and normal map to properly light the sprite. Also, I had found a
> script that generates the mesh, so at this point I'm just trying to figure out
> how to generate a normal map of it, and to light it with only ambient light.
> Thanks!

So, looks like we just crossed paths  :D

If you're going to use a mesh - a real mesh - then isn't that a bunch of
triangles, and the surface normal is inherent to each triangle face?

I'm not sure how your game engine interprets your input...


Maybe if you use the mesh object in POV-Ray and then "scan" the surface with the
trace () function, that will return the normal at the point that the ray
intersects the mesh.
Use a parametric sphere as the surface to scan inwards from, and then you can
write that vector data to a file in the format the engine expects it...

I think POV-Ray normal_maps do different things than your game engine does.


Post a reply to this message

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