Doom3world

The world is yours! Doom 3 - Quake 4 - ET:QW - Prey - Rage
It is currently Wed May 22, 2013 7:13 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: [Help] Shadows in the Doom 3 engine
PostPosted: Sun Jun 10, 2012 10:26 am 
Offline
The first 10 posts have been the best...

Joined: Wed Jun 06, 2012 5:56 pm
Posts: 22
Hey, i would be happy if i've got an actual reply from some coder this time. What i'm asking is, how can i change the way the shadows are rendered? I've seen many mods(like Sikkmod) do this, and i just want to grasp the general concept. Is it SDK work? Is it shaders? Please, if someone would be kind enough to explain this or point me to a tutorial, i would be grateful.


Top
 Profile E-mail  
 
 Post subject: Re: [Help] Shadows in the Doom 3 engine
PostPosted: Sun Jun 10, 2012 11:49 am 
Offline
missed 400 shots

Joined: Tue Dec 06, 2011 8:05 pm
Posts: 418
Sikkmod was developed before the gpl release so his new graphical features are a "engineering marvel" basically because his stuff works with all the code thats exposed from the engine to the game module. This also the reason why his stuff is "slower than it should be", hes been doing a lot of work since than so I can speak for his stuff now he can talk to you more about it.

They are plenty of ways do make the shadows in D3 more visual appealing(feathered edges, etc), but there isn't a tutorial atm to show you how to do that. What I choose to do in idTech 4 CDK is I completely dropped the stencil shadow code and went with Shadow Mapping instead. If you take a look at "renderer/draw_exp.cpp" there is shadow mapping code there and it works if you can re-create the corrisponding arb shaders to go along with it. This implementation doesn't work on the world though, and only works on entities. You can take a look at my code at https://idtech4cdk.googlecode.com/svn/t ... /renderer/:

Specfically:

tr_shadowmap.cpp
tr_shadowmap_cache.cpp
tr_shadowmap_cache.h

and at https://idtech4cdk.googlecode.com/svn/t ... nderprogs/

depth.crp
shadow.crp

What it really comes down to is knocking out a simple app thats seperate from the D3 code that can do whatever shadow system you want to do and transpose that over to the d3 codebase.


Top
 Profile E-mail  
 
 Post subject: Re: [Help] Shadows in the Doom 3 engine
PostPosted: Sun Jun 10, 2012 2:37 pm 
Offline
The first 10 posts have been the best...

Joined: Wed Jun 06, 2012 5:56 pm
Posts: 22
What i want to achieve is to make the pitch-black shadows disappear. If these shadows are there due to the stencil shadows(if that's what you've said), i will have to try and get shadow maps to work on the world... Although i don't have so much hope. Thanks for your reply and for the code you've linked. If there is a way to remove the pitch-black areas (and make them simply dark) without needing to re-write the system, please tell me :)

Also, what are arb shaders? I don't have a good insight of this in general.

Edit: I've found no draw_exp.cpp in the Doom 3 SDK. I'm either using an older version of the SDK, or you were referring to your code, which does have this file.


Top
 Profile E-mail  
 
 Post subject: Re: [Help] Shadows in the Doom 3 engine
PostPosted: Sun Jun 10, 2012 2:51 pm 
Offline
did just hit his 750th monster
User avatar

Joined: Fri Jul 10, 2009 6:32 pm
Posts: 782
then you simply need ambient light...included in sikkmod (and toggleable in the menu), or the original one done here by rebb I think....search for ambient light shader on this board...

_________________
BoreDooM


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group