MantisBT - Zandronum
View Issue Details
0000667Zandronum[All Projects] Suggestionpublic2012-02-05 09:212014-06-13 18:52
StrikerMan780 
 
normalfeatureN/A
acknowledgedreopened 
 
 
0000667: Simple Goraud Shading option in MODELDEF for Models
I'm requesting that some basic Goraud shading could be implemented as a GORAUDSHADING option for MODELDEF, basically applying some simple, smooth Goraud shading to keep some models with simplistic skins from looking too flat.

I primarily intend on using this for HUD weapons, but could be useful for normal models too, thus I suggest making it optional, since it may look good on one model, and not the other. Also, if used on HUD models, the shading should shift on the weapon as you look around, much like Quake 2, or Unreal 1 does so.

Just in case any info is needed:
'http://en.wikipedia.org/wiki/Gouraud_shading [^]'
'http://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/lighting.php [^]'
'http://web.media.mit.edu/~gordonw/OpenGL/index.php [^]'
No tags attached.
Issue History
2012-02-05 09:21StrikerMan780New Issue
2012-02-05 16:06Torr SamahoNote Added: 0002570
2012-02-05 16:07Torr SamahoStatusnew => feedback
2012-02-05 19:53MinigunnerNote Added: 0002574
2012-02-05 20:30MinigunnerNote Edited: 0002574bug_revision_view_page.php?bugnote_id=2574#r1281
2012-02-05 20:44MinigunnerNote Edited: 0002574bug_revision_view_page.php?bugnote_id=2574#r1282
2012-02-05 20:44MinigunnerNote Edited: 0002574bug_revision_view_page.php?bugnote_id=2574#r1283
2012-02-05 20:57Torr SamahoNote Added: 0002575
2012-02-06 06:06StrikerMan780Note Added: 0002577
2012-02-06 06:06StrikerMan780Statusfeedback => new
2012-02-06 06:07StrikerMan780Note Edited: 0002577bug_revision_view_page.php?bugnote_id=2577#r1285
2012-02-06 06:08StrikerMan780Note Edited: 0002577bug_revision_view_page.php?bugnote_id=2577#r1286
2012-02-06 06:09StrikerMan780Note Edited: 0002577bug_revision_view_page.php?bugnote_id=2577#r1287
2012-02-06 06:09StrikerMan780Note Edited: 0002577bug_revision_view_page.php?bugnote_id=2577#r1288
2012-02-06 06:10StrikerMan780Note Edited: 0002577bug_revision_view_page.php?bugnote_id=2577#r1289
2012-02-06 13:24StrikerMan780Note Edited: 0002577bug_revision_view_page.php?bugnote_id=2577#r1290
2012-10-20 20:06StrikerMan780Note Added: 0005143
2014-06-12 20:36WatermelonNote Added: 0009170
2014-06-12 20:36WatermelonStatusnew => closed
2014-06-12 20:36WatermelonResolutionopen => waiting for zdoom
2014-06-13 17:51StrikerMan780Note Added: 0009228
2014-06-13 17:51StrikerMan780Statusclosed => feedback
2014-06-13 17:51StrikerMan780Resolutionwaiting for zdoom => reopened
2014-06-13 18:52WatermelonStatusfeedback => acknowledged

Notes
(0002570)
Torr Samaho   
2012-02-05 16:06   
AFAIK with the current lighting model, Goraud shading is completely pointless, i.e. it looks identical to flat shading. So I guess what you are actually asking for is a completely new lighting system?
(0002574)
Minigunner   
2012-02-05 19:53   
(edited on: 2012-02-05 20:44)
The GZDoom renderer has no shading method at all, actually. All faces have the same brightness. Because of that, I would like flat shading with no specular lighting and with the assumption that the light source is always above the model and offset horizontally for the side facing the player to be lit up more; however, i think that dynamic lights should light the model evenly to avoid further resource usage.

  L
    \
P-->M

L = Light Source; P = Player View; M = Model

(0002575)
Torr Samaho   
2012-02-05 20:57   
> The GZDoom renderer has no shading method at all, actually.

That's not completely correct, the problem is the lighting system itself. There are no directional lights whatsoever, that's why there is no shading. And that's because the Doom maps don't have any directional light information, they just have sectors that are uniformly illuminated at the same light level.

> Because of that, I would like flat shading with no specular lighting and with the assumption that the light source is always above the model and offset horizontally for the side facing the player to be lit up more;

That would look pretty weird. As if the player is running around with a flashlight mounted above his head. Not to mention that it will look even more weird that the models are lighted differently from the walls / floors / ceilings.
(0002577)
StrikerMan780   
2012-02-06 06:06   
(edited on: 2012-02-06 13:24)
Well, I'd suggest for models outside the HUD, have the light source be based on the player's viewpoint... Like, coming from the player. Also, perhaps from nearby dynamic light points. To prevent it from looking too weird, perhaps give it very little contrast, meaning faces of an object away from the source wouldn't just drop to black, it would only be very slightly darker. The intensity of the lighting should be affected by sector brightness too, so that models in a dark place just don't get lit up bright when up close as if.. as you said, the player had a flashlight on their head.

As for HUD models, the light source would be static, but, relative to where you are looking angle and pitch wise... so that way the lighting shifts as you are looking around. Perhaps Dynamic lights could affect it too, giving colored lighting based on their position relative of the player.

Sort of like this(look at the weapon, and the ball to the right for examples of both. Ignore the HDR..):
'http://img403.imageshack.us/img403/3655/nerfdirect3d10.png [^]'

(0005143)
StrikerMan780   
2012-10-20 20:06   
It appears that Doomsday does this... I'm not sure how though. Perhaps that can be used as a reference?
(0009170)
Watermelon   
2014-06-12 20:36   
Since Torr is the only one capable of this and he's most likely too busy, I will say that you should request it from GZDoom unless Torr decides he wants to do this. If you disagree with closing, please contact Torr through forum PM.
(0009228)
StrikerMan780   
2014-06-13 17:51   
GZDoom feature requests have been closed for a long time, so It's either here or nothing.