[GZDoom] 3D model (md3) bump maping ?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
X-DOOM
Posts: 541
Joined: Tue Jul 15, 2003 5:16 pm
Location: Charlesbourg, Québec, Canada
Contact:

[GZDoom] 3D model (md3) bump maping ?

Post by X-DOOM »

Does GZDoom permit to use some king of bump map texture for md3 models?

I have done some search but i have not found anything about it for models.

Thanks.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: [GZDoom] 3D model (md3) bump maping ?

Post by InsanityBringer »

At the moment (and I don't know of any plans for this to change) gzdoom does not track normals for models, which prevents any typical bump map system
User avatar
Nash
 
 
Posts: 17503
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [GZDoom] 3D model (md3) bump maping ?

Post by Nash »

Maybe dpJudas has plans for this? ;D [hint hint]
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [GZDoom] 3D model (md3) bump maping ?

Post by Graf Zahl »

Bump mapping requires a proper lighting model, and since this does not exist, right now there's little use in adding it.
Jitan
Posts: 44
Joined: Tue Oct 04, 2011 6:32 am

Re: [GZDoom] 3D model (md3) bump maping ?

Post by Jitan »

I believe fake bump mapping is possible. But that quiet a hacky method.
User avatar
X-DOOM
Posts: 541
Joined: Tue Jul 15, 2003 5:16 pm
Location: Charlesbourg, Québec, Canada
Contact:

Re: [GZDoom] 3D model (md3) bump maping ?

Post by X-DOOM »

Graf Zahl wrote:Bump mapping requires a proper lighting model, and since this does not exist, right now there's little use in adding it.
Thanks Graf, i feared that reply somehow :(
Hope you may add this in future.
dpJudas
 
 
Posts: 3177
Joined: Sat May 28, 2016 1:01 pm

Re: [GZDoom] 3D model (md3) bump maping ?

Post by dpJudas »

Nash wrote:Maybe dpJudas has plans for this? ;D [hint hint]
As Graf points out, you need a directional light source to see the bumps. Fake contrast could represent such a direction, but to be honest I'm not sure if it would be enough or not to notice the bumps. Maybe if mixed with support for specular highlights.

Anyhow, from what I can tell on wikipedia's description of MD3, there doesn't seem to be a way to describe the texture name for the bump and specular textures. How does gzdoom map a surface name to a texture today?
dpJudas
 
 
Posts: 3177
Joined: Sat May 28, 2016 1:01 pm

Re: [GZDoom] 3D model (md3) bump maping ?

Post by dpJudas »

Having a bit of fun I patched main.vp+main.fp to sort of support fake bump mapped specular lighting. :D

It does have a few outstanding issues and probably requires the software light mode to work, but it should give a good indication of whether it is worthwhile to add real support for this kind of thing. The code does do full bump mapping, but with no way to bind such a texture in gzdoom the code is dormant for now. Likewise it uses the diffuse texture as its specular texture for the same reasons.
Attachments
fakelight.pk3
Fake specular highlights
(5.36 KiB) Downloaded 94 times
User avatar
Zanieon
Posts: 2059
Joined: Tue Jan 13, 2009 4:13 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Somewhere in the future
Contact:

Re: [GZDoom] 3D model (md3) bump maping ?

Post by Zanieon »

dpJudas... the guy who came like a wercking ball in the GZDoom's renderer, i have to say that after so many years alone, Graf Zahl finally found someone to help him with the OpenGL stuff.

If such thing gets done properly in GZD, i would be proud to make a special Industron map just to make use of these features.
dpJudas
 
 
Posts: 3177
Joined: Sat May 28, 2016 1:01 pm

Re: [GZDoom] 3D model (md3) bump maping ?

Post by dpJudas »

A wrecking ball? Not sure if that's good or bad, haha. :D I just like to help out improve my favorite version of Doom. Graf, Randi, and the rest of those that have maintained (g)zdoom over the years have been doing a great job the way I see it. 8-)
User avatar
Nash
 
 
Posts: 17503
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [GZDoom] 3D model (md3) bump maping ?

Post by Nash »

dpJudas wrote:Having a bit of fun I patched main.vp+main.fp to sort of support fake bump mapped specular lighting. :D

It does have a few outstanding issues and probably requires the software light mode to work, but it should give a good indication of whether it is worthwhile to add real support for this kind of thing. The code does do full bump mapping, but with no way to bind such a texture in gzdoom the code is dormant for now. Likewise it uses the diffuse texture as its specular texture for the same reasons.
Oh that's pretty cool! I'm seeing blood decals that look reflective on the walls (just like in Fallout 3) and just walking around the levels (especially noticeable in outdoor areas like Doom 2 MAP18), it sort of looks like the sun is giving off some specularity shine on the floor. :D

You just blew my mind!
dpJudas
 
 
Posts: 3177
Joined: Sat May 28, 2016 1:01 pm

Re: [GZDoom] 3D model (md3) bump maping ?

Post by dpJudas »

This version is too much of course, although overall I personally like the effect. I think that if the material properties (shininess, specular level, spec and normal texture) are tweaked for the individual flats we have today it could end up looking really great. Kind of how light brightmaps also look cool when used the right way.
User avatar
Nash
 
 
Posts: 17503
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [GZDoom] 3D model (md3) bump maping ?

Post by Nash »

Is the software lighting mode a strict limitation of this system? I'm developing a game that defaults to the "standard" lighting mode because I'm designing my game's brightness around that (my game is a non-Doom game and the "glowing light always attached to the player" effect of software is not the look I am going for)...
dpJudas
 
 
Posts: 3177
Joined: Sat May 28, 2016 1:01 pm

Re: [GZDoom] 3D model (md3) bump maping ?

Post by dpJudas »

No, it was just the hackiest way I could quickly figure out how to not make it do it for some of the 2D elements. In a proper implementation it would work for all light modes.
Locked

Return to “Editing (Archive)”