Jump to content


Photo

Faux inside/outside window views?


34 replies to this topic

#26 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1644 posts

Posted 05 November 2018 - 01:04 PM

And how do you plan to execute that? You'd have to make room for additional geometry (the plane), and even if you manage to take matching screenshots of interiors, there will be factors like open/closed doors, lights switched on or off, etc. These are called fake interiors for a reason.



#27 kingsal

kingsal

    Member

  • Member
  • PipPip
  • 355 posts

Posted 05 November 2018 - 01:34 PM

Hey thats pretty neat! Seems like a legit technique for buildings that are inaccessible. 


  • Judith likes this

#28 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9034 posts

Posted 05 November 2018 - 05:12 PM

And how do you plan to execute that? You'd have to make room for additional geometry (the plane), and even if you manage to take matching screenshots of interiors, there will be factors like open/closed doors, lights switched on or off, etc. These are called fake interiors for a reason.


I still think it's a valid idea for LOD.

The additional geometry would be a func_portal and you'd place the cubemap texture on the associated patch.

Then when you get close enough the portal opens and you see the real interior.

As long as lighting is static, it should be fine. And, of course, you could do what HMART suggested via material parms triggered when lighting changes or doors open.
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

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

#29 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 20223 posts

Posted 06 November 2018 - 03:17 AM

Then when you get close enough the portal opens and you see the real interior.

As long as lighting is static, it should be fine. And, of course, you could do what HMART suggested via material parms triggered when lighting changes or doors open.

The interior\exteriors will be obscured by the warp in the glass and the lead framing, so I wont have to do anything fancy like LOD. And besides going down the LOD root would require lots of extra work, that we don't really need in the small map we are working on.

 

But what is the thing Hmart is refering too..?



#30 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1644 posts

Posted 06 November 2018 - 03:40 AM

I still think it's a valid idea for LOD.

The additional geometry would be a func_portal and you'd place the cubemap texture on the associated patch.

Then when you get close enough the portal opens and you see the real interior.

As long as lighting is static, it should be fine. And, of course, you could do what HMART suggested via material parms triggered when lighting changes or doors open.

 

That's a lot of extra work with different cubemaps and scripts. And with LOD pop-in (fade-in or fade-out range doesn't work), it doesn't look so great. Suddenly the simple and elegant idea gets more performance heavy than it's worth. You'd be better off with standard LOD setup for lights, shadows, and objects inside your building.

 

There's another trick I saw in RDR 2 recently, they got opaque windows (either reflective grey or with emissive material) fading out to transparency as you get closer to a building. If you can get that to work with LOD fade in and fade out, along with proper LODs for objects inside, that should look better and take less work than making cubemaps for each window.


Edited by Judith, 06 November 2018 - 03:40 AM.


#31 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5701 posts

Posted 06 November 2018 - 04:23 AM

If you are going to use a custom envshot for every window and if you have enough of them, the additional materials (each of them would need its own) will probably cause a higher performance impact then if you just leave the windows translucent ;) Fake interiors are normally used to create the illusion of you beeing able to see through the window, so me thinks the default way to go would be to use generic envshots (maybe a few different ones) and mask them strong enough so the player does not get that it is fake. I think there was a video somewhere here in the forum of The Witcher 3 iirc that illustrates this effect beeing used in a city. Couldn't find it right now, though.


  • Judith likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#32 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 20223 posts

Posted 06 November 2018 - 02:48 PM

The additional geometry would be a func_portal and you'd place the cubemap texture on the associated patch.

Is the wiki article upto date, as it looks like the old original - http://wiki.thedarkm...title=Cube_maps



#33 HMart

HMart

    Advanced Member

  • Member
  • PipPipPip
  • 742 posts

Posted 06 November 2018 - 03:12 PM

....
 
But what is the thing Hmart is refering too..?

 
This, but was replying about the fake water reflection, for fake interiors is overkill, is a bunch of work to make different cubmaps for all windows and think of all the different states the rooms could be in. For a single pool of water is fine tho. 

 

....
 
Btw about that wiki tut even tho I didn't tested it, I think there's a way to solve the problem referred on that wiki page, the one about the light being off on the world and not on the cube map reflection, this if you want to make that trick more dynamic but is labor intensive... first make cube maps for all light states that you can have on that room (to save work don't use many lights :P ), then make a material like so for the water:

material name
{
   
   qer_editorimage .....
   
   {
         if ( parm7 == 0 )  // default cubemap all lights on
         blend         gl_dst_alpha, gl_one
         maskalpha
        cubeMap        env/env1
        texgen        reflect
    }
    {
         if ( parm7 == 1 ) // cubemap light 1 off
         blend         gl_dst_alpha, gl_one
         maskalpha
        cubeMap        env/env2
        texgen        reflect
    }
    etc...
} 
then make a script where you set the parm7 value depending on the light being off, to turn on/off the material stages, if you (the one reading this) don't know how to script you can do the same on the editor with the "target_setshaderparm", like so, target one light at one "target_setshaderparm" entity and in it, set the desired value for the shaderParm7 key, then target that "target_setshaderparm"at the water surface entity, do this for all lights. Btw this also doesn't solve the problem of movables not being updated on the cube map, so only put static objects near the water.
 
Again i didn't tested this so if it doesn't work don't blame me.  :P  (but it should work...)

 



#34 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5701 posts

Posted 06 November 2018 - 05:02 PM

If you are going to use a custom envshot for every window and if you have enough of them, the additional materials (each of them would need its own) will probably cause a higher performance impact then if you just leave the windows translucent ;) Fake interiors are normally used to create the illusion of you beeing able to see through the window, so me thinks the default way to go would be to use generic envshots (maybe a few different ones) and mask them strong enough so the player does not get that it is fake. I think there was a video somewhere here in the forum of The Witcher 3 iirc that illustrates this effect beeing used in a city. Couldn't find it right now, though.

Found it: http://forums.thedar...r-3/?hl=witcher

(The vid in the op).

 

Just take a look at the windows, especially the close-ups. The approach is pretty noticeable there. A generic cubemap, some blurring and maybe some additional effects (coloring etc...). Different cubemaps used for different types/sizes of windows, but if you investigate closely you see the repetition. The same approach was used in Thief 4 and is pretty surely used in almost all modern AAA games.


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#35 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 20223 posts

Posted 06 November 2018 - 05:36 PM

Ok in this instance I only have one map I want to try this on first, there is only a handful of interior rooms visible from outside and 2 exteriors.

 

 

After the above map I have another map I want to try this in, and that can again just be a handful of generic interiors 





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users