Animated normal maps?

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Hollywood
Gnoblar
Posts: 2
Joined: Tue Jan 28, 2014 8:20 pm

Animated normal maps?

Post by Hollywood »

Hey ogres, I've been playing with GMogre3d for Game Maker, and I was wondering if you could create an animated sprite character, with a normal maps applied to each frame of the animation, I'm aiming for a 2d platform game with dynamic lighting. Much like the examples given by that program Sprite Lamp, but with animations. Is it possible? Can Materials support this?
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Animated normal maps?

Post by Kojack »

Materials support animated textures (using an image list). It doesn't care how the texture is used by shaders, so it could be a normal map.
http://www.ogre3d.org/docs/manual/manua ... 05ftexture

It would be more efficient to use a texture atlas though (all the frames in one big texture), but ogre won't do that automatically, you'll need to code for it. You'd also have more control over the playback (the material texture animation is just a simple looping cycle).
Hollywood
Gnoblar
Posts: 2
Joined: Tue Jan 28, 2014 8:20 pm

Re: Animated normal maps?

Post by Hollywood »

Ok cool, thanks I'll look into it. Is texture atlas a new feature in Ogre? Cause GMogre is pretty old, but anyway thanks!

Edit: nevermind, "have to code it"...
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: Animated normal maps?

Post by scrawl »

Why would a texture atlas be more efficient? Only one animated texture frame is shown at a time, so this should not affect performance at all.
User avatar
Deee
Gnoblar
Posts: 1
Joined: Sat Oct 11, 2014 7:23 pm

Re: Animated normal maps?

Post by Deee »

I know this thread has been inactive for some months, but I think I have a solution to the main obstacle preventing people from using dynamic lighting in 2D games - the huge effort needed to create the normal maps, especially for animated characters.
I am working on a tool that generates Normal Maps for 2D sprites.
This should be a huge improvement for anyone trying to implement dynamic lighting in their 2D games, as it automatically generates Normal Maps from one single input sprite.
That way, you can have a pseudo-3dimensional animated character in just a few clicks.

Apart from Normal Maps, the tool creates Depth Maps, Ambient Occlusion Maps and Specularity Maps.
A small example of a sprite from "Boot Hill Heroes" (a game that was released on Steam yesterday - although it doesn't feature dynamic lighting):

Image

I would love to get in contact with game designers who are planning to make use of Normal Maps in their 2D game and I am looking for nice game art to show with the tool (the name is Sprite DLight) on kickstarter soon.
Post Reply