Jump to content
The Dark Mod Forums

How to make material reflective?


someTaff

Recommended Posts

You either need a custom cubemap stage or... I believe there is a mirrorRenderMap method. I'll try to look up the latter when I get the chance though I believe some TDM assets have this feature already?

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

You either need a custom cubemap stage or... I believe there is a mirrorRenderMap method. I'll try to look up the latter when I get the chance though I believe some TDM assets have this feature already?

Glass? Will look to it. Can one change cubemaps for reflection as it with skin? There is cubemap creation method in Doom3, so its looks like an option.

What excuse do we have not to sculpt, and sculpt, and sculpt, until the job is done?

Link to comment
Share on other sites

yes, you can change cubemaps. whether you incorporate them into several different material defs for skins or

use a script function to conditionally enable\disable the cubemap stage is up to you. It would be cool if this was

a location system feature but you could piggy-back off of the location system via script anyway.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

The old fashioned way people made reflections in T2 was to use a semi-transparent floor texture, and then just copy paste the architecture upside-down beneath the floor. If you can spare the brushes & don't have anything else down there, that's a pretty quick & dirty way to hack it that looks pretty cool.

  • Like 1

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Nice thinking, but it doesn't translate well. Full dynamic lighting would require to separate the real from the "mirrored" area via a invisible light-blocking material AND duplicate all the light sources. How would one duplicate a torch that's hit by a water arrow? Moving a lit candle? -- Don't even think about it.

 

But from what I remember from playing with mirrors (in D3) a few years ago, it is non the less a very good idea to keep the "mirrored" space clear of any geometry. It tends to confuse the engine. Mirrors in Doom are error prone.

 

You could look it up in modwiki.net if it still were among us.

...

Oh well, archive has it.

  • Like 1
Link to comment
Share on other sites

Yes, it's mirrorRenderMap ... here is an example material:

 


textures/wdm/marble_shine
{

solid

diffusemap      textures/wdm/marble_shine_d.tga
qer_editorimage   textures/wdm/marble_shine_d.tga     
specularmap   textures/wdm/marble_shine_s.tga     
bumpmap      textures/wdm/marble_shine_local.tga

{
mirrorRenderMap      256 256  // size of the texture to draw the mirror view in
blend   blend

red      0.5
green   0.5
blue   0.5

// opacity
alpha   0.7

// these may not be necessary when I finish the code
translate   0.5 , 0.5
scale   0.5 , 0.5
} // End Mirror effect

}

 

http://www.doom3world.org/phpbb2/viewtopic.php?f=1&t=617&start=0&st=0&sk=t&sd=a

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

But from what I remember from playing with mirrors (in D3) a few years ago, it is non the less a very good idea to keep the "mirrored" space clear of any geometry. It tends to confuse the engine. Mirrors in Doom are error prone.

 

Interestingly for a similar reason I mentioned. Apparently the engine is literally rendering a reverse scene in that space. I recall that you could even have geometry there, but it's very important that the leaf of the original room is sealed so it doesn't leak through. Well it's probably better to do both, not have geometry there & make sure the leaf is sealed.

  • Like 1

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

A couple of final comments.

 

1) Using a cubemap will be lighter on performance than mirrorRenderMap but wont be as accurate. A blurred cubmap would be advised unless you plan

on making a bunch of different custom ones on a per-room or per-scene basis

 

2) Don't be surprised if mirrorRenderMap doesn't work. Since moving to the Doom 3 GPL engine, I have found that the noFog global keyword and

envshot command are broken. ( I had to install TDM 1.06 to collect a cubemap for the standalone replacement process.) Do a small test before

jumping in and doing a bunch of work (learned that the hard way with noFog).

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

It works witn mirrorRenderMap well!

This is regular marble with slight normal dents on surface

mtile_reg_01.jpg

And this this reflective mirrorRenderMap marble floor, with no normals on tile side

mtile_refl_02.jpg

Found opacity level best between 0.2-0.3

Should find another surface sound for that, like super-loud echoing clonck-clonck :o

Edited by someTaff
  • Like 2

What excuse do we have not to sculpt, and sculpt, and sculpt, until the job is done?

Link to comment
Share on other sites

It will make it to TDM no doubt about it! :laugh:

Just too few assets to upload for now, will biuld up and then sublit a pack

F i this door need s framing and handles and so on

doorArc_01.jpg

What excuse do we have not to sculpt, and sculpt, and sculpt, until the job is done?

Link to comment
Share on other sites

Unless that was an internal door, IMHO I don't think it would be that shiny in the TDM universe. Great tech demo pics though for sure!

Its like heavy lacker on oak, allthrough never seen no heavy lacker on oak. Will turn specular down a bit

What excuse do we have not to sculpt, and sculpt, and sculpt, until the job is done?

Link to comment
Share on other sites

  • 4 weeks later...

It happens mirror shader behaves quite strange when applied to large areas with many lights

scr_066.jpg

Mirroring appears only on some angles and while crouching, even partially

What can be done if anything?

Edited by someTaff

What excuse do we have not to sculpt, and sculpt, and sculpt, until the job is done?

Link to comment
Share on other sites

Not sure about the default FOV for mirror rendering...

 

Perhaps a workaround would be to use scale in the material to increase the coverage?

 

As I recall, only remote render map has the ability to control FOV (etc).

 

Maybe 7318 can look into this because it has similar code requirements to portal sky behavior?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Another workaround might be to make a duplicate material shader with a different name then

alternately texture the floor with the two textures so that it is not one continuous material.

 

(At least I've seen this tangentially referred to at Doom3world )

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...