Game Development Community

So close.. yet so far away..

by Kevin Johnson · in Torque Game Engine · 08/12/2004 (9:37 am) · 8 replies

Ok i've made additions to materialPropertyMap to allow for a normal map to be loaded for interiors (following the code for enviroment maps).
pEntry->normalMapName = StringTable->insert(pColon);
and created an sgNormalMapPolyList to hold the geometry associated with the normal map.

in interior.cc (prepforrendering)I have
mNormalMaps[i]    = new TextureHandle(pEntry->normalMapName, InteriorTexture);
after this line executes nMormalMaps[i] holds "texture_normalmap" (which is my normal map specified in propertymap.cs)

but where do i actually load the file? because when i do a getGLName in interiorrender (rencerARB_FC):
glBindTexture(GL_TEXTURE_2D,mNormalMaps[sgNormalPolyList[i]]->getGLName());
i get a bad ptr..

any clues what i am missing?

#1
08/12/2004 (2:32 pm)
A license to TSE? ;)

Actually, the TextureHandle should load it when you specify it.
#2
08/12/2004 (3:06 pm)
Lol mr funny man..
you know i'm an EA already.. you answered a few of my questions on the TSE forum..anywho..
if the call to TextureHandle loads it then i have a bad path somewhere.. thanx :)
#3
08/14/2004 (10:22 pm)
Oops...
www.intersticesthegame.com/images/doh.png
any idea what i borked?
#4
08/15/2004 (11:44 am)
Dynamic lighting?
#5
08/15/2004 (1:48 pm)
Got it!..since i'm doing all my texture blending in the shader removing the blending code from renderlights did the trick..
#6
08/16/2004 (12:55 am)
Neat. Screeny?
#7
08/16/2004 (2:29 pm)
Okey dokey.. :)
www.intersticesthegame.com/~lagalot/images/3.jpg
whats so kewl about this is i'm adding a diffuse component to my lightmap (lightmap* normal map) and it makes the lightmap all bumpy as well..

www.intersticesthegame.com/~lagalot/images/4.jpg
#8
08/16/2004 (2:33 pm)
Oooh how groovy! nice dude!

-s