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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 1 reply
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...