Gouraud shading for models?

Moderator: Graf Zahl

User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Gouraud shading for models?

Post by Nash »

The 3-d models look a little flat in GZDoom at the moment. Do you have any plans to add gouraud shading for them?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

That would need illmination by dynamic lights - which hasn't been implemented yet.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Come again? Aren't the models already illuminated by the dynamic lights? Or am I misundertsanding what you said?

The lighting seems correct for me...
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

The models are illuminated as a whole. In a perfect system they should be lit per vertex. To get Gouraud shading to work I need different light levels at different vertices. Unless that isn't the case there won't be any difference.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

I see... hope you implement it someday.
jaquboss
Posts: 12
Joined: Thu Feb 02, 2006 15:43

Post by jaquboss »

rather old topic but...
I think you can load model normals and use glLight() as it looks perfect and you won't have much problems :wink: unless you need Q3 shader system :roll: then you must do custom lighting code
SlayeR
Posts: 120
Joined: Wed Aug 31, 2005 6:23
Location: Somewhere
Contact:

Post by SlayeR »

Well as long as they don't have shading when they aren't lit by a dynamic light. Doomsday does that and it's one of the factors that makes them look less like the sprites. IMO the old old ZDoomGL models looked more like the originals because they didn't have the 'shiny' effect the Doomsday ones have.
DaniJ
Posts: 130
Joined: Sat Oct 08, 2005 19:22

Post by DaniJ »

Well as long as they don't have shading when they aren't lit by a dynamic light. Doomsday does that and it's one of the factors that makes them look less like the sprites. IMO the old old ZDoomGL models looked more like the originals because they didn't have the 'shiny' effect the Doomsday ones have.
Care to explain that further?
SlayeR
Posts: 120
Joined: Wed Aug 31, 2005 6:23
Location: Somewhere
Contact:

Post by SlayeR »

I don't have the doomsday models to test with at the moment but from what I can remember they were always lit by some ambient light, most noticable on spinning items/weapons etc.
DaniJ
Posts: 130
Joined: Sat Oct 08, 2005 19:22

Post by DaniJ »

What you are describing sounds like the "world light". In 3D, models should ALWAYS be lit as without that there is no definition of shape and form (like GZDoom currently).

When there are no dynamic lights in the vicinity, and neither the floor or ceiling are dominate sources of ligth - then models are lit using "world light". This is one of those instances where 3D graphics breaks the "real-life rules" on purpose due to the simplistic lighting model used in DOOM.

However, in 1.9.0 we have the new BIAS lighting model. This means that models will be lit by all light sources as they are "infinite sources of light" using line-of-sight calculations (in the current beta this is done per mobj but it will be replaced with a per-vertex system). This will allow lights behind bars to cast "approximated shadows" onto everything in the scene (including the models themselves) :shock:

Sector light levels are converted into a 3D ambient lighting grid. However there is a mechanism in place that "preserves" very bright sectors so that they still have a definite shape. As the algorithm developes, I suspect these sectors will be extracted and enhanced using another algorithm (similar to Fakeradio) that will blend the edges of these sectors too.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Welcome to an engine that is no longer Doom. I know precisely why I'll never add such features. ;)
DaniJ
Posts: 130
Joined: Sat Oct 08, 2005 19:22

Post by DaniJ »

Welcome to an engine that is no longer Doom
Oh come on. Sure the renderer is "no longer Doom" (it is definetly not Quake either, it has its own very distinctive look that isn't a million miles away from Doom) but the same can be said about GZDoom. The game logic, AI and all the other stuff is exactly the same in jDoom as that in DOOM.exe ;)

As with ALL the eye-candy in Doomsday - you can always disable it and revert to a renderer that looks pretty close to DOOM.exe (minus some crazy rendering hacks that arn't supported yet).

Both ports have changed so much about different aspects of the original engine that it is pointless to try to say which one is more like Doom. The fact that GZDoom looks like Doomsday (with most of the eye-candy disabled) makes your statement rather bewildering.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

DaniJ wrote: As with ALL the eye-candy in Doomsday - you can always disable it and revert to a renderer that looks pretty close to DOOM.exe (minus some crazy rendering hacks that arn't supported yet).
Thank god! ;) All that eye candy makes my eyes hurt. :mrgreen:

But for me the GL renderer has always been a means to an end (i.e. make it easier to add some gameplay features like 3D floors) than the end to all means. I wouldn't have a problem with playing Doom in software mode if it wasn't so much slower at higher resolutions. True color is also nice (...but I still have to get that goddamn fog right. That one annoys me most. :( )
DaniJ
Posts: 130
Joined: Sat Oct 08, 2005 19:22

Post by DaniJ »

Graf Zahl wrote:I still have to get that goddamn fog right.
I can sympathise.

Unfortunetly, OpenGL's lighting equation does not lend itself well to recreating the "DOOM-look" when it comes to fog. In Doomsday we haven't really bothered with fog yet at all because of this and just stuck to using the duck-simple OpenGL fog extension (now that we have full per-vertex lighting going on, I'm sure skyjake will be able to generate some far better (per-sector or even volumetric) fog effects, without using "funky" additional pass solutions requiring extra polys on twosided lines).
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

It would be sufficient if one could specify custom depth equations to get Doom fog right. The default linear and exponential fog equations are far too limited IMO.
Locked

Return to “Closed Feature Suggestions”