www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Tomb Raider Level Editor Tutorials

Closed Thread
 
Thread Tools
Old 09-01-15, 19:07   #1
teme9
Professor
 
teme9's Avatar
 
Join Date: Nov 2005
Location: Finland
Posts: 3,257
Default Understanding importance of using small rooms versus big rooms

Understanding the importance of small rooms versus big rooms
by teme9 v1.001




INTRODUCTION

Being tired of sluggish editing and stuttering gameplay? Have you ever tried to come up with a solution that how you could get rid of it? Lowering level far view can have drastic improvements on game performance but sometimes that isn't enough and won't speed up the editor either! One pretty usual thing that causes stuttering in-game and in editor is that the level is built from huge rooms. Huge rooms might be nicer to build with but they're bad choice for a level that needs to be detailed. Try using smaller rooms since they benefit from built-in room occlusion culling that is in Tomb4.

What does it do or mean?

Every room is connected to each other with portals. The portals determine how the room is shown to the room when you view through it. So basically they are like windows that tell you what you can see through them. The areas that are not covered with portal will work as occluders – the occluders will cause the engine to not to draw the areas behind them.


BASICS OF ROOM OCCLUSION CULLING





As you can see from this picture the area that is built from bigger rooms does have less area that is not drawn. The area which is built from smaller rooms has more area that is not being drawn. So as you can see the smaller rooms benefit more from the room occlusion culling – less is being drawn therefore you will have better performance if the areas are detailed. Also in editor the rooms are nicer to build since the roomeditor won't be stuttering as much as it would stutter with huge rooms.

Let's compare actual editor material. Area built with 1 room and area that is built from smaller 4 rooms. The areas have a thick wall at the center of the area. The wall is textured transparent so you can see the effect in-game.






*Notice the portals (doors) how they are used. There is no portal for the whole area of the wall which connects the rooms to each others. If I were to place portal inside the wall this area would not benefit from the room occlusion culling since the editor (green) wall does not occlude geometry. Place portals(doors) so that they do benefit from the room occlusion culling!


IN-GAME COMPARISONS

Area built with one room:



Area built with multiple rooms:




Compare these two. As you can see the area which is built with one room does draw everything in that one specific room while the area which is divided into smaller pieces does not draw everything all the time! Even the objects are not drawn that are behind the thick wall that is in middle of the area. In the area which is built from 1 room and the thick wall is made from actual editor (green)wall does not cull off any geometry.


STATIC AND MOVEABLE OBJECTS


Visibility (and collision for some moveables) boxes are things that affect how they are dealt with room occlusion culling. The bigger visibility box the object has then it less likely to be culled off when it is not visible to camera.

Notice!
Lowering/rising ceiling or floor does not enable culling neither does walls (green areas in room editor). Only room borders (dark grey areas in 2d-up view of your room in editor) occlude and portals show geometry.

The point of this guideline is that you think if a small rooms are needed for your area. There isn't necessarily need to use small rooms all the time. This is a way how you can gain performance for your levels especially if you're having a lot of static objects or large sceneries with complex room geometry.

Last edited by teme9; 09-01-15 at 19:09.
teme9 is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 07:20.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.