Jump to content
The Dark Mod Forums

A house with real windows


SeriousToni

Recommended Posts

There's a question wandering around in my head since a few weeks: Has someone ever tried to build a house with real windows (transparent) in TDM?

I know there are some FMs in Thief 2 where there were buildings with real glass windows so you could see from outside what's going on on the inside.

 

Would this be possible for TDM too? How could a good solution work in regards to visportalizing? I made a little theoretical scenario in which you can see the problems with the visportals. The player could see through the whole house if doors aren't closed which means that many rooms, lights and objects are rendered.

 

Let's take a look:

post-3542-0-08724100-1375430618_thumb.jpg

"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 comment
Share on other sites

Of the FM's I've played so far for TDM, Obsttorte's, "The Builder Roads", and Tr00pertj's, Solarescape1, have had transparent windows in houses. I'd take a look at these maps.

 

I believe also for TDM 2.0 there will be cubemaps for windows so that instead of visportaling them you can use a cubemap to show the interior space and it won't have the hit on performance however you wouldn't be able to see people inside, I don't think.

Edited by Lux
Link to comment
Share on other sites

Sure, it is possible to do that, but it will cost you a lot of performance. Think about it like this: for each encapsulated scene you have X amount of tris you can use so that performance is acceptable. If you have more than X tris your mission starts to choke.

 

When you keep windows closed, you have X for the house interior. And you have X for the yard outside. If your windows are open, you have X for BOTH interior and exterior.

 

You can do it, but you must then keep the tris counts lower for those areas. When I built KM, I wanted to have some windows open so the yard was visible: it simply was not feasable. Closing the windows gave a performance boost which was much more important than the visuals.

 

I think there EXISTS a way to get both, but it has not been explored or tested yet. Modular building and LOD models. Construct interior and exterior with modules that have 2 LOD stages, based on player distance to them. When the player is near the object, it has full detail. When the player is far away, he only sees a simple representation of the object. That way the tris counts could be kept at the sane levels even when the player can see a lot of areas. This applies to furniture as well: the house interior furniture should scale similarily and small objects or bottles and plates should not be drawn there when the player is outside.

 

It might be doable, with crude geometry now. It might be doable at full detail geometry with LOD models.

  • Like 1

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

A visportal is only opened when it intersects (in screen space) with the (open) portals through which you're looking at it. If you don't place doors and windows in a line you can limit what is visible from some point of view. There's also the possibility to close portals based on distance from the player.

 

You can use the cvar "r_showportals" to visualize this in game.

Link to comment
Share on other sites

Visportal opening is FOV-dependent!

 

Anyways, this can be accomplished using a good building style, where a case such as described by you is not possible due to door/window placement. The performance impact however depends on the amount of models (tris) and shadow-casting lights used. For the latter case I've created a script object a while ago that can turn shadow-casting off on lights if needed.

 

Basically I think that for a mansion style mission performance shouldn't be a big deal. You can tweak areas that don't perform well afterwards.

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

I don't consider polygon count an issue. There is certainly a point where you can have too many but it's not the polygons you create that are the problem. It's the resulting shadow volumes (constructed with polygons) that kill performance. The engine has an easy fix for that though. Disable shadows on everything that doesn't need them and for those things that do, use a shadow mesh.

 

If you built that scene in all it's glory minus textures It would work just fine. Or again minus lights. All this without a single visportal. It's when you have lots of lights and textures in view that it starts getting taxing.

 

You can reduce the number of both lights and textures in view by shuffling doors and windows around to accommodate visportals. If you can't compromise on that you have to reduce texture count, light count, or come up with a crafty way to cheat like cube maps. The only problem with cube maps is that they don't handle parallax well and if you get close you'll be able to see that it's just a texture. There are some

that could be used in the future though.

 

Didn't TDM recently get some work done on sky portals so it moved around with the player? That might be one way to fake it. You could create a version of the interior that's really just a camera mapped cardboard cut out. Texture it with screenshots and you wont need any lights for the added detail. But there are always downsides so you'll have to experiment to find out what they are.

 

At any rate it's all a matter of how much work and thought you want to put into it. There's always something that can be done.

Edited by rich_is_bored
Link to comment
Share on other sites

It is a real issue, and not easy to pull off. We had a map segment in the campaign that had a lot of transparent windows, and had to make some of them non-transparent (covered with shutters) for performance-related reasons.

 

If you know what you are doing, you can build convoluted architecture, which is great because it looks interesting, realistic, and visportals well, and that takes care of some of the issues. But you still have the issue of sound propagation; your construction can easily "leak sounds", at least until 2.0 where visportals can be given a more fine sound loss behaviour even when they are open.

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

I too have wondered why we cant get transparent windows without the lag but basically until we hit 2.0 we can't do it right? Because we need those cubemaps?

 

I'm guess why in other games such as say Skyrim when you enter a house you have a loading screen and can only see the inside of the house and to leave is the same solution.

Link to comment
Share on other sites

Cube-maps can be used in 1.08. 2.0 introduces transparent visportals, that can occlude sound but can be seen through. Without those, people on the other side of a window will sound like they're right beside you (see Solar Escape).

Link to comment
Share on other sites

TDM 2.0 also has 7318's skybox. And TDM 1.07 introduced the ability to close portals with LOD entity's so you can have a cubemap far away the have a real window up close... See the Seed system thread for details.

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 easyest is to have a wall.. or static building opposite of the windows and have the windows sit in a portique \_/"""""\_/

then you can only see trough the window when passing it. not very advanced but it works, and for the look-trough you can have doors auto-close.

Edited by Garreth

Taf you, you taffin taffer

Link to comment
Share on other sites

  • 5 months later...

I'm trying to do this in my current WIP.

 

rhuj.jpg

 

The only exception being the foyer as that will mean rendering both the outside of the manor and the foyer at the same time. Every other room will have a window with a snowy landscape to look out on. Performance wise this shouldn't be a porblem. All AI are confined to the inside of the manor and exterior is quite minimal. Some snow patches, trees and a few wooden huts. Only one func_emitter has to be placed near the windows to give the illusion that it's snowing all over the landscape.

Edited by Sir Taffsalot
  • Like 1

"I believe that what doesn't kill you simply makes you... stranger"

 

The Joker

Link to comment
Share on other sites

I did one of these yesterday afternoon too. This is the front window from the Gothic Cottage in Stourhead estate, here copied from a photo on my phone and built with patches. Textures are temporary of course.

 

post-29566-0-77504400-1389029109_thumb.jpg

 

I'm not going to worry about optimisation until I've put more detail (and doors!) in. Then I'll know whether I will get away with the see-through window. Premature optimisation is to be avoided imo: you end up with complicated solutions that might not have been needed. I'm hopeful I won't have to do anything, as the building is easy to portal and only 1 room needs be rendered inside.

  • Like 3
Link to comment
Share on other sites

That looks quite appealing. If you can portal it off, it should not pose a huge problem.

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

Thanks. I thought so too when I saw it on a visit to Stourhead 2 weeks ago :)

 

I used Hazy warp texture both inside and outside while building it, but I need to fix the inside texture. It makes the exterior look brighter than it should be. Am I right in thinking all the current glass textures add brightness to the background? I remember seeing a post by Springheel somewhere that said you could use blend->filter instead of blend->add in the material properties to achieve the right effect when looking out from the brighter side of the glass, but I haven't yet found a standard texture that does it.

Link to comment
Share on other sites

It's a pretty window, but...

 

I've designed a few FMs now and it often seems real see-through windows are not very good idea. Use them if they have an imporant *gameplay* purpose (i.e. player access point), but using too many of such make the comparmentalization a chore and performance poor. I wouldn't recommend doing see-through windows for pure aesthetic reasons. I'd prefer solid 60 fps area with closed windows over fluctuating 20-30 fps area with see-through windows without a gameplay purpose.

 

But of course, it depends on the environment. If the exterior is simple and the interior is a small room, why not, but remember that doors can be left open, and AI open/close them all the time. Having an exterior VP area open to two or three interior areas is bound to get very laggy.

 

I know this from several missions. For example, in LQD was very eager to make the LQ's bedroom window see-through to the courtyard. I tested it with trasparent glass and closed window, and the performance difference was so significant I decided to make the windows closed.

 

A clever person might use a distance based VP that closes the window when the player is far away. You could make an non-see-through version of that windows set and when the player is far away, just hide the see-through version and activate the non-see-through window, plus close the VP.

 

 

I'm not going to worry about optimisation until I've put more detail (and doors!) in. Then I'll know whether I will get away with the see-through window. Premature optimisation is to be avoided imo: you end up with complicated solutions that might not have been needed. I'm hopeful I won't have to do anything, as the building is easy to portal and only 1 room needs be rendered inside.

 

In my opinion building with optimization in mind is important in the whole map design. Designing the mission with visportallization in mind is *key* in making a functioning mission. Don't let my views discourage you, but just be prepared to hit some possibly frustrating optimization runs with an approach like this. Please make sure you have a plan B if it looks choppy.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I've got one in my WIP, and it works quite well. Though I kept the house VERY small. I loaded in the small run-down farmhouse model and recreated it from brushwork. Then I used the clear yellow (warped?) glass in the windows.

This is definitely worth doing on little cabin-type houses.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

It's a pretty window, but...

No worries, if I have to block out the windows it'll look almost as pretty. Thanks for the tip-off... I now know about func_portals. I'm hoping I'll get away with it though because I'm making a small map, and I have a twisty tavern interior and a repurposed exterior (blocks the view the window was built for) that'll let me seal off this window easily. I appreciate it might not be scaleable.

 

In my opinion building with optimization in mind is important in the whole map design. Designing the mission with visportallization in mind is *key* in making a functioning mission.

Oops, I didn't mean to recommend ignoring performance while building a map, though now I see that's pretty much what I said. I meant don't compromise simplicity for performance unless you find you have to. I do have my exterior visportalled already, fortunately. First map, so I can but hope for the best and test on my mum's old laptop, or maybe ask in the forum for an experienced eye to take a look as soon as it's all laid out, before I begin detailing. I did the window in a separate map by the way, and I'll convert its bits into a model and re-import it once I've textured it properly (your advice!). If I can't use it here, I'll find somewhere good for it :)

Link to comment
Share on other sites

The transparent windows were just all right in Lords & Legacy - and they did have gameplay significance in multiple ways. So, as long as you aren't doing something really foolish, like a wide facade full of transparent windows looking into well-detailed rooms, it should just be all right. Break sight lines, use func_portals, use this effect sparingly, and it will be fine.

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

wfw3.jpg

 

Last night I furnished the outside areas of my map and put a couple of AI inside the manor to walk around the corridors. In game I'm getting a healthy 60 fps. This shot was taken with the door in the room open so the AI patrolling the corridors would be rendered to and the fps appears to be 100.

 

So it would appear that a house with real windows is possible. I think the important thing is that if you are going to do this then you have to be aware of this right from the start and build the architecture to suit. Apart from the front entrance to the manor, none of my outside areas can be accessed by the player. So although the outside areas can be seen from multiple rooms, only one room at a time is rendered when the player is in it. I'm also using func_emitters for snow which take up quite a bit of performance but as the player can only see the outside from a window, only one or two is necessary to be placed by the window to give the illusion that it's snowing all over the outside area.

  • Like 3

"I believe that what doesn't kill you simply makes you... stranger"

 

The Joker

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • 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.
      · 7 replies
    • 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
×
×
  • Create New...