Impostors

Published July 31, 2005
Advertisement
A couple entries ago, I talked briefly about my new method of doing props for AE2. Given the fundamental 3D nature of the new engine, I have a few more choices than simple texture-mapped billboards for representing objects and level props. Bog-standard billboards have a tendency to behave strangely in a 3D environment, especially if the prop object they represent is large or complicated. Lighting is odd, intersections (usually inadvertent and sometimes unavoidable) with other objects betray the fundamental 'plane-ness' of the object, etc... For this new iteration of the engine, I opted to continue with props pre-rendered to image files, rather than fully 3D rendered objects, in order to preserve the potential for very high levels of detail, and to maintain the 'feel' of the game being a more traditional style.

To get around the weirdness of billboards, I elected to go with a system of what I call 'fakes' or 'impostors' for some reason. I've heard the term 'impostor' used before in regards to graphics programming, but I scarcely remember the context. It may have been an alternate term for billboards. At any rate, in AE2 an impostor is simply a very low detailed 3D model upon which is mapped the pre-rendered image of the object it represents. The model is constructed to roughly conform to the geometry of the object, and is textured so that when it is rendered in-game using AE2's orthographic projection, it appears identical to what it would have appeared had it been done with a standard billboard, but with the advantages of slightly more realistic overlap/intersection with other objects, and more elaborate lighting. As a very crude example, here is a stairway. (VERY crude; I still haven't gotten around to unpacking crap from the old Golem data archives, so I'm still using 5-minute slapped-together artwork).



The stair was modelled and rendered to a TGA in Blender:


(The screenshots are scaled down from 1024x768, hence the difference in size between this render and the screenshots.)

I then subsequently mapped it onto a simple 3 sided impostor like this:



The texturing was done so that when viewed from the angle of the game's camera, there would be no distortion or stretching of any portion of the texture, regardless of the underlying impostor geometry. The impostor was laid out on a representation of the level grid to align the vertices with level grid points, since these props extract their lighting information directly from the level grid. Thus, the lighting I can achieve is potentially more flexible than a simple billboard, with only a minor increase in complexity of the system. This is a simple example only; the advantages are better illustrated when larger prop objects are represented.

And, since the fundamental idea of impostors is fully based in 3D concepts, it would be just as simple to implement fully 3D props as well as these 'faked' ones--though I do not plan to make much use of such. The system is founded in my vertex-animated morphing mesh code, so animated props are simple to do. However, for the most part, animated props will likely be implemented using texture and/or UV animation, rather than vertex animation.

Attended another meeting of the IGDA last night. Good fun. I need to get off my ass and attend those more regularly. There are some good people that attend those meetings, lots of creative types and smart folks. We had a motivational pep-talk by one of the guys from Flashbang Studios that might as well have been aimed directly at me, being the lazy and unmotivated slacker that I am.
Previous Entry Stephen King rocks
Next Entry Gah.
0 likes 2 comments

Comments

noaktree
I think you must be an imposter! Who is this well organized new VertexNormal? [grin]

Looks great!
August 01, 2005 12:07 AM
jollyjeffers
Damn thats a clever way of doing imposters - I like it [grin]

Keep up the goood work!

Jack
August 01, 2005 06:18 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement