In Memoriam: Tai'lahr

OpenUru.org, along with the rest of the Mystonline community, is mourning the loss of Tai'lahr on October 16th, 2019.

Rest in Peace, friend.

Vis Regions: Controlling When Something Is Rendered

From OpenUru
Revision as of 11:22, 29 July 2011 by Andylegate (talk | contribs) (Created page with "What are "Vis Regions" or "Visibility Regions" ? Vis or Visibility Regions are a concept that have been around every since the first real time rendering games were ever put out....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

What are "Vis Regions" or "Visibility Regions" ?

Vis or Visibility Regions are a concept that have been around every since the first real time rendering games were ever put out. They are used to help with performance of a game, or in our case, with the performance of an Age.

We basically use Vis Regions to help make a person's GPU (Graphic Processor Unit) not have to work so hard when it does not need to. A good analogy of this would be if you were to try and write a letter to someone, but at the same time you are talking on the phone to another person, about some other subject.

Very hard to do, at least for me anyways!

Vis Regions will tell the Plasma game engine to NOT render or draw things when they are not needed.

Let's use my Age Neolbah as an example:

Neolbah currently has 2 levels: The Atrium and the Basement. Using Visregions, I can tell Plasma that while a player is up in the Atrium area, to NOT render or draw the basement area. There is no need to since the player can not see the basement area while in the Atrium area.

The flip side of that works too: I can use Vis Regions to tell Plasma to NOT draw the Atrium area while the player is down in the Basement. Because while a player is down there, they will not see the Atrium area.

By doing this, I can increase the performance of my Age so that there is no lag or stutter, and have high rendering frame rates.

So how do we do this? Read on:


Setting Up A Region

When you go to put in a Vis Region, you need to think about it first: Where can I put in a Vis Region that will help, but not so the player will see this? You do not want to put in a Vis Region to where the player will actually see things pop in and out of existence (or you may want to, but for the purpose of this tutorial, we'll keep it as though you don't want that to happen).

Vis Regions should control when things are rendered, but it should do so "behind the scenes" and not something the player should be aware of.

Neolbah's basement is a very good example of an area that I can put into a Vis Region, but also so that the player will not see it. Here is the Basement Area of Neolbah:

http://assets.openuru.org/wiki/andy/MaxTutPics2/Visreg1.jpg

All I need to do is create my region. I can do that by making a huge box that encompasses the basement area:

http://assets.openuru.org/wiki/andy/MaxTutPics2/Visreg2.jpg

Notice how my region goes up the elevator shaft, but not all the way up of course. What I am doing, is making it to where the player enters the Vis Region so that the Basement will start to be rendered by Plasma, but it will do so BEFORE the player get's there.

Now we have to make this region a "Soft Volume". In the Component Manager, click on New > Region > Soft Region:

http://assets.openuru.org/wiki/andy/MaxTutPics2/Visreg3.jpg

In the Utils Tab, if you click on the Soft Volume component, you can see the roll out for it. We don't need to change anything here since we are going to use this Soft Volume as a Vis Region:

http://assets.openuru.org/wiki/andy/MaxTutPics2/Visreg4.jpg

Now we need to make it an actual Vis Region. Open up the Component Manager and click on New > Region > Visibility Region:

http://assets.openuru.org/wiki/andy/MaxTutPics2/Visreg5.jpg

Go to your Utils Tab and click on the Visibility Region component to look at it's roll out:

http://assets.openuru.org/wiki/andy/MaxTutPics2/Visreg6.jpg

You will see a box that says "Regions" with a button that says none. Click on that button, and then pick the Soft Volume we assigned to this region. Leave every thing else alone.

Now you must select ALL of your visible objects that are in that region. BUT! Do NOT select objects that cross over from that region. For example, my elevator shaft is both in and out of the vis region. I don't want it to not be drawn, I need to leave it there so that the player always sees it. Keep this in mind when making vis regions.

Once you have all the visible objects selected that are in your Vis Region, call up the Component Manager, and assign the Visibility Region component that you used:

http://assets.openuru.org/wiki/andy/MaxTutPics2/Visreg7.jpg

This tells those objects to not be rendered unless the player has entered that region.

There you go, you are done!

However, this simply turns off and on the objects in the Basement. While in the basement, everything in the Atrium is being rendered too. If I wanted the Atrium Area also not rendered, I would create a 2nd Vis Region around the Atrium Area and repeat the steps above for it. However, I would still NOT include the elevator shaft, as it needs to be rendered no mater which vis region the player is in.




Return To: 3DS Max Plugin Tutorials

Copyright (C) 2011 Andy Legate.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU Free Documentation License".