Jump to content

"VIS" Sector Tutorial


Pwn Call

Recommended Posts

VIS Tutorial
By Pwn Call
 
------------------------------------------------------------------------
 
Intro
 
First I recommend that you read through this whole tutorial before you start it as well as the comments on the following pages.  That way you can see why you need to do things a certain way and it may be different for your type of map.  This way you can fix the issue early before you are too far into to it.
 
VIS is a system that Westwood created that allows for better FPS when playing Renegade.  The basic principle behind VIS is that it allows your computer to only load what is visible in that specific map from where you are located.  So for example if you are inside one of your buildings it won't bother to load the interiors (and most likely the exteriors) of the enemy base because they aren't in your line of view. 
 
I learned how to do VIS from YSL Muffins original VIS tutorial which can be found here.  This tutorial is quite in depth but can be quite confusing as well so hopefully mine is a little less confusing while still explaining it well.  Also I use one of his pictures in my tutorial so credit goes to him.
 
-------------------------------------------------------------------------
 
Step 1 - Create your level
 
Usually I like to make my level first then add my VIS sectors at the end, you can add them as you go if you want but I think it gets more confusing that way.  Also you should only set up the sectors in Level Edit once you are done with everything else, otherwise things can get messed up easily.
 
1.jpg
 

Step 2 - Determine which type of sectors will work best with your map type

 

If your map is:

 

Flat - Use the plain sectors as shown in this tutorial for the entire thing, also make sure you add them for lower or higher levels of terrain, for example the tops of high rise structures or other high or low places you can get to.

 

Very Hilly terrain - Use the method to create sectors where you clone your terrain, and detach several vertices at a time. This will take much moretime but works much better with hilly terrain, allowing for much fewer VIS glitches later on.  Also make sure to look closely for VIS glitches around the really steep parts of your map.

 

Mostly flat with some steep hills - Use the flat plain method for the flat parts of the map and use the clone terrain part for the hills.


Step 3 - Create your VIS Sectors
 
Alright here we go!  So VIS sectors are basically meshes that lie below the surface of your map and you must create a VIS sector anywhere the player's camera can reach.  For example when you are in first person mode the camera is exactly where the players head is, however in 3rd person mode, or more importantly when you are in a vehicle, the camera is somewhere above and behind the player.  So with that being said you don't only have to put the sectors anywhere your player can go, but also off the edges of the map where they camera may be. 
 
So look in this next example of me making my sectors for my map,  they might not need to be that far off the sides but it is better to make them further off rather than not far enough off because it will give you hassles later on.  Also I use a standard plane with 1 segment to keep poly's low and I believe the size I used was 25x25 meters.  I wouldn't go much bigger than this with your sectors or a whole lot lower, it also depends on the size of your map.
 
2.jpg
 
Another important thing to do is to name your sector, I usually call the first one I make VIS and then when you clone it it will name the next one VIS01 and so on.  This way you can select them all easily later because they will go under all of your terrain.
 
3.jpg
 
Now before you start cloning them all over your map make sure you lower them on the between about 1 and 1.5 meters.
 
4.jpg
 
Then clone it.
 
5.jpg
 
And repeat until you have the VIS sectors cover all of your terrain like so.  It is extremely useful to use the Grid tool for this so it is easy to line them up, if you don't know how to use the Grid there is a tutorial I made here.
 
6.jpg
 
7.jpg
 
Also remember this map I am doing is all flat so planes work well for this.  For most maps which are not flat you will have to create your VIS sectors a little differently.  The best way to do it is to clone your floor terrain and lower it.  Once you lower it you will have to select several vertices at a time and detach them until you have all of the sectors separated.  Don't forget to lower it!  It also helps if you do this before you texture it but it isn't necessary.
 
 
Now not only do you have to do this for your terrain it has to be done anywhere where your character can get to.  For example you can see White Nyte's here which is walk onable so I have to make a sector for this like so.
 
8.jpg
 
And don't forget to lower it!
 
9.jpg
 
Now you don't have to put VIS sectors on everything, just things that are much higher or lower than the existing sectors.  For example the top of White Nyte's is most likely too high for the sector and the ground to be effective, that is why I am adding on for the roof of the building.  But smaller things like curbs or rocks that you can go on are low enough that you don't need to make a different sector for.  I believe a sector works 10 meters above it but remember it is 1 meter below the ground and the camera can go up higher than your character or even higher in vehicles.  Test it out and see what works best for your terrain.
 
Also the renegade buildings come with their own VIS sectors built in so you don't need to add them to the buildings.
 
Step 4 - Exporting
 
Before you export there is one more thing you have to do.  First select all of your VIS sectors.  Do this by selecting them by name which is really easy (if you named them VIS like I told you to earlier)
 
10.jpg
 
11.jpg
 
Now we have to set the W3D options of the VIS sectors.  With them selected click on the Hammer icon on the upper right of your screen, then W3D Options.  Then check off both hide and VIS under the collision settings.  This allows your VIS sectors to be invisible but still work.  They won't disappear in Gmax but they will be gone in LE.
 
12.jpg
 
Alright now you are good to export your map to Level Edit.
 
Step 5 - Level Edit Set Up
 
So now you should have exported your map with all of your sectors into Level Edit.  First I would make sure you set everything else up in Level edit like buildings, waypaths, presets, etc.  Also you have to have a Pathfind Generator somewhere on your map to set up the VIS or else Level Edit will crash when you set it up.
 
14.jpg
 
Now to start setting up you must do these 4 things in this order.  The last 2 will take a while because it is creating all of the VIS points, and make sure you set the granularity to about 5, if you go any lower it takes a TON of time.  If you have a crappy PC I recommend 8, you will just have to add more manual VIS points later.
 
13.JPG
 
15.jpg
 
Alright that took a while!  Now you are almost done.  Now what you have to do is walk around and look for VIS glitches.  A VIS glitch is where the system thinks you cannot see an object so it won't load that object when in reality you should be able to see it.  It looks something like this...
 
LevelEdit%202013-06-25%2014-58-52-66.jpg
 
That is the inside of the refinery and there is a mesh there covering up that hole but it doesn't think you are supposed to be able to see that mesh.  So what you must do is create a manual VIS point.  To do this just hold down the control key and hit the accent button which has these symbols on it ` and ~ (left of the 1) so Ctrl+`.  Once you do that it should fix the VIS glitch and make that mesh or object reappear.  If it doesn't reappear try moving around or moving the camera around slightly and try it again, some VIS glitches are stubborn!  Some cases if it can't be fixed it may be because there isn't a VIS sector in that location and in that case you need to go back to RenX and fix it.
 
Common places to look for these VIS glitches are as follows:  Most of the Renegade buildings have them especially in and around the doorways,  the hand of nod by the ped area windows has a ton of them so look there very thoroughly or add your own sectors to that spot, entrances and exits to tunnels, areas that have really steep slopes,  corners, etc.
 
Also for finding ones around doors you can hit Ctrl+Shift+T which will hide the doors.  Note that this also hides all tiles like trees or other objects you have made in your level, so once you are done around the doors hit Ctrl+Shift+T to make them reappear.
 
Once you make a manual VIS point it will appear in LE like a little camera to show where you have them.
 
LevelEdit%202013-06-25%2014-59-19-05.jpg
 
Now walk all over your level and look for them, it is easier to find them in 3rd person mode because the camera swings wider so you will have more luck finding them.
 
After you walk around the whole level and find them all you can do it one more time only with tanks viewpoint.  Do this by going to the Camera tab then choose the Mammoth Tank.
 
20.jpg
 
This should make your view look somewhat like this
 

LevelEdit%202013-06-25%2015-01-27-80.jpg

 

Now when you are going around in this view you don't have to go anywhere a tank couldn't go.  Also use the Mammoth tank because it has the widest turn radius for the camera.  Really check the edges of your map and around buildings well cause these are places that are prone to VIS glitches.
 
------------------------------------------------------------------------------
 
Flying Maps
 
For flying maps you have to have more than just the VIS layer under the ground, every 9 meters or so in height you need to add another layer until you reach the flight roof.  That is really the only difference for flying maps.
 
------------------------------------------------------------------------------
 
 
This is a very confusing tutorial for those of you who are new to VIS, so ask any questions you have below and I will help to answer them.  Also if you know more about VIS than me let me know if I did something wrong or if there is a better way to do something!!!

Link to comment
Share on other sites

So if that picture is the ground for your map clone it and move it down on the Z axis 1 meter.  Then you have to select a few vertices that are about 25x25 and detach them as a seperate mesh.  So you need to turn that whole thing into a bunch of smaller planes that will make up your VIS sectors.  Also note that your sectors will have to extend past the edges of the terrain, especially where the cliffs go out away from the terrain so that the camera can still be above a sector!

 

And then for the tunnels do the same thing with the ground of the tunnels.

 

Also don't forget you have to make them for the tops and ramps of your walls too!

Link to comment
Share on other sites

Also Imperial since your map has those really nice squares I would separate them by a block of about 9 of those squares.  That will make it easier, you could probably do that with the polygon select and it would be easier.

Link to comment
Share on other sites

Guest Mauler

Anywhere a character can go will require a VIS sector, be be sure to also utilize first person camera.. along with 3rd person and using multiple vehicle cameras to achieve greater coverage of VIS errors.. another easy method is to create simple 25x25(or larger, dependant on your map size) planes and piece them together overlaying the original terrain, instead of cloning the original terrain mesh and ending up with piece that will take hours to detach into managable pieces...( if your map is very complex in height you will need to clone the terrain mesh)

 

 

  • while generating sectors it is best to lower the editor camera below all the sectors and terrain presets to achieve a faster generating
  • doorways, windows, elevated areas will require a bit more attention when looking for VIS errors
  • flying maps also require VIS sectors in the space the flight units can fly in... basically a clone of the ground VIS and repeated every 10 meters up till the flight roof "blocker"
Link to comment
Share on other sites

Guest Mauler

...

 

perhaps you need to increase the size of the planes...

 

and yes the flight VIS needs to be every 10 meters or so until you reach the flight "roof"

 

and another thing... i notice the sectors in the tunnels is not correct.. you might need to make seperate sectors for the tunnel system

Link to comment
Share on other sites

Everything mauler said is spot on as well.

Most maps wll use the plane's for Vis sectors only use the detach method for maps with large changes in elevation or many steep hills. Also you can use a combination of both.

Link to comment
Share on other sites

Oh no I failed 2nd time. Not sure what causing it but I did it in my old Level Editor there is no problem. Now I port most of the stuff manually into a new editor also I download from SVN. I follow the steps but when I was generating VIS, it was not responding for like an hour or 2 I left it. So I am not sure what I do wrong.

post-31-0-56083400-1373355511_thumb.jpg

Link to comment
Share on other sites

Guest Mauler

Processing VIS is not a fast process... The level of polys, vis sectors, etc..... you are probably looking at at least 10 hours of generation time...

 

It wouldn't be uncommon for a fairly big map to take anywhere of 12 hours and up depending on your processor speed and resources.

 

Lower the camera to -500 meters on the Z axis and face it downward. This will take the stress of all those polygons off your CPU, speed it up by 10 fold.

 

:rolleyes:

Link to comment
Share on other sites

Make sure you discard vis data and repartition the culling system again before you re genereate the sectors.

It should have your loading bar update though and not show the program not responding thing. Try it again

Link to comment
Share on other sites

Make sure you discard vis data and repartition the culling system again before you re genereate the sectors.

It should have your loading bar update though and not show the program not responding thing. Try it again

I discarded the VIS data then I repartition the cuiling system.

Link to comment
Share on other sites

When I click Auto Generate. Just click only, it said Not responding and it crashed. The End.  Start all over again.

 

http://renhelp.multiplayerforums.com/PwnCall/VIs%20tut/15.jpg

 

Just click the OK button and it freeze and said not responding. But after some tweaking and this and that, I think I am very close to finding the source of the error.

Link to comment
Share on other sites

Yea it can be tough to pin point it sometimes. What I like to do is start the generation right before I go to bed so it can just go all night and be done in the morning.

Link to comment
Share on other sites

  • 7 months later...

It was suggested I do this with the maps I have been repairing recently(Pacific, Arena & Tiberium Temple), with Level Redit. I guess if there is no VIS sectors from within the Gmax part of these maps, there won't be much I can do. I'm going to try anyway though.

Link to comment
Share on other sites

Can someone explain in detail the VIS process, I was running it for 4 hours today when it crashed, and then Zunnie said that you have to cancel the process at some point. That stinks to be honest, but can this be clarified so I can further edit the busted maps?

Link to comment
Share on other sites

I never cancel it I just run it through the whole way. Maybe change te granularity back to 8 and try again

Link to comment
Share on other sites

If you cancel half way. Then the VIS is screw up and some part of the map any vehicles or infantry will just simply disappear. So you have to set granularity to 15-17. Like for some maps that is super huge you need set 16-17 as it require a lot of time to generate, if you set to less then 8 it will never get it done.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.