Game Development Community

dev|Pro Game Development Curriculum

TGE Patch: Terrain Bump Mapping

by Tim Gift · 05/12/2003 (9:36 am) · 85 comments

Download Code File

[Notes from Chris]
...
Also, one thing that should be noted is that in putting in BumpTexture and InvertedBumpTexture texture types into gTexManager, both BumpTexture and InvertedBumpTexture both use trilinear filtering only because bilinear looks horrible. You can really see a sharp contrast between mip levels.

And, the bump texture I provided is detail1.png with a contrast filter on it using MS Photo Editor, and I noticed as I zoomed in that there are seems long 1 side. So, it tiles perfectly in one direction, but not the other. But, you can't tell unless you zoom in. So it may need to be replaced with an actual bump texture example.
#61
06/04/2003 (4:59 am)
@Eric make sure your command line is correct. Here is mine.

C:\Bump_test\torque>patch -p0 <..\bump3.patch

Don't put a space between .. and \bump3.patch

That will cause an Access Denied
#62
06/04/2003 (5:43 am)
? Just wanted to know if anyone has this working on an ATI card ? I know Tim Gift has had problems with his ATI card while using the resource. I only have Nvidia based cards and I was curious.
#63
06/04/2003 (7:15 am)
ok, doing better, in the earlier example of how to runt he patch they used a / instead of a \ so once I changed that right before the bump3.patch it worked, however I seem to be getting some errors

Hunk #1 FAILED at 1.
Hunk # 2 FAILED at 47.
Hunk # 3 FAILED at 74.
Hunk # 4 FAILED at 347.
Hunk # 5 FAILED at 403.

and it produced a file with more error stuff I think... this is basicaly a clean version of torque except I have been using it for testing stuff, I've added some stuff to the terrain for cartoon rendering, changed the terrain to a solid green texture and added a laserbeam weapon to my scortched planet mission, would that be causing problems?
#64
06/04/2003 (7:19 am)
Possibly. My bet would be the cartoon rendering stuff. I would back up what you are working on and dl a fresh head with nothing added and then try.
#65
06/04/2003 (7:47 am)
ok, tried doing this with a fresh head, with that I've only gotten hunk 3 to work. It keeps giving me crap about not being able to rename newmission.mis to newmission.mis.orig, it says the file exists, even when I delete it before running the patch. man I hate patches, I wish I could just edit code like in all the other resources :(
#66
06/04/2003 (8:35 am)
Hmm... I haven't had that happen to me. I don't even have a newmission.mis.orig

You may want to e-mail Chris "Hobbiticus" Weiland

www.garagegames.com/my/home/view.profile.php?qid=8052
#67
06/04/2003 (11:54 am)
You checked out your cvs stuff as readonly. Find all files in c:\...\torque, select all, then uncheck readonly. If that still doesn't work, then I need some more info to help you out :)
#68
06/06/2003 (7:57 pm)
This patch looks even better if you add this code change.
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3789
#69
06/07/2003 (5:35 am)
Thanks Mark I have been meaning to do that those little lines are annoying. :)


Coz
#70
06/09/2003 (1:41 pm)
Let me reiterate Michael's question. Is it working with ATI? Tim?

If not then I am not going to bother with the patch?
#71
06/09/2003 (1:46 pm)
So does it work with ATI? We never heard back from Tim after Chris patched the patch.
#72
06/10/2003 (8:04 pm)
I'm heading out to Eugene to intern at GG within a week, so I'll give him what for :)

Ok, the last patch I put up almost fixed the problem. We tested it on Tim's machine, and it had texture filtering issues, and I have no idea why. I'm using trilinear texture filtering so that you don't see fugly mip map lines, but apparently ATi cards have issues with that. I'm going to be researching the issue to see if I can fix it.
#73
06/19/2003 (12:45 pm)
Hi All,

I'm having big problems applying this patch, I'm probably missing something but I can't figure out what. Could someone help me please?

I've downloaded the HEAD version of the source, using WinCVS without a revision tag. All seems fine, the project compiles etc. I then downloaded bump3.patch and the bump detail texture, and put them in the right places. When I run patch, all hunks and all files fail:

patch -p0 < bump3.patch

patching file `engine/dgl/gTexManager.cc'
Hunk #1 FAILED at 952.
Hunk #2 FAILED at 1025.
Hunk #3 FAILED at 1094.
Hunk #4 FAILED at 1155.
Hunk #5 FAILED at 1169.
Hunk #6 FAILED at 1189.
6 out of 6 hunks FAILED -- saving rejects to engine/dgl/gTexManager.cc.rej
patching file `engine/dgl/gTexManager.h'
Hunk #1 FAILED at 35.
1 out of 1 hunk FAILED -- saving rejects to engine/dgl/gTexManager.h.rej

etc...

Reject files are all created in the correct places, but not a single change is made. Please help my sanity!!

Thanks,

]DaZMaN[
#74
06/19/2003 (5:14 pm)
Your files are probably readonly. WinCvs defaults to readonly when you checkout, so make sure it doesn't do that. You'll have to either change each file manually or checkout a new version without the readonly option selected.
#75
06/20/2003 (4:44 pm)
I updated the resource again (bump4.patch). And, after a few hours of fiddling around with this thing, I am 99% sure that the problem does not lie in the code but rather in the ATi drivers. There is no compression, anisotropy, difference in texture loading, no differences at all between the textures I use/apply and the rest of the textures in the engine. So I can only assume that since this works on the GeForce platform that it is another one of those good 'ol ATi driver bugs. I'll be taking another look at it since this will probably make it into the head at some point, so I want to make sure it's as polished as can be.
#76
06/27/2003 (2:06 am)
Can some body please post an image of terrain with bumpmapping so I can compare it with what I've got? the patch seems to have applied itself ok, but I can't see any dramatic difference from before. an example would be really useful.
#78
07/16/2003 (2:30 pm)
Where is the patch bump4.patch located?
tried to d/l bump3 but is seems as if the site down.
could some post either patch?

thanks
#79
07/16/2003 (7:42 pm)
Steve you want bumpy.patch that is the newest version.

It is under Chris "Hobbiticus" Weilands first post in this thread where it says "THIS"


Coz
#80
07/17/2003 (5:07 am)
Thanks Michael