Doom3world

The world is yours! Doom 3 - Quake 4 - ET:QW - Prey - Rage
It is currently Thu Jun 20, 2013 3:38 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Blurry reflections - possible?
PostPosted: Wed Jun 27, 2012 6:32 pm 
Offline
did just hit his 750th monster

Joined: Mon Jan 01, 2007 5:13 am
Posts: 872
Location: TX, US
Is there a way to achieve blurry reflections with stock Doom 3 similar to this:

http://assets2.ignimgs.com/2010/06/16/s ... 239902.jpg


Top
 Profile  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Wed Jun 27, 2012 9:31 pm 
Offline
picked up 200 ammo

Joined: Tue Jan 12, 2010 1:01 pm
Posts: 261
Location: The Ylside Bunker
Hi

That sort of effect is absolutely possible in the standard IDTech4 engine. You will need some custom materials and the effect is quite performance expensive.

Here is a screen shot from an example I just created to show you the effect.

http://imageshack.us/photo/my-images/44 ... 0046s.jpg/

Thanks

_________________
Arx - End Of Sun TC.
Arx - End Of Sun TC. (ModDB)
Hexen:Edge of Chaos TC.


Top
 Profile E-mail  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Wed Jun 27, 2012 9:38 pm 
Offline
did just hit his 750th monster

Joined: Mon Jan 01, 2007 5:13 am
Posts: 872
Location: TX, US
Cool. How exactly did you do that (with samples, if you can) ? Thanks.


Top
 Profile  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 12:38 am 
Offline
Very Senior Forum Poster
User avatar

Joined: Sun May 29, 2005 10:02 pm
Posts: 7096
Location: Here, not there.
this might help: http://www.sterlingshield.net/home/stev ... uly05.html

_________________
Fuzzy Logic Inc
PAINTBALL DOOM 3!!!!
Check out my Q2 server! q2server.fuzzylogicinc.com :D
Doom 3, Paintball! d3server.fuzzylogicinc.com


Top
 Profile E-mail  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 12:49 am 
Offline
did just hit his 750th monster

Joined: Mon Jan 01, 2007 5:13 am
Posts: 872
Location: TX, US
Thanks, I will check it out!


Top
 Profile  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 9:48 am 
Offline
picked up 200 ammo

Joined: Tue Jan 12, 2010 1:01 pm
Posts: 261
Location: The Ylside Bunker
Hi

Also check out these links for more info:

http://www.modwiki.net/wiki/How_to_add_water

Watch out for this issue too. The only solution is to make the single player MD5 have a no-draw & solid material applied its meshes. If you just use no-draw then projectiles will go straight through your player. This technique rules out use in multi player though: viewtopic.php?t=23594

In the picture I posted there is also a blur layer too just above the reflection.

Cheers

_________________
Arx - End Of Sun TC.
Arx - End Of Sun TC. (ModDB)
Hexen:Edge of Chaos TC.


Top
 Profile E-mail  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 4:44 pm 
Offline
did just hit his 750th monster

Joined: Mon Jan 01, 2007 5:13 am
Posts: 872
Location: TX, US
The questions is what is "blur layer" and how that one is done?


Top
 Profile  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 4:53 pm 
Offline
Last man standing
User avatar

Joined: Thu Aug 19, 2004 7:22 pm
Posts: 1129
You don't need to add another surface to act as a "blur layer" but simply pass the mirror render (which defaults to "_scratch" texture) to a blur shader in another stage in the same material. Here's a shader I did for mth that does probably something like what you're looking for: viewtopic.php?p=224908#p224908


Top
 Profile E-mail  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 5:00 pm 
Offline
fired 300 rounds
User avatar

Joined: Sat Jun 28, 2008 2:17 pm
Posts: 350
Your all overthinking this. All you really want is regular material with spec etc. and a cubemap stage. Thats how it was done in the original pic. mirrorrender is too expensive unless you really need it.

I'll dig one up tomorrow.

_________________
"John Carmack needs to use more emoticons to get his message across."


Top
 Profile E-mail  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 5:16 pm 
Offline
Last man standing
User avatar

Joined: Thu Aug 19, 2004 7:22 pm
Posts: 1129
^Not to mention, buggy and incomplete. :)


Top
 Profile E-mail  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 5:21 pm 
Offline
fired 300 rounds
User avatar

Joined: Sun Jul 13, 2008 1:24 pm
Posts: 392
Not quite... I believe the effect is real time (or zoned cube maps with real time models updated in the reflection). When rendered at a low resolution, they appear blurred regardless and then with a fresnel term can look as in the first pic. Reflections are cheap enough anyway when rendered at low resolutions, and clearly here they are only on simple geometry.

_________________
Lead Designer, Team Blur Games
Visit The [TBG] User Forums


Top
 Profile E-mail  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 6:03 pm 
Offline
Invisibility
User avatar

Joined: Fri Aug 13, 2004 4:39 pm
Posts: 3659
Location: Right there! Look!
This works perfectly.

I use a reflection map on one layer using mirror.
Then I add another decal 1 unit above it with a heathaze shader, this works beautifully and in real-time.

_________________
Check out GRIMM Quest for the Gatherer's Key!
Grimm's Youtube Channel

Follow Grimm Quest on Twitter!


Top
 Profile E-mail  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 6:07 pm 
Offline
picked up the chaingun
User avatar

Joined: Mon Jul 18, 2011 5:58 am
Posts: 193
I think I came late, but I've setup a reflection mtr file some time ago for a project I never finished. It renders in real time but as said above it's performance expensive. It's cool when used with clean metalic/ceramic or other flat surfaces. I attach 2 screens I took from my testmap and then the code. If you want to use it create a mtr file called 'reflection.mtr'

http://img850.imageshack.us/img850/5818/reflec1.jpg

http://img254.imageshack.us/img254/3926/reflec2.jpg

Code:
textures/common/reflection
{
   noSelfShadow
   noshadows
   translucent
   nonsolid
   noimpact

   qer_editorimage textures/common/reflection
   {
      mirrorRenderMap 512 512
      blend blend
      alpha 0.1
      translate 0.5, 0.5
      scale 0.5, 0.5
   }
}


create a simple patch mesh and assign the common/reflection texture
you'll see a black texture in the editor unless you create a reflection.tga image yourself, but it works.
Hope this helped anyway

_________________
FFYL
------
Doom 3: S.T.A.R 1088


Top
 Profile E-mail  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 7:45 pm 
Offline
did just hit his 750th monster

Joined: Mon Jan 01, 2007 5:13 am
Posts: 872
Location: TX, US
Neat stuff.

But there is no blur in the screenshots you posted, chimueloeldragon2011 :(

Also I am wondering if there is a way to mix cubemap reflections with real reflection? For example the static world would be as cubemap reflection and certain entities (player, AI, projectiles, moving lights) would be reflected real-time. If it's possible, wouldn't it be faster than have real-time reflection of everything ?


Top
 Profile  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 7:49 pm 
Offline
picked up the chaingun
User avatar

Joined: Mon Jul 18, 2011 5:58 am
Posts: 193
Yeah I know :( Sorry about that.
However decreasing the resolution of the reflection makes the images more blury, but it looks terrible, so that's not going to help I guess... Besides it doesn't eat that much performance.

_________________
FFYL
------
Doom 3: S.T.A.R 1088


Top
 Profile E-mail  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 7:55 pm 
Offline
Last man standing
User avatar

Joined: Thu Aug 19, 2004 7:22 pm
Posts: 1129
motorsep wrote:
...Also I am wondering if there is a way to mix cubemap reflections with real reflection? For example the static world would be as cubemap reflection and certain entities (player, AI, projectiles, moving lights) would be reflected real-time. If it's possible, wouldn't it be faster than have real-time reflection of everything ?
You can suppress render entities from mirror renders but you can't mix cubemaps and mirrors. I mean, you can, but visually, it wouldn't work.


Top
 Profile E-mail  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 10:03 pm 
Offline
did just hit his 750th monster

Joined: Mon Jan 01, 2007 5:13 am
Posts: 872
Location: TX, US
What do you mean by "visually it wouldn't work" ?


Top
 Profile  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 10:05 pm 
Offline
did just hit his 750th monster

Joined: Mon Jan 01, 2007 5:13 am
Posts: 872
Location: TX, US
chimueloeldragon2011 wrote:
Yeah I know :( Sorry about that.
However decreasing the resolution of the reflection makes the images more blury, but it looks terrible, so that's not going to help I guess... Besides it doesn't eat that much performance.


It's cool, no problem. I am just still trying to get someone to show how the actual blurring of real time reflections is done. The reflections itself seems to be easy, but the blurring ....


Top
 Profile  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 10:43 pm 
Offline
Last man standing
User avatar

Joined: Thu Aug 19, 2004 7:22 pm
Posts: 1129
Here's an example material for a reflective water that uses the mirror render. You can't use this directly but it should give you an idea how to setup the material.
Code:
textures/liquids/water_mirror
{
   // discrete
   // nonsolid
   // twosided
   // water
   translucent
   // noFragment
   noShadows
   // noOverlays
   qer_editorimage textures/liquids/water.tga

   {
      blend      blend
      mirrorRenderMap    128 64
      translate   0.5, 0.5
      scale      0.5, 0.5
      // maskDepth
      program      liquid_mirror.vfp
      fragmentParm   0       time * 0.05, time * 0.1, time * 0.05 + 0.2, time * 0.1 + 0.1   // texture scrolling
      fragmentParm   1      5.0, 0.5, 0.5         // fresnel power, bias, 1 - bias
      fragmentParm   2      0.1, 0.15            // refraction distortion scale, reflection distortion scale
      fragmentParm   3      0.5, 0.75, 0.85         // refraction color
      fragmentParm   4      1.0, 1.0, 1.0         // reflection color
      fragmentParm   5      0.00390625, 1         // depth fade, fade constrast
      fragmentParm   6      0.001953125, 0.00390625   // mirror texcoord (inverse mirrorRenderMap size)
      fragmentMap      0      _mirrorRender         // reflection map
      fragmentMap      1       _currentRender         // refraction map
      fragmentMap      2       _currentDepth         // depth map
      fragmentMap      3      textures/liquids/waves1.tga   // normalmap
      // vertexColor
   }
}


Top
 Profile E-mail  
 
 Post subject: Re: Blurry reflections - possible?
PostPosted: Thu Jun 28, 2012 10:57 pm 
Offline
did just hit his 750th monster

Joined: Mon Jan 01, 2007 5:13 am
Posts: 872
Location: TX, US
And that water has no issues when player is in it? (reflection scaling)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 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