Docs - Occlusion volumes - zones and portals - physical zones
by Scottie Sirius · in Torque 3D Professional · 07/11/2011 (12:15 pm) · 10 replies
Any idea when there'll be some info in the Docs about the above mentioned features?
About the author
Creating the AlterVerse! www.AlterVerse.com
#2
07/12/2011 (6:54 am)
That's good news! I was looking for some info regarding this last week! :-P
#3
Torque 3D - Zones and Portals - Part1
http://www.youtube.com/watch?v=qGafTe9uvLI&feature=player_embedded
Torque 3D - Zones and Portals - Part2
http://www.youtube.com/watch?v=AFImkRCUDwc&feature=player_embedded
...and we've also been discussing use and strategies for these new features in this recent thread:
Rene deserves a medal for the new Zones and Portals :)
http://www.garagegames.com/community/forums/viewthread/126829
Going back a bit, the following thread discussed the previous bugs and limitations, and details Rene's work to improve the functionality leading up to T3D 1.1 Final:
[bug 1.1a] Zones and Portals bugs - RESOLVED
http://www.garagegames.com/community/forums/viewthread/110117/1
Also, I'm currently engaged in a big project using lots of zones and portals, etc, so feel free to ask questions. I'll share what I've learned if it's helpful...
P
07/12/2011 (11:24 am)
You could start with these tutorials from Rene:Torque 3D - Zones and Portals - Part1
http://www.youtube.com/watch?v=qGafTe9uvLI&feature=player_embedded
Torque 3D - Zones and Portals - Part2
http://www.youtube.com/watch?v=AFImkRCUDwc&feature=player_embedded
...and we've also been discussing use and strategies for these new features in this recent thread:
Rene deserves a medal for the new Zones and Portals :)
http://www.garagegames.com/community/forums/viewthread/126829
Going back a bit, the following thread discussed the previous bugs and limitations, and details Rene's work to improve the functionality leading up to T3D 1.1 Final:
[bug 1.1a] Zones and Portals bugs - RESOLVED
http://www.garagegames.com/community/forums/viewthread/110117/1
Also, I'm currently engaged in a big project using lots of zones and portals, etc, so feel free to ask questions. I'll share what I've learned if it's helpful...
P
#4
07/13/2011 (7:04 pm)
Hey Paul I was wondering if there is a way to exclude some shapes from zones all together so they always render no matter what zone the player is currently in.
#5
You could I guess surround the shape with portals which would make it render all the time, either from within the zone or outside the zone. Not sure if you can just make a cube-shaped portal that encompasses the object or if you'd have to make 6 individual portals to make a wall of portals around the object.
Give it a try and let me know the results, I'm curious. It's a good question.
Rene or someone from GG may chime in here with a better answer :)
P
07/14/2011 (6:24 am)
@Lewis: Have not found a way to do that, as soon as any object is fully within the zone it disappears. As long as even one part of it sticks out of the zone though it will render.You could I guess surround the shape with portals which would make it render all the time, either from within the zone or outside the zone. Not sure if you can just make a cube-shaped portal that encompasses the object or if you'd have to make 6 individual portals to make a wall of portals around the object.
Give it a try and let me know the results, I'm curious. It's a good question.
Rene or someone from GG may chime in here with a better answer :)
P
#6

In that above image is a section of a level, what I would like to do it then have a kind of floating room that the player passes through that will take him into another zone that has the next part of the level (so when he emerges from this room the level he just completed will have disappeared and a new part will have appeared) so that I can split levels up and also make them longer without dropping the frame rate as much. The problem is the skybox in the background (the giant trees in this case) would have to be present constantly.
If anyone knows a solution I'd be very grateful
-Lewis
07/14/2011 (8:20 am)
Thanks for the reply Paul it might help if I describe my scenario a bit more clearly too. 
In that above image is a section of a level, what I would like to do it then have a kind of floating room that the player passes through that will take him into another zone that has the next part of the level (so when he emerges from this room the level he just completed will have disappeared and a new part will have appeared) so that I can split levels up and also make them longer without dropping the frame rate as much. The problem is the skybox in the background (the giant trees in this case) would have to be present constantly.
If anyone knows a solution I'd be very grateful
-Lewis
#7
D'oh, scratch my previous suggestion, I hadn't had enough coffee :) When a player looks through the zone or is inside it, if you have portals all around the zone and on top like I was suggesting above, then they will see right through to the other side. The thing is this makes the zone kind of moot, since you could see everything inside the zone from wherever and there wouldn't be any culling.
Alternatively, you could try placing a large zone around the treed area and put an equally-sized portal in the front of that zone, then as you look to the trees (either from out in the open or from within your special zone), the trees would render.
Using this logic, everything inside the zone is invisible until you enter it, but the trees are always there. When you enter the zone, everything outside becomes invisible, but as you look to the trees the portal in the tree zone would allow the trees to render even if you are inside another zone. Portals don't seem to have to be attached to two zones simultaneously in order to create a window from one zone to the other. The treed zone could be hundreds of units away from your special zone and the portal on the treed zone would still render the trees when you enter the special zone.
Does this make sense?
You'd have to set this up and test it to be sure, I'm just guessing here since all my portals happen to directly link different zones. I haven't tried this sort of arrangement before where the player would be in a zone but want a specific area far away to render which it normally wouldn't when inside another zone.
Try it and let me know. Hope I understood your question.
P
07/14/2011 (10:10 am)
Hi again,D'oh, scratch my previous suggestion, I hadn't had enough coffee :) When a player looks through the zone or is inside it, if you have portals all around the zone and on top like I was suggesting above, then they will see right through to the other side. The thing is this makes the zone kind of moot, since you could see everything inside the zone from wherever and there wouldn't be any culling.
Alternatively, you could try placing a large zone around the treed area and put an equally-sized portal in the front of that zone, then as you look to the trees (either from out in the open or from within your special zone), the trees would render.
Using this logic, everything inside the zone is invisible until you enter it, but the trees are always there. When you enter the zone, everything outside becomes invisible, but as you look to the trees the portal in the tree zone would allow the trees to render even if you are inside another zone. Portals don't seem to have to be attached to two zones simultaneously in order to create a window from one zone to the other. The treed zone could be hundreds of units away from your special zone and the portal on the treed zone would still render the trees when you enter the special zone.
Does this make sense?
You'd have to set this up and test it to be sure, I'm just guessing here since all my portals happen to directly link different zones. I haven't tried this sort of arrangement before where the player would be in a zone but want a specific area far away to render which it normally wouldn't when inside another zone.
Try it and let me know. Hope I understood your question.
P
#8
I'll have a play around with the idea and see what happens but if I'v understood your idea correctly I think I may have missed out a key point in that the trees circle the entire level (making a sort of 3d skybox like in Super Monkey Ball) not sure if this will impact on your idea but i guess id have to set up zones and portals in every direction to counter this.
-Lewis
07/14/2011 (11:10 am)
Thanks for the suggestion Paul,I'll have a play around with the idea and see what happens but if I'v understood your idea correctly I think I may have missed out a key point in that the trees circle the entire level (making a sort of 3d skybox like in Super Monkey Ball) not sure if this will impact on your idea but i guess id have to set up zones and portals in every direction to counter this.
-Lewis
#9
Ok, here's my quandry. Initially I wanted to create one large terrain and have 5-6 individual towns on it. But with no real occlusion that would have been a Frames Per Second nightmare.
Maybe the standard zones would have worked but there was little to no information on what they did or how to use them at that time so I opted for several individual levels instead. So people now have to go through the whole loading process from one area to another which is a pain. Not to mention I have to have so many more levels running on a server.
With Volume Occlusion, I'm beginning to think 1 large terrain in a single level might be less taxing on the physical server. I don't fully understand the difference between the old zones and the new Volume Occlusions though. Any clarification there would help.
Currently I have:
6 levels running on a single physical server - each has a 1024 x 1024 terrain with a grid size of 1, a scatter sky, a forest, a water plane, a typical town etc.
I'm considering:
1 level on the same physical server with a 2048 x 2048 terrain and a grid size of 2, a scatter sky, a forest, a water plane and 6 typical towns cordoned off by mountains and with a zone or volume occlusion to help with FPS.
Which is going to run the best with 100 players on at a time?
07/14/2011 (11:35 am)
Thanks for the video links! Very helpful in understanding zones and portals. Ok, here's my quandry. Initially I wanted to create one large terrain and have 5-6 individual towns on it. But with no real occlusion that would have been a Frames Per Second nightmare.
Maybe the standard zones would have worked but there was little to no information on what they did or how to use them at that time so I opted for several individual levels instead. So people now have to go through the whole loading process from one area to another which is a pain. Not to mention I have to have so many more levels running on a server.
With Volume Occlusion, I'm beginning to think 1 large terrain in a single level might be less taxing on the physical server. I don't fully understand the difference between the old zones and the new Volume Occlusions though. Any clarification there would help.
Currently I have:
6 levels running on a single physical server - each has a 1024 x 1024 terrain with a grid size of 1, a scatter sky, a forest, a water plane, a typical town etc.
I'm considering:
1 level on the same physical server with a 2048 x 2048 terrain and a grid size of 2, a scatter sky, a forest, a water plane and 6 typical towns cordoned off by mountains and with a zone or volume occlusion to help with FPS.
Which is going to run the best with 100 players on at a time?
#10
The way everything was explained to me was this:
- Zones are more designed for interior spaces
- Occlusion volumes are more for exterior spaces
Think of an occlusion volume like a stone wall around a town - you can't see through it, so there is no need to render what is behind. If you couple an occlusion volume with an actual model of a wall (create the occlusion volume, size it to the wall, and slide it just inside on the town side), you can achieve this effect where the player standing on one side of the wall has nothing being rendered on the other side. As long as the occlusion volume interrupts his line-of-sight, then anything behind it will not render.
Effectively, if you have large objects in your scene that the player cannot see through anyways, adding an occlusion volume around those objects will actually stop the rendering of what they can't see, which makes sense...
A zone is a bit different - it will not interrupt line-of-sight and stop the rendering of objects behind it, only what is INSIDE the zone. So placing a zone in the same way as above would NOT occlude anything other than what was inside it. Any areas where you want the player to see through the zone (either looking in or looking out) you put the portals which create a window in and out.
In your case, if each town was tightly squeezed in a valley with mountains all around, I would start by trying to create one large zone that surrounds the town and runs right up to the top of the valley rim. That way as a player climbs over the top of the mountain they enter the zone and the town is rendered. Or you could make the zone only as tall as the tallest building, and put a portal on top so when a player looks down from the valley rim they see the town since the portal renders it for them. But as soon as they go back down the outside of the mountain the town would stop rendering because the player is outside the zone and not in view of the portal.
If this works, then maybe try to come up with a more efficient set of zones and portals rather than just the one large one. You can work it out so parts of the town render but others don't, depending on your location and your view, to achieve optimal performance.
Anyhow, you'd really have to try various methods out. I am just an enthusiastic user of the zoning system and am not an expert or anything :) Perhaps someone like Rene or Tom will leave their thoughts here about your scenario.
07/14/2011 (1:00 pm)
Well, since the Occlusion Volumes are still buggy, I would say right now your best bet is the zones.The way everything was explained to me was this:
- Zones are more designed for interior spaces
- Occlusion volumes are more for exterior spaces
Think of an occlusion volume like a stone wall around a town - you can't see through it, so there is no need to render what is behind. If you couple an occlusion volume with an actual model of a wall (create the occlusion volume, size it to the wall, and slide it just inside on the town side), you can achieve this effect where the player standing on one side of the wall has nothing being rendered on the other side. As long as the occlusion volume interrupts his line-of-sight, then anything behind it will not render.
Effectively, if you have large objects in your scene that the player cannot see through anyways, adding an occlusion volume around those objects will actually stop the rendering of what they can't see, which makes sense...
A zone is a bit different - it will not interrupt line-of-sight and stop the rendering of objects behind it, only what is INSIDE the zone. So placing a zone in the same way as above would NOT occlude anything other than what was inside it. Any areas where you want the player to see through the zone (either looking in or looking out) you put the portals which create a window in and out.
In your case, if each town was tightly squeezed in a valley with mountains all around, I would start by trying to create one large zone that surrounds the town and runs right up to the top of the valley rim. That way as a player climbs over the top of the mountain they enter the zone and the town is rendered. Or you could make the zone only as tall as the tallest building, and put a portal on top so when a player looks down from the valley rim they see the town since the portal renders it for them. But as soon as they go back down the outside of the mountain the town would stop rendering because the player is outside the zone and not in view of the portal.
If this works, then maybe try to come up with a more efficient set of zones and portals rather than just the one large one. You can work it out so parts of the town render but others don't, depending on your location and your view, to achieve optimal performance.
Anyhow, you'd really have to try various methods out. I am just an enthusiastic user of the zoning system and am not an expert or anything :) Perhaps someone like Rene or Tom will leave their thoughts here about your scenario.
#11
Hmmm, you see no sky from within a Zone...I don't think that'll work.
How does it work from inside a Occlusion Volume?
07/14/2011 (4:20 pm)
Are the zones working as expected in T3D B3? We still haven't merged to Final.Hmmm, you see no sky from within a Zone...I don't think that'll work.
How does it work from inside a Occlusion Volume?
#12
Have not experimented much with the Occlusion Volumes since I have read they are still buggy in 1.1 Final, so I can't answer your question about the sky. A bug report has been logged and they are working on it.
I highly recommend merging up to 1.1 Final. It may be a bit of work but it's worth it, so many improvements in performance and editors, etc. Once you're up and running with that version, we would be on the same page in terms of being able to discuss how this all works.
07/15/2011 (8:26 am)
You have to upgrade to 1.1 Final to have proper working zones, they were buggy up until the Final release when Rene did a huge house-cleaning on the code.Have not experimented much with the Occlusion Volumes since I have read they are still buggy in 1.1 Final, so I can't answer your question about the sky. A bug report has been logged and they are working on it.
I highly recommend merging up to 1.1 Final. It may be a bit of work but it's worth it, so many improvements in performance and editors, etc. Once you're up and running with that version, we would be on the same page in terms of being able to discuss how this all works.
Employee Michael Perry
ZombieShortbus