POV-Ray : Newsgroups : povray.general : Generate normal map : Re: Generate normal map Server Time
24 Apr 2024 22:05:22 EDT (-0400)
  Re: Generate normal map  
From: Josh
Date: 3 Oct 2019 03:15:01
Message: <web.5d959f5d892ac19bde26add0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "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!
>
> Can you describe / link to your game engine?
> Provide an example of the mesh file and what the requirements for the "sprite"
> and the normal map are?
>
> If you plug the three vertices of each triangle into the plane equation, you get
> A, B, C and D and that will give you the normal vector.
>
> I'm assuming that you want some sort of even, shadowless 50% gray "ambient
> light" result from the render so that it can be _re_lit in the game engine using
> that as a starting point...   But without specifics, I'm only guessing and can
> only help you so much.

Sorry for the slow reply. I am using the godot game engine (godotengine.org) to
make a 2D game. So I am just trying to generate sprites, one of the asteroid,
and another of the normal map. You can see the kind of assets I am using by
looking at the space ships here
https://millionthvector.blogspot.com/p/free-sprites_12.html

With a 2D sprite of a spaceship and a normal map, the game engine is able to use
lights to make it appear as if the scene is a fully rendered 3D scene. The space
ships with lights look amazing, and obviously it doesn't cost the rendering time
of 3D.

So I was wanting to add asteroids using a similar method. I have found nice
looking asteroids online, but none with normal maps. So I found a povray script
to generate asteroids and am now trying to modify it to generate a 2D sprite of
the asteroid along with a normal map.

When I get more time I can give more detail. Thanks for your help.

I found this thread which looks helpful, but so far haven't managed to get
everything working.

http://news.povray.org/povray.advanced-users/thread/%3Cweb.4500845a5dce606226c7adc80%40news.povray.org%3E

Josh


Post a reply to this message

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