Jump to content
The Dark Mod Forums

Visportals and FOV


SeriousToni

Recommended Posts

To be fair, Melan did say at the time he didn't know about VP coming from a Dromeding background. And he has a busy RL, which is why he never got around to doing it.

 

Well I said nothing about why/how of why it was done. We all got real life etc.. it's perfectly understandable, and everyone has to learn this stuff as they go. I didn't understand vp's well when I started either coming from that same Dromed background.

I learned them because I used this engine on a lot of test maps and projects and also used Hammer a lot in that past few years as well, which works the same way, but also automatically culls much more like Dromed.

I brought up the point that he didn't want to go forward with it so it didn't sound like I 'quit'. You got a lot of praise for fixing the map, but I spent a lot of time trying to teach him how to fix it long before you jumped into the fray.

 

I made that point to illustrate the importance of making the simple terrain first. I think we can all agree that Melan's visuals are hard to match. The underlying problem with the map at release was that the terrain was too complex to seal vp's properly, and that complex terrain WAS the base of the map - ie: the sealing brushes.

So it took a lot of time/effort to 'reverse engineer' to get the vp's properly working so the performance was good.

 

I think if he recreated the map from ground up knowing vp's better today it could even have better performance. But as it stands the small gain that would happen would take too much effort to make it worthwhile since it's performing pretty well as it stands.

 

But new mappers should take this as a learning lesson. You can build really simple, sealed terrain in minutes, then spend weeks detailing and it will perform well. Or you go jump right into details and make a beautiful map that won't perform well without a ton of extra work, work that most people would decide to give up on and ditch the map because of the effort required.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

But new mappers should take this as a learning lesson. You can build really simple, sealed terrain in minutes, then spend weeks detailing and it will perform well. Or you go jump right into details and make a beautiful map that won't perform well without a ton of extra work, work that most people would decide to give up on and ditch the map because of the effort required.

 

Amen. Plus simple geometry is easy to rewire if you spot the AI will not work with it. Ie. too narrow corridors et cetera.

 

A little bit of extra prework and experimentation saves a lot of sanity later on.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I've decided to do a 'city street' tut, should be done by New years.

 

It'll just be a basic small city section in 4 parts dealing with vp's. I sent a request to nbor to help wikify.

 

 

1- making a nice little short flat vp'ed street section. (understanding vp's- sound propagation and culling terrain, basic sealing terrain)

2- adding some hills, enterable locations, details (more complex vp interaction)

3- sewers, roof access (horizontal vp's)

4- ultra complex vp interaction (using func_statics/caulk to render backdrops outside of local area [from a sealed area], forcing vp's closed, LOD details with func_statics)

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Baddcog, this is too awesome, thanks a lot for the effort, sure you can try to "reverse engineer" complex maps and try to understand how it all works, but that simple map you provided already cleared a lot of things for me (quite a nice bunch tricks actually), and will help me for sure on this section of the map I have in mind. This topic is proving to be quite useful, some good tips and knowledge... I'll wait patiently for this city street tut, it sounds like exactly what I needed!

Link to comment
Share on other sites

RPGista, thanks, glad it could help.

 

fxdwg, don't be scared away, it's pretty easy to understand once you see it in action. Reading about it is tougher because it might not be explained well or can make it sound comlicated if you don't know how it works.

 

Once I get this tut done it'll be really easy to see it (and do it) in action step by step, easy to 'difficult' (which is just tricks you can do more than you really need to do for a good map), and even that stuff is easy once you see it.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Here's a bit from the Quake4 Mapping Guide on iddevnet, that likely applies to Doom3 as well :

 

Portals split batches. If you’ve got a room that’s cut up with portals all over the place, you’re probably doing more harm in splitting your draws up than you are good by culling some of them from the right angles. Portal your doorways and try not to go crazy with them beyond that.

http://www.iddevnet....tor_Performance

 

Edit :

Actually its mentioned on the Doom3 Visportal Page too :

 

The downside to portals is that they create extra triangles and extra batches. Video cards are set up to handle a small number of batches with a large number of triangles per batch. All the triangles in a single area with the same texture are put into a batch. When you create a vis portal, it splits the geometry, and adds more batches. This is normally not a problem unless you have a lot of areas with only a hand full of triangles in them.

http://www.iddevnet..../visportals.php

Link to comment
Share on other sites

So if you can split up locations into several visportals and not have a direct correlation of 1 area/room to 1 visportal and get a performance boost, what are the drawbacks of having many/small visportals? What changes at the border between portals?

 

Well, not really sure what you're getting at there jaxa.

 

Rooms/areas is really subjective. Really ALL terrain in a map is one area, until split by visportals. The portals are what make rooms different 'areas'. Doorways just help because they make smaller portals, and smaller portals are easier to close off from one another because there is less overlap.

 

So having a room/hall/room(in a row) with a portal in each door is the same as having a straight section of street with 2 portals, just that the two portals in the street will be very large, so harder to close than two small doors are.

 

The main benefit to having more portals is that they can possibly seal off areas or parts of areas quicker. Say a large dining room split in half by a portal. when you exit the doorway one half of the room will close sooner than the other half. Though probably only seconds sooner, so it's not a huge gain.

One benefit is better sound propagation. As sound has to travel through portals, it depends on the area. A horizontal portal in a large room with a balcony will keep sound from traveling straight up through the balcony floor to a guard.

Another benefit would be splitting tris in terrain, so they are smaller, so less likely to be hit by as many lights. But again, that depends on the light overlaps.

 

probably the biggest drawback of many (uneeded) portals is splitting terrain too much. If it cuts up too many tris, but you still have the same amount of lights hitting more tris you make performance worse.

(better to have 6 lights hitting 1 tri than 6 lights hitting 6 tris)

 

there really is no drawback to small portals. The smaller the better. Hence the best reason not to 'bury' portals in terrain, you are possibly making them larger than they need to be, which means they'll stay open longer than they need to.

 

The best way to do them is to have them spread out a bit, have them as small as possible, and have them at angles to each other (so the profile between one and the next is smaller)

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

It is really nice too see how everyone cares and discusses about this subject. It is even better to look at this tutorial map and understand it better (the doom 3 article is also very discriptiv!).

 

Great support! :) :) :)

"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

Badcog reminds me that one nice thing visportaling encourages is putting them at angles from each other. What that ends up doing is making you build in windy and branching paths rather than long, linear straightaways with long lines of sight. That also ends up being a good way to build for sneaking gameplay, since it's more fun having branching paths and multiple ways to get to your objective. It sort of builds that way of thinking into the low-level mechanics of the map at its root.

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

Alright,

 

Well I really hope this helps people out and inspires some cool stuff. Took a bit longer than I was expecting, but it only took two days so...

 

What I did was a fairly basic layout for a city, U shaped. Start at one end of U and a MASSIVE tower at the other end.

 

The basic point was to show authors in stages how to use vis portals effectively from : simple use with base terrain (map 01), more simple terrain with details added to hide the simple terrain (map 02), Things like enterable locations (warehouse attic), roof that can be climbed over, sewer, horizontal vis portals (map 03) and last, using func_detail to see things that are in other cells, and LOD's to make those items more detailed the closer you get (ie: huge tower in one cell that can be seen from all parts of map) (map 04).

 

Each map is just the one before it with the additions explained, and a basic guide to what it all means. You can read it as you look at it in editor, then go in game and see it in action. It's not pretty. You can even build a similar map as you go. It's pretty easy to do.

 

It should be useful from noob to pro, but I didn't go into much detail at all about how to use the editor. It is base terrain optimization guide only.

 

nbohr1more has agreed to wikify it, I am just posting this so anyone who wants to see it before then can. It might be useful for the noob contest mappers.

 

all the map files are in the maps folder, just drop em in your maps and fire them up (street_vis_tut_01 ... _04)

even if you have to compile they take no longer than 30 seconds each.

 

http://dl.dropbox.co..._Street_Tut.zip

 

--------

Oh, and I had to instal the new Catalyst drivers so I could turn off Catalyst AI, so my world was right side up (the new drivers do have a checkbox), unfortunately this breaks my print screen button for some reason.

 

So Stage 03 and 04 have no pics. But by the time I explained everything in stage 1 and 2 I don't think they are really needed.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I had a cursory look. The .map file looks like wizardry for me, the technique is entirely new to me.

 

I had a stroll in the map and it look good, but...

*There were some areas where the skybox texture just vanished leaving a black sky.

*Some of the buildings, while I was walking, were cut as if caulk came between me and them.

 

The big questions are: are these just simple mistakes while putting together a quick example tutorial? Or is the technique indeed prone for unexplained weirdness like disappearing skies? How well-established method this is? Or is it a hacky thing using caulk features to something else than what it was originally intended?

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Thanks Xcen, I'll have to take a leak. haha, I mean look. It was working last time i compiled, but there were some spots when I went back and forth...

 

@ Sotha,

 

The sky issue is actually mentioned in the text for part 3, I left one area that I noticed, told the reader how to fix it, and left it up to them to try the solution (putting a cube of portal sky tex in the sky near that area).

 

For the buildings, yeah mainly because I was rushing out the last bit.

I'll probably update the text a bit as it gets Wikified, just tried to get the bulk of it done before the weekend was over.

There was one mainly spot that I noticed it.

On the roof behind the tower, one 'full building prefab' cuts out. Due to it being in another cell and seeing it (partly) through skybox. It can be fixed exactly like the tower was made, by combining it with a small cube of func_static in the offending area. In fact it could be combined with the cube in that area for the towers LOD.

 

(each a 2 second fix really).

 

The part where some tops of buildings get cut, well that's mainly because nothing is done. And I should probably mention these things in the read me (though it does state that everything is very basic/ugly).

If I detailed it most of the roofs would come down. ie: where the sky is now is as tall as the map will ever be. So the buildings would get shorter, the roofs would be placed on top, and anything that needed resealed would get skybox above it.

 

func_static trims and stuff would cover some of those issues. and other spots might just need a little more love in the skybox itself to give more room.

 

I'm thinking I might add a part 5, massive detailing, mainly for this issue, next week.

-----------------

 

One thing I was disappointed with is that the lights on the tower didn't show from other areas. And work like this I'd done before the lights did work. I think maybe because the previous work was smaller and the light bound s might have spanned areas.

 

In this case they are no where near to crossing areas.

However, I think you can get by with it just by having the silohette being there. Just one thing you'd have to forgive or work around. Having some illuminated windows up there would be enough.

Dark is the sway that mows like a harvest

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

      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 )
      · 2 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
       
      · 3 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...