Jump to content
The Dark Mod Forums

Glass windows Instead of textures


Recommended Posts

I remember on the old computers for performance issues you always had to use textures as Windows for houses. However with modern computers I wonder if anybody actually made some tests with glass windows that can be seen through.

It always bothered me that I can't take a sneak peek into the house I'm going to break into.

How do you feel about this? Is it worth the performance loss? Has anyone ever tested this scenario? I'm really curious to hear your thoughts on this.

Edited by SeriousToni

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to post
Share on other sites
  • SeriousToni changed the title to Glass windows Instead of textures

Psst! Check this out:

 

We can now simulate interiors much better!

 

 

OTOH:

You can have clear windows everywhere but that will impact performance so you have to weigh the costs verse benefits.

Sice 2.09 performs so much better, there is more headroom to try this now.

  • 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 post
Share on other sites

Thank you! But I understand thattthe topic you linked is for rooms only that the player isn't able to enter later in the mission, correct? And it looks difficult to setup. For mansions you are able to enter it would be so nice to peek through the windows and see what's inside (treasure, patrolling ai, etc.) :)

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to post
Share on other sites

The smooth distance-based portals that Q4 had would have been perfect for this.  It would enable windows to block vis until the player is at a certain distance, then fade in.  If done with care, a placeholder texture (or even cubemap, etc) could disguise this effect nicely, and everything could be a smooth transition.

Don't think Doom3 engine had this feature, though.

Link to post
Share on other sites
19 minutes ago, LDAsh said:

The smooth distance-based portals that Q4 had would have been perfect for this.  It would enable windows to block vis until the player is at a certain distance, then fade in.  If done with care, a placeholder texture (or even cubemap, etc) could disguise this effect nicely, and everything could be a smooth transition.

Don't think Doom3 engine had this feature, though.

You can force visportals closed based on distance, so you could do something like this if you wanted.  I don't think there is a "fade" ability though, so you would have to hide the change somehow.

  • Like 1
Link to post
Share on other sites

The fading could be mimiced via proper materials and some script. On large distances you use an opaque window texture with the visportal closed. When close enough so that the visportal is open, you use the translucent version. Switching can be done via skins. The translucent version would need an additional layer that makes it appear like the opaque version and said layer needs to get fade out when approaching the window. Obviously the quality of the result will depend on the textures used.

@SeriousToni: Builder Roads features glass windows and my Old Habits rebuild either iirc.

 

  • Thanks 1

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites

My memory isn't the best, but I recall the Q4 portals I mentioned would adjust its fading based on player distance, a value directly related to player distance, as opposed to boolean trigger an ultimate fade in or out.  Correct me if I'm wrong but that sounds tricky with scripting workarounds.

Link to post
Share on other sites

Haha, I've made some locations in my current map where you can see the interior and guess what, I just built them without any fancy stuff ;)

Yes I know it may "steal" resources away from the rest of the scene, but it's a quite small area and I usually hide most of the interior scene with curtains so you just can see a sliver of the internal room.

I'm also planning to create some wall/window modules with see through glass...

  • Like 1
Link to post
Share on other sites
9 hours ago, Obsttorte said:

The fading could be mimiced via proper materials and some script. On large distances you use an opaque window texture with the visportal closed. When close enough so that the visportal is open, you use the translucent version. Switching can be done via skins. The translucent version would need an additional layer that makes it appear like the opaque version and said layer needs to get fade out when approaching the window. Obviously the quality of the result will depend on the textures used.

@SeriousToni: Builder Roads features glass windows and my Old Habits rebuild either iirc.

 

Isn't that what the LOD system is for? At least this was the first thing that came to mind for me. You would just have to add the force closed visportal. Or does this not work in this case?

Link to post
Share on other sites
3 hours ago, Destined said:

Isn't that what the LOD system is for? At least this was the first thing that came to mind for me. You would just have to add the force closed visportal. Or does this not work in this case?

That is right, but it will be binary. So the portal is either closed or opened. The issue is that the switch between those two states can be rather abrupt, especially when happening on close distances due to performance limitations, and thus be noticeable to the player. You can see such issues even in AAA titles if you look carefully enough. So the mapper should try to disguise this switches if possible. Another thing is that if the portal opens and the scenery behind the window is compareable bright, it will make said switch pretty obvious either. Hence the idea of an alternative skin that takes this into account. However, the exact setup is dependent on the exact situation.

12 hours ago, LDAsh said:

 Correct me if I'm wrong but that sounds tricky with scripting workarounds.

If you combine scripts and proper materials this is doable. It may not yield the same quality as the Q4 portals you've mentioned (never worked with them, so I can't judge on this), but it doesn't have to be perfect either way. The goal is just to make it less obvious to the player that the portal is not translucent on long distances.

12 hours ago, Fieldmedic said:

Haha, I've made some locations in my current map where you can see the interior and guess what, I just built them without any fancy stuff ;)

Yes I know it may "steal" resources away from the rest of the scene, but it's a quite small area and I usually hide most of the interior scene with curtains so you just can see a sliver of the internal room.

No issues with that. As said I've done so myself in the past. But as you state yourself you use it in a small area without "any fancy stuff". In larger or generally higher detailed areas (exterior or interior, doesn't matter) this can get problematic, though, and this is were the magic of LOD comes into play.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to post
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.

×
×
  • Create New...