Terrain bump mapping updated
by Chris \"Hobbiticus\" Weiland · in Torque Game Engine · 07/02/2003 (10:37 am) · 11 replies
Due to the popularity of this resource, I just wanted to let everyone know that I have released what I believe to be the final version of the terrain bump mapping, which was first released in may.
What's so great about this version? The primary enhancement is that it now works using the D3D renderer and it now works on ATi cards. It's also been slightly optimized and cleaned up a bit.
However, a lot has changed in this revision, so it is necessary to undo all changes in previous patches and repatch cleanly.
If you have any problems with it, make sure to tell me as it will most likely make it into torque head at some point in the near future. Until then, have fun :)
What's so great about this version? The primary enhancement is that it now works using the D3D renderer and it now works on ATi cards. It's also been slightly optimized and cleaned up a bit.
However, a lot has changed in this revision, so it is necessary to undo all changes in previous patches and repatch cleanly.
If you have any problems with it, make sure to tell me as it will most likely make it into torque head at some point in the near future. Until then, have fun :)
#2
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4210
See my first comment.
07/02/2003 (10:46 am)
Oh...good point. It's right herewww.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4210
See my first comment.
#3
Now for the joy of finding what you changed and back porting it into TerrainManager.
07/02/2003 (11:27 am)
Ahhh that explains it. It shows as submitted by Tim instead of you.Now for the joy of finding what you changed and back porting it into TerrainManager.
#4
07/02/2003 (12:20 pm)
Nevermind I found it :)
#5
07/02/2003 (12:25 pm)
He made good use of comments in the original so it should be easy to remove the previous mod.
#6
07/02/2003 (12:26 pm)
Nice job Chris! Works like a charm. :-)
#7
www.beffy.de/beffyjsp/suck.jsp?param=http://tork.zenkel.com/uploads/pics/weird_b...
Depending on the viewing direction and the distance the texture has some weird "stripes" on it (image 1 and 3)...
has anybody else combined these two resources? I am not sure if its a problem with the DayNight stuff or the bump mapping, so I'm kinda lost where to start looking ...
any ideas?
Thx!
07/03/2003 (1:56 am)
I have a weird problem with the terrain bumpmapping (in combination with the original TGEDayNight code by JRitter):www.beffy.de/beffyjsp/suck.jsp?param=http://tork.zenkel.com/uploads/pics/weird_b...
Depending on the viewing direction and the distance the texture has some weird "stripes" on it (image 1 and 3)...
has anybody else combined these two resources? I am not sure if its a problem with the DayNight stuff or the bump mapping, so I'm kinda lost where to start looking ...
any ideas?
Thx!
#8
07/03/2003 (3:26 am)
I had that problem when I integrated this into TM though it' since been fixed. If I remember correctly it was a case of either a) Using the wrong sun vector or b) not having an fxSunlight object for the day/night code to move around (and hence causing the calls to get the sun vector to fail) c)Something else that I can't recall on 3 hours of sleep and two sips of coffee.
#9
what would be a "right" sun vector, though?
It looks like the sun vector changes constantly (well, no surprise here ;) and so the value seems to depend on the "time" you save the mission.... what values/settings do you use for the sun e.g.?
Sometimes I also have the problem that the sun seems to shine through the ground (from below, so to speak), so that shadows from buildings UNDER the terrain (e.g a tunnel through a mountain) are projected ONTO the terrain texture, which looks very weird to say the least :P Then, after changing the sun vector in the mis file and restarting solves it in most of the cases... very confusing...
07/03/2003 (3:41 am)
Hm, there *should be a fxSunlight in every mission... so that shouldnt be it...what would be a "right" sun vector, though?
It looks like the sun vector changes constantly (well, no surprise here ;) and so the value seems to depend on the "time" you save the mission.... what values/settings do you use for the sun e.g.?
Sometimes I also have the problem that the sun seems to shine through the ground (from below, so to speak), so that shadows from buildings UNDER the terrain (e.g a tunnel through a mountain) are projected ONTO the terrain texture, which looks very weird to say the least :P Then, after changing the sun vector in the mis file and restarting solves it in most of the cases... very confusing...
#10
As for the fxSunlight in every mission, it's not there unless you add it. just having a Sun object doesn't do the trick. If the day/night can't animate the fxSunLight object and move the Sun across the sky bad the Vector it returns is something odd. If your shadows change direction as time passes then it's not the fxSunlight thing and may just be an issue with the original day/night code.
Unfortunatly, my tree doesn't have the day/night code in it. Until I've got time to sit down and rework the terrain lighting so it's not always lit at high-noon I don't want to put the cycles in. In my tree I deal with terrain lightmaps differently so I can plan on building 4 lightmaps and changing them as time progresses (morning, noon, evening, dark).
07/03/2003 (4:55 am)
Couple quick things. The original implementation of the day/night code had a lot of issues so that might be part of your problem. There's a getSunVector and a getTrueSunVector (or something like that) if I r emember correctly Chris advised against using getTrueSunVector. As for the fxSunlight in every mission, it's not there unless you add it. just having a Sun object doesn't do the trick. If the day/night can't animate the fxSunLight object and move the Sun across the sky bad the Vector it returns is something odd. If your shadows change direction as time passes then it's not the fxSunlight thing and may just be an issue with the original day/night code.
Unfortunatly, my tree doesn't have the day/night code in it. Until I've got time to sit down and rework the terrain lighting so it's not always lit at high-noon I don't want to put the cycles in. In my tree I deal with terrain lightmaps differently so I can plan on building 4 lightmaps and changing them as time progresses (morning, noon, evening, dark).
#11
I think I should really undo that TGEDayNight patch (doh, this will be a pain...) and maybe try the one chris posted... or just get rid of it totally...
Thx for your help, J. Donavan!
07/03/2003 (5:19 am)
Yeah, I have added a fxSunLight for every mission... I still have the normal "Sun" in there, too... but if I take that out, the player isnt lit it seems...I think I should really undo that TGEDayNight patch (doh, this will be a pain...) and maybe try the one chris posted... or just get rid of it totally...
Thx for your help, J. Donavan!
Torque Owner J. Donavan Stanley