Jump to content
The Dark Mod Forums

How to make a rooftop view?


SteveL

Recommended Posts

Is there a way to give the player a view over the map from a rooftop without opening all exterior visportals and rendering everything? I'd love to do that in my first map, but I'm not sure whether it's possible from the wiki articles and forum posts I've found. I don't mind if it's complicated... if it's possible, could someone please point me to some reading material or an example map? I guess you have to blend map geometry naturally with the skybox backdrop somehow too.

Link to comment
Share on other sites

I'm not a pro or anything (I haven't even released a map!), but if I were gonna do this...

 

I would open up all portals in the map and go into it to take several screenshots of the scenery. Then I would make them into a skybox and place that in the final version of the map. This way, people can see the scenery without hurting performance.

I'm sure somebody will be along shortly to give you a more elegant (read, proper) solution.

 

Somewhat on this note, I wonder if there's a script floating around for making a panorama like this? It takes a screenshot, turns 90 degrees, takes another, and so on. Then you stitch them together.

Edited by lost_soul

--- War does not decide who is right, war decides who is left.

Link to comment
Share on other sites

Is there a way to give the player a view over the map from a rooftop without opening all exterior visportals and rendering everything? I'd love to do that in my first map, but I'm not sure whether it's possible from the wiki articles and forum posts I've found. I don't mind if it's complicated... if it's possible, could someone please point me to some reading material or an example map? I guess you have to blend map geometry naturally with the skybox backdrop somehow too.

 

I've never tried anything of the kind, but I'd imagine you could create the rooftop / tower / perch or whatever as separate room, where at the bottom there would be a roooftop view consisting of a miniature version of the level geometry. I'm bad at explaining so let me just try and draw it for you:

 

I'm not that good at drawing either.

 

IIRC the guard tower in Bikerdude's Business As Usual worked a bit like this. Could remember wrong too.

 

Also, here is the wiki article on making a custom skybox.

Edited by kyyrma
Link to comment
Share on other sites

I would advice against it when making your first own mission. It is maybe better to start with something less ambitious.

 

Kyyrma's cheating skybox method is the day to go, presenting real geometry will raise the difficulty too high.

  • Like 1

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

The new 3D Skybox support in TDM 2.0 should improve the ability to accomplish this. Though there is apparently a render bug so... 2.01?

 

Grayman?

 

Eh, it's savegame related. You can still test it now at least:

 

http://forums.thedarkmod.com/topic/15226-for-any-current-wips-using-200s-following-sky/

Edited by nbohr1more

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

Yes, the following sky savegame bug is fixed in 2.01. We're about to start the 2.01 beta, so it shouldn't be too much of a wait for 2.01 to be released.

 

I started a discussion thread for following skies, but I can't find it atm. I haven't completed it yet, but I don't recommend you have a following sky in your first mission, especially if you're not familiar yet with visportals and using caulk for your sky texture instead of sky_portal.

 

Edit: Here's what I wrote as a draft for creating a following sky. I've changed some of the process since then, but haven't gotten around to updating the text.

 

To be able to look out over the rooftops of a map, you'd probably want two following skies. One would be what's painted while you're on the ground, and the other would be what you see out the windows of your tower. You'd switch from the first sky to the second while climbing the tower, and switch back when descending. The map's rooftops would need to be built 1/16th scale and would form a 'carpet' on the bottom of your second sky.

 

This way your ground views could be properly portalled w/o worrying about long sight lines, and your tower view wouldn't care about visportalling at all.

Link to comment
Share on other sites

Thanks for the info everyone. I guess if it were easy there'd be a view like that in every mission.

 

I disagree. That's a great illustration!

 

I would advice against it when making your first own mission. It is maybe better to start with something less ambitious.

 

I already downsized my draft plan a couple of times to make it realistic but it looks like I might still have some way to go :) I'm trying to follow advice from the forum by limiting myself to about 20 rooms or so. Ok, I'll make sure I don't depend on getting that overhead view working...

Link to comment
Share on other sites

Either the skybox technique or the idea I had is to do what Dishonored does: You rebuild the city in simple & culled geometry with a modeling program and use that.

 

It'd be work-heavy and possibly frustrating & hard to get working either way, so not a bad idea to not have your FM depend on it.

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

Either the skybox technique or the idea I had is to do what Dishonored does: You rebuild the city in simple & culled geometry with a modeling program and use that.

 

It'd be work-heavy and possibly frustrating & hard to get working either way, so not a bad idea to not have your FM depend on it.

...

To be able to look out over the rooftops of a map, you'd probably want two following skies. One would be what's painted while you're on the ground, and the other would be what you see out the windows of your tower. You'd switch from the first sky to the second while climbing the tower, and switch back when descending. The map's rooftops would need to be built 1/16th scale and would form a 'carpet' on the bottom of your second sky.

 

This way your ground views could be properly portalled w/o worrying about long sight lines, and your tower view wouldn't care about visportalling at all.

 

Are long sight lines in themselves a problem then, or is it only the amount of detail in view that matters?

 

I was thinking about a similar idea just before coming back to the thread, but not knowing what's in skyboxes I wondered whether the player could be teleported to a separate room in the void as he entered the rooftop, with the transition covered up by a fall or a patch of full darkness or something. The second room could be a copy of the visible area but taken from a backup at an earlier stage of mapping -- just walls and the first few fs windows and doors. Perhaps it'd be possible to bake in shadows and light too. So less detailed, but with no need to remodel or resize.

 

That said, I get the message that it's fiddly and not the right thing to start with on a first map.

Link to comment
Share on other sites

Are long sight lines in themselves a problem then, or is it only the amount of detail in view that matters?

 

Long sight lines usually equate to "painting more on the screen", and the more you have to paint, the more you burden the CPU and GPU.

 

Suggestions that you not take this on in a first map come from this observation: mappers tend to add on to their map as time goes by. Either they add "just one more room" or spend a ton of time getting the details just right, or change their mind halfway through and go off in a different direction, or plan something so huge that they find they don't have the time to finish it.

 

Rather than have you become frustrated by trying to deal with the goal of being able to see all the rooftops, my humble opinion is to shoot for something more simple your first time out. That lets you get to know Dark Radiant, get used to asking for advice on the forum, and have the satisfaction of completing something sooner rather than much much later (or not at all). And we all get to play it, too!

Link to comment
Share on other sites

+1

 

Let the pro's do the pro stuff ;)

 

somewhat on this note, I wonder if there's a script floating around for making a panorama like this? It takes a screenshot, turns 90 degrees, takes another, and so on. Then you stitch them together.

There is a console command for that purpose, but I forgot which one it was. I guess it can be found in the topic-related wiki articles.

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 think you should totally give it a try eventually, just maybe not for a first mission, so you get a feel for how visportalling works first and can plan for it from the start.

  • 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

I also agree with the posters above as my "first mission" was 60 hours of ..."shelve it till I learn more", and that's a really depressing way of starting to map, trust me.

 

I had planned a seaside village where all rooftops were accessible and you could look down the hill over all the rooftops out over the harbor and it would be GLORIOUS!! ...however after finishing all the rough patch street work and building facades it turned out that it was not going to be possible the way I'd imagined it though there were ways of doing it that would be more involved. Way above my skill level. Starting small will let you plan ahead for things like visportalling/skyboxes and you'll be able to take those things in to consideration prior to starting vs. having to rework 40-80 hours of stuff you've already done.

 

In any case I'd suggest, like others have, to start with something more along the lines of the tutorial and make the map compact and include everything you'd like to learn about in the map; e.g. scripting, cutscenes, custom voice/sounds, unique AI pathing and triggers, visportals, custom skybox(s), etc.

 

Then you can get an idea how those things work and some of the limitations and you'll have a much better idea going forward.

 

I still have my original map, but I've moved it in my storyline to the second mission, and I started basically another small one that is a "prequel" of sorts to the second. I'm putting some interesting elements in the new smaller map which will make the second mission more interesting and also improve my knowledge of DR and the tools we have at our disposal.

 

What they said in the Army was: Prior Planning Prevents Piss Poor Performance. The 6 P's and words to live by :)

Edited by Lux
Link to comment
Share on other sites

Thanks for sharing your advice and experience guys.

 

I have been sandboxing for about 6 weeks in between playing others' FMs. High time to start work on a map but I've been lacking inspiration. I finally came up with a cool idea for a small enclosed setting that has natural constraints on how much I can get carried away with the building work (no room to add more stuff that isn't in the original design), but I immediately started to get carried away with ideas for making my tiny map feel less tiny. The other idea was to add some inaccessible views over a stream from (otherwise enclosed) yards, using patch facades for the stuff the other side.

 

I can rework my idea a bit so the player won't expect an overhead view. Thanks for reminding me that the point of this first map is to get to know DR and the entire production process, not to produce the best work I ever will :)

 

Hoping not to run into trouble visportalling, the second topic that lots of people have mentioned and it sounds like a nightmare to get wrong... I reworked the map on paper a few times last night until I managed to get all the lines of sight short and blocked with walls that both make sense in the setting and that'll allow me XY-aligned visportals, and I'll be able to create all the sealing geometry and portals first before adding any FS details or textures or hollowing out the buildings. But I've yet to test it. It might not work at all for some reason I've not thought of, but if not I hope to find out before I add any details!

Link to comment
Share on other sites

Could this work in theory?

 

You have a small city made of of 10 - 15 average size buildings. Most of them you can enter, there is Ai patroling the streets and it is optimized really well so you get 60 - 50 PFS. Now you want to give the player a view out over the city from a balcony. This would mean everything is rendered at once and the game would start freezing.

 

What if you copied all the buildings and streets and pasted them somewhere else in your map far away from your actual city area. Forget about the AI and all the models inside the buildings. Anything that is not in the players view from the balcony you can delete. Eg building facades, building interiors. Turn the corpies of your streets and buildings into one giant func_static and build a huge room around it using worldspawn brushes.

 

Now create a living room that the player has to walk through to get to the balcony and make a copy. Place one in the real city and one in the func_static copy of your city. Then put some player_teleports in the middle of the living room. When the player walks through the living to get to the balcony he will be teleported to an identical replica of the room and will be able to look at an exact replica of the city that's made out of one big func-static with no AI and a lot less stuff to render.

 

Could that in theory work?

Edited by Sir Taffsalot

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

 

The Joker

Link to comment
Share on other sites

Unless there's a way to preserve where someone's looking when the teleport happens, it's REALLY obvious. You can test it yourself on the Illusionist's Tower, if you're looking down to the left when you hit the teleporter, you appear on the other end looking straight ahead. Which is a real pity because teleports could be so very useful if they weren't glaringly obvious.

Intel Sandy Bridge i7 2600K @ 3.4ghz stock clocks
8gb Kingston 1600mhz CL8 XMP RAM stock frequency
Sapphire Radeon HD7870 2GB FLeX GHz Edition @ stock @ 1920x1080

Link to comment
Share on other sites

@Sir Taffsalot

I was hoping that'd be possible as it sounds less work and more accurate than remodelling. That was what I was trying to get at above with my idea of copying an early stage of mapping to the void and porting the player there.

 

@Xarg

One way to control the player's direction would be to place the port in a narrow passage with nothing to look at except dead ahead. Sure people could deliberately ruin the effect if they want by sidling along the passage crabwise but it shouldn't break immersive playing. When I thought of it I was more afraid of a pause while a new area suddenly gets rendered. Not tried it in any way shape or form yet though so I might be talking rot!

Link to comment
Share on other sites

Yeah I considered some way to "encourage" the player to be looking straight ahead to make the teleport less noticeable, but if you want to see what I mean, play Illusionists Tower. You'll get a feel for where the teleporters are, and then once you know what to look for, each time it happens it's jarringly obvious. It would all be ok if it could save some kind of info about where you're looking, like 30 degrees left and 20 degrees down from "straight ahead" to help preserve the illusion that you didn't just teleport.

Intel Sandy Bridge i7 2600K @ 3.4ghz stock clocks
8gb Kingston 1600mhz CL8 XMP RAM stock frequency
Sapphire Radeon HD7870 2GB FLeX GHz Edition @ stock @ 1920x1080

Link to comment
Share on other sites

I think building geometry in an inaccessible & controlled area, out a window or balcony, is a good way to go, and I'd say hanging out of the way of the rest of the map. That way if it hits performance, you can go back, downsize & clean up easily without affecting the rest of the map, or even totally revamp or delete it if you have to.

 

As for a teleport, what I think you could do is create a script that getKeys the player's orientation, scripts the teleport, and then setKeys the orientation to force the player looking the same direction, and possibly freeze the player over the duration of the teleport if necessary. Then you can make it seamless.

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

Should that prove to work, then teleporting will start looking very nice and attractive, IMO. Care to throw together a demo ;) ?

Intel Sandy Bridge i7 2600K @ 3.4ghz stock clocks
8gb Kingston 1600mhz CL8 XMP RAM stock frequency
Sapphire Radeon HD7870 2GB FLeX GHz Edition @ stock @ 1920x1080

Link to comment
Share on other sites

Should that prove to work, then teleporting will start looking very nice and attractive, IMO. Care to throw together a demo ;) ?

 

I tried it out since no-one beat me to it. Teleporting seems to be completely smooth if you do it by script -- test map of 2 identical corridoors attached. I couldn't figure out how to get the atdm:teleports to target/move the player so I've not tested that, but I gather from the wiki that they snap the ported object to their origin, both position and orientation.

 

If you move the player by script (setOrigin) it turns out you don't need to reset the player's orientation because it won't get changed. And you can get the player position right even if he sidles along the wall into the edge of the trigger. In the map the from/to locations are marked with entities--I used the target_callscriptfunction entities themselves. These are the only things you have to place carefully so they are in exactly the same relative position in the two corridors. Angle doesn't matter. The player's destination is then calculated as the origin of the "to" entity plus the player's offset from the "from" origin.

 

It seems to work very well, at least in the test case. I've used graphpaper texture and placed moving shadows to try to break the illusion, but it seems solid. If you extend the moving lights out too far then sometimes the long moving shadows won't quite be in sync over the "leap", but it's not very noticeable and of course you wouldn't use them in this spot in a real map.

 

ps I put different ambient sounds in the two corridoors so you can tell when you port!

test_teleport.map.txt

test_teleport.script.txt

Link to comment
Share on other sites

This is similar to something I did on another project. I defined two identical volumes, one at the launch room and one at the destination room. When the player triggered the action, everything that wasn't nailed down was moved from the launch volume to the destination volume. Ditto when going in the opposite direction. That way, the player, AI, knocked over candles, stolen painting frames, lights, etc. essentially recreated the launch's environment at the destination.

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...