Renegade Public Forums
C&C: Renegade --> Dying since 2003â„¢, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » How do I use VIS?
How do I use VIS? [message #17040] Fri, 25 April 2003 10:05 Go to previous messageGo to previous message
JRPereira is currently offline  JRPereira
Messages: 233
Registered: April 2003
Location: Earth
Karma:
Recruit

vis is extremely important for improving the performance of maps. If I was to release Colusssus 2: Revisited without the vis optimization, it would lag horribly, simmilar to the first Colossus 2. Simmilarly, I could probably make use of the vis optimization to make the original Colossus 2 run quite well (although it would take a lot of time to do).

vis optimization basically revolves around dividing your map into sections, of which only some get displayed at any given time -- this means while you're at the GDI base, usually the Nod base doesn't get rendered and therefore there's a lot of processing now available for your surroundings (the section you're in). If done properly, you can use this allow yourself more detail in your maps (both polys and texturing/effects).

The sections are usually made up of all the surfaces on the map that can be traversed - ie ground (and layered every few player heights or so for maps with aircraft). Included with the mod tools, is the gmax file for the hourglass map, and it has a layer of vis objects (usually flat 1x1 planes) all around it. Each object (that's set for vis in the w3d options), tells the level editor to sample this area, to see what should be shown and what should be hidden (ie only render what's in view).

When done properly, the vis objects should break up the map in such a way that for the most part, objects that aren't in view aren't rendered, and objects in view -are-.

After you've placed your vis object and 'made' the map in the editor, you'll need to do a few things to set up the map. It's explained in the documentation for the editor:

(the next few steps may not be required for the vis generation, but will probably be required for most maps)

(1) Place the human pathfind generator (Editor Objects -> Pathfind Generator -> Human) somewhere on the map (Generally on a ground surface you can walk on. If you have seperate ground surfaces that can't be accessed by simply walking over to them, you'll need to place more pathfind generators on the map (be careful to make sure that if you DO place multiple human pathfind generators, that the seperate ground surfaces simply CANNOT be reached by each other - otherwise you'll be generating double the amount of data required).

(2) In the menu bar, click “Pathfinding -> Discard data”. This should remove any possible previous pathfinding information and give you a clean slate to start with.

(3) In the menu bar, click “Pathfinding -> Generate sectors”. This is a time-consuming process that reads the map and defines how AI-controlled players/vehicles/etc can move around the map – especially important for bots and harvesters (you should probably place whatever waypoints you’re going to have before doing this).

(4) In the menu bar, click “Pathfinding -> Generate flight data”. I’m not exactly sure what this does, but I think it has something to do with flying vehicle movement. It doesn’t take much time to do.
(the following steps –are- required for the VIS system to work on maps)

(5) In the menu bar, click “Vis -> Discard vis data”. This will leave you with a clean slate to work with.

(6) In the menu bar, click “Edit -> Repartition culling systems”. This further prepares to generate the Vis data, and also will fix any physically transparent objects on the map (an occasional problem where the level editor misreads the w3d settings in the models used on the map).

(7) In the menu bar, click “Vis -> Build dynamic culling system”. This will help improve the performance of the map (although I’m not exactly sure how).

(Cool In the menu bar, click “Vis -> Auto-generate vis”. This will create the VIS points on the map that are used to control what to show and what to hide based on the areas defined by the vis objects you placed on the map.

(9) Doorways, small areas, and sharp corners generally are an exception, and will require manual vis points. To place a manual vis point (from what I remember), maneuver to an area where an object isn't showing when it should be, and press ctrl+~ (the tilde key to the left of the 1 key). The area should (usually) be resampled and the object should appear.


Yes I know this is a messy tutorial but it should at least give a general understanding of how it works and how to work it. Later I’ll probably incorporate it into my Commando Tutorial.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: teleporters
Next Topic: Unfinished weapon models
Goto Forum:
  


Current Time: Wed Dec 04 10:50:46 MST 2024

Total time taken to generate the page: 0.00781 seconds