Legacy:Working With Volumes
Volumes are a concept new to UT2003. A Volume defines an area of space whose properties, such as gravity, friction, and area level velocity (zone velocity in UT) can be altered from the level defaults. This approach has been taken because zone portals are used far more to break up a level for performant rendering. Using zone portals to define things like water and areas of differing gravity was seen as a waste. Volumes may also be used to name areas of the map (e.g. Blue flag room, Red flag room).
Zones enclosed by zone portals are still used within levels to enclose named areas (Blue base, Red base for example), and they are heavily used for level optimization (see also Antiportals). The ZoneInfo class is still used to name areas enclosed by zone portals.
A Volume can be any 3D shape, from a cube right through to a hollow cylinder. Making volumes overly complex should be avoided if possible as it will increase the load on the engine for no real benefit.
Volumes may overlap into solid space (stick passed the edge of the world) without any adverse effects. However, if you want a volume within your level it must touch at least part of the subtracted space otherwise it will be discarded when the level is built. If you put antiportals in solid space, they will not go away when the level is built. Volumes also have a priority number assigned to them. This is used to determine which volume should take precedence should two volumes overlap.
The properties of the Volume are applied to all objects contained within it. See Volume for info on the class properties, subclasses, and events it recieves (such as entry and exit events).
- Volumes can overlap. The volume with the higher priority is effective where they do.
- Volumes cannot be attached to movers unless you first set their bStatic property to false, which may cause problems in net play (see Attaching Actors).
- See Fluid Surfaces for how to set the texture a lava or water volume displays.
- You can associate an actor (a Trigger, for instance) with a Volume by connecting the Volume and the actor via the Volume's AssociatedActorTag and the actor's Event property. The associated actor gets Touch and UnTouch events when something enters or leaves the Volume. To do this, set the volume's AssociatedActor property to the Events -> Tag of the trigger to fire.
- Unlike zones, volumes don't fundamentally change the way the BSP tree is built. Use zones for level optimization and volumes for effects.
- You can use a shape created in an external 3D editing application like Maya PLE as a volume by importing it as a static mesh, converting it to BSP, intersecting it and adding the intersected builder brush as a volume. Keep in mind though that you'll hardly ever need high-poly volumes in the first place.
- Basic procedure tutorial: Add A Volume
old discussion: please pick out info & refactor
EntropicLqd: Please note that the above comments are speculative and based largely on the contents of the UT modelling thread over at polycount.
the G.o.a.T: XIIIEd has volumes. To be specific, it has these:
- BlockingVolume (allegedly used to make complex static meshes solid (e.g. those on slants or to give complex meshes simple collision boundaries). This has the effect of allowing players to travel through parts of a mesh. NOTE: Apparently the solidity of meshes is optional - some are, some are not. See Mapping_With_Static_Meshes for a bit more information.
So far I've only tested BlockingVolume and WaterVolume though ;)
DJPaul: Explain how I add one.
the G.o.a.T: It's quite simple actually. Assume for example you want to add water somewhere. Make the red builder brush take the general shape of what need to be filled with water. I used simple cubes in my test maps as they seem to cause no trouble in passing trough level-construct :). Click the button "Add Volume" -> select WaterVolume. Done :)
You'll have to add a sheet if you want the water to have a visible water-surface :/ A watervolume just contains the physics of water, nothing more.
Birelli: I noticed when I tried adding one it colored the sides of the area it was filling slightly blue. It made it look more like it was underwater. Does anyone know if this is an actual effect in the game or is it just a way for the Ed to show you you're in a volume?
the G.o.a.T: A watervolume might show up blueish due to the fact of the blue fogging they use in the water.
Tarquin: Is the old zoning method still possible? This is going to be such a pain with things like curved pipes. It's Quake1-style.
EntropicLqd: I have a source that claims that it is ... I've put the question to eepers on the Polycount message board so we'll see what he comes back with. He is a modelling/prefab guru by default btw. And indeed Tarquin - it is very reminiscient of Quake 1 mapping (oh the pain).
Mychaeel: If you manage to have a hollow curved pipe, you obviously have the inside of that pipe as a shape already (de-/intersect). Using that as a base for a volume shouldn't be a problem. Never forget that we're still working with CSG here, not purely additive geometry like Quake does...
Highlander: And if this tube is a static mesh would it act like BSP that it uh.. "blocks" zones ? (hmmm theres a thought do static meshes act as zone boundarys? ) so making a water pipe would be hard in that respect. You would need to model the static mesh, then create the water inside the static mesh as a volume.
Tarquin: Yes, I see – if architecture is made with static meshes, then that can't be divided up into zones – because they are a BSP construction.
Mychaeel: Highlander: Static meshes don't work as zone portals; as tarquin says, only BSP does. (And since zones are much more heavily relied on for level optimization than ever before, "wasting" them for water effects and the like doesn't seem appropriate.)
EntropicLqd: Mychaeel - that may not be the case if your hollow pipe is actually constructed from a static mesh. You may then additionally have to add a "pipe shaped" BlockingVolume taking up the space of your pipe, and still have to "model" the pipe interior for your WaterVolume.
Mychaeel: That's right, but firstly you couldn't have used your static mesh pipe for zoning anyway and secondly you can convert static meshes to BSP, at least temporarily, deintersect to get your WaterVolume's shape and remove the temporary BSP afterwards again.
SaxxonPike Physics volumes are for defining gravity and other physics. I'm not quite sure about the DefaultPhysicsVolume thing yet.
Highlander: The Default Physics volume is the volume that controls the gravity etc when your not in a regular physics volume... it is the default settings.
Ragdoll: Ive found some very interesting uses for physics volumes. Say you have an open manhole cover and you want players that fall into it to die, simply add a physics volume (about 500 units in height is usually suffice) and set its "damagepersec" option (under physics volume) to 1000 or something. Also very useful if you have a tank of acid that should slowly degrade the health of players who fall in, you can make a physics volume the same size as the water volume and set the damge per sec to 20 or something, depending on how quickly you want them to die.
Wormbo: A WaterVolume already is a subclass of PhysicsVolume, so why add two things of the same kind if one can do the trick as well? You can even use that WaterVolume to give the tank's inside area a location name and trigger an event when a player enters it.
Ragdoll: Ok thanks for that, im sure it will come in very handy (open holes in the ground are always a laugh in multiplayer, so are tanks of acid)
KungFu Hampster: Can someone who knows how to track playerposition using volumes please post some info on this? I've found a lack of info out there about this and I've had a heck of a time figureing it out. I'm sure there are other people who are having the same problem.
Solid Snake: Boo hoo, so what if there is NO info on this. All you do is add a pawn to an array, and then do log the changes to its location. Surely it can't be *that* hard.
KungFu Hampster: It becomes more difficult when you want to track the location and have something appear that diplays the player location on the HUD
KungFu Hampster: I've just written a bsic tutorial on using a CaptureVolume. Click the link ta check it out!