Need help with a project - Source Optimization "test"

Avatar
msleeper
4,095 Posts
Member
Posted Feb 26, 2013
I have made the joke whenever I link people to the optimization guide that they "will be tested on this material". I would like to make that a reality.

If anyone would be interested in coming up with multiple choice questions for this thing, go ahead and just post them. Try to make them require actual thought, and not just memorization or fact regurgitating.

I am not looking for jokes or people trying to be smart asses. Serious input only, please.

Advertisement
Registered users don't see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted Feb 27, 2013
Replied 10 hours later
Hey Sleeper! I think this thread can be a really really good idea. I'd like to offer myself to actively take part on this project, but not only with multiple choice questions (theoretical approach), but also encouraging ppl to take part posting some basic test maps to optimize, like practical excercises (you know, func_detailing, texturing nodraw the non-viewable sides of brushes, making skip/hint brushes or even adding areaportals...)... and I'm not saying "post your maps to optimize" (Lp already opened a thread for somewhat doing that), but to post "empty" maps (ofc puzzle elements can be included but only for didactical purposes) specifically created for being optimized (intentionally looking for specifical optimization solutions). We all can contribute posting the best optimized version we could think of, our personal approach; and the rest can check and discussed any possible improvement or advise... this way we can all improve ourselves at optimization and learn from the rest...

My meaning is only complement with practical situations what you were suggesting I'm just saying because you knowm, even though we all know more or less the theory, sometimes you want a specific layout (because of aesthetic or puzzle purposses) that it's actually difficult to optimize perfectly like open areas with surrounding side-rooms where enclosing the leafs is not so easy and such...

What do you think about it?

Avatar
FelixGriffin
2,680 Posts
Posted Feb 27, 2013
Replied 7 hours later
Which of the following should (usually) be a func_detail? Select all that apply.
A) The wall of your test chamber.
B) The clipped frame around the testchamber door.
C) Sculpted terrain brushes/displacements.
D) Static props, such as diversity vents.
Avatar
Lpfreaky90
2,842 Posts
Posted Feb 28, 2013
Replied 1 day later
Aperture has is planning to build a new test chamber; they want to make it look like this:

What is the best way build it.
a) Just build it already and pop the player in and just forget about the windows.
b) Just build the building. And put a skybox in front of all the windows.
c) Build the building and build the exterior with func_details as far as the eye can see.
d) Build the buildings and build the exterior as far as the eye can see.

To let the employees of aperture chill a bit Aperture decides to build a garden.

What's the best way to fake the grass?
A) Just make a grass brush.
B) Make a grass brush; grab the carve tool and make it look pretty.
C) Make a grass brush; grab the carve tool and make it look pretty; then make it a func_detail.
D) Make a grass brush; make it a displacement.
E) Make a grass brush; make it a displacement and put a nodraw brush underneath it.

Because the people at Aperture decide it's time to make a nice building inside a big square room.
However; after building the garden and the exterior they're running a bit low on render budget.

What's the best way to build the pillars?

a) Build the brush based pillar.
b) Build the brush based pillar and make it a func_detail
c) Build the brush based pillar and make it a func_brush
d) Create a custom prop_static model.
e) Create a custom prop_physics model.
f) Create a custom prop_dynamic model.

Aperture found images of an abandoned factory and want to build it they hire you to build it for them.

What would you make func_details?
A) Nothing.
B) The pillars.
C) The second floor
D) The second floor and the pillars
E) Everything but the ceiling and the brick wall
F) Everything but the ceiling
G) Everything!

Avatar
msleeper
4,095 Posts
Member
Posted Mar 01, 2013
Replied 2 hours later
I said it in IRC but I'll say it here - I love the idea of using real world photos as examples for how to visualize questions. That said, while detailing is important, there's a lot more aspects to optimization that can be addressed. Hint brushing is an art that I think most people fail to grasp. Areaportals / areaportalwindows are another big one too.
Avatar
HMW
806 Posts
Posted Mar 02, 2013
Replied 1 day later

What is the best way to divide this hallway into visleaves?

visleaves.png
Avatar
ChickenMobile
2,460 Posts
Posted Mar 02, 2013
Replied 7 hours later

HMW wrote:
What is the best way to divide this hallway into visleaves?
visleaves.png

None of the above. Sorry HMW

josepezdj wrote:
posting some basic test maps to optimize, like practical exercises

This is the best thing you said in your whole paragraph of text. Giving out example maps with solutions is a great way to get people to optimise.

I might like to make one of these maps.

Avatar
taco
504 Posts
Posted Mar 03, 2013
Replied 26 minutes later

HMW wrote:
What is the best way to divide this hallway into visleaves?
visleaves.png

Option E:

------------------
|      /  \      | 
|     /    \     |
|    /------\    |
|   / |    | \   |
|  /  |    |  \  |
| /   |    |   \ |
Avatar
srs bsnss
552 Posts
Posted Mar 03, 2013
Replied 9 hours later

HMW wrote:
visleaves.png

...whoopsy daisy

In regards to josepezdj's post, the example maps sound like a great idea. I might toss one together.

Should we make some that have optimization errors as well? (incorrect usage of func_deatiling, incorrect usage of hint/skip brushes, stuff like that)

Avatar
HMW
806 Posts
Posted Mar 03, 2013
Replied 3 minutes later

taco wrote:
Option E:

```


|      /  \      |
|     /    \     |
|    /------\    |
|   / |    | \   |
|  /  |    |  \  |
| /   |    |   \ |
```

Unless you have a crazy amount of detailed stuff right around the corner, that is complete overkill.

Avatar
ChickenMobile
2,460 Posts
Posted Mar 03, 2013
Replied 2 hours later

HMW wrote:
Unless you have a crazy amount of detailed stuff right around the corner, that is complete overkill.

That's how I have always done it bro. And it is the best way.

Avatar
FelixGriffin
2,680 Posts
Posted Mar 03, 2013
Replied 2 hours later
As a not-very-good optimizer, I don't really understand what makes those options better or worse. I know what visleaves are, but how do you figure out which arrangements are best?
Avatar
Lpfreaky90
2,842 Posts
Posted Mar 03, 2013
Replied 1 hour later

FelixGriffin wrote:
As a not-very-good optimizer, I don't really understand what makes those options better or worse. I know what visleaves are, but how do you figure out which arrangements are best?


You are where the star is. The visleaf where you are is colored green.
Now draw lines to see what can see what (purple lines).
All visleaves you can see are now colored orange.

The image with the least green/orange is the one that renders the least, therefor that one is the best option.
In this case the best answer is:
E, C&B, A, D (although hammer will make a visleafs there anyways, C or A, depending on its mood.)

Hopefully that helps

Avatar
ChickenMobile
2,460 Posts
Posted Mar 03, 2013
Replied 4 hours later
Technically D will split up into different visleafs anyway. Probably into option A or C (or a mix inbetween).

But that diagram is foolproof.

Avatar
msleeper
4,095 Posts
Member
Posted Mar 03, 2013
Replied 2 hours later
And this is exactly why we need this test.

If anyone can come up with more visual examples for hints, please do. I'm a fan of the "two adjacent rooms connected by a corridor" one. I don't want anyone to start thinking too narrowly about what needs to be done by using the same specific example over and over.

And I really like the idea of a VMF that needs to be "fixed", but for the purposes of this test (which will be a multiple choice "quiz"), let's stick to visual examples and other types of multiple choice questions.

Avatar
Lpfreaky90
2,842 Posts
Posted Mar 04, 2013
Replied 3 hours later
What's the best way to solve this?

or maybe something else?

Hint 1

Hint 2: What seems to work? What doesn't?
Hint 3: Can you try something else maybe?
Answer
||The diagonal cuts like in the second image are working: If we stand on one side the other side is hidden. The extra diagonal cuts in the final image are also a bit helpful, so if you have something that's expensive to render in that cornerx: put them in.
Generally however that part of the corner isn't the most expensive thing to render so I choose not to draw them in my solution, I don't think in this case they're worth the extra visleafs.
If you do have something expensive to render there though; do use the extra hint/skips!

The biggest problem we have is the problm that there is a very stretched corner between the bottom part and the separate top parts. You can draw lines almost parallel to wall that will stretch forever, making it almost impossible to do that with hint/skip!
So here's my solution:

As you can see; I kept the lines as in 2. And I added an AREAPORTAL where the green line is.
A hint wouldn't be effective here; we can draw a line through it from the top part. What you will be able to see is marginal; but the visleaf would still be rendered.
With an areaportal you only have to render that small bit! ||

Avatar
josepezdj
2,386 Posts
Posted Mar 04, 2013
Replied 3 hours later
About these cases, I also learnt some time ago from the optimisation guide Msleeper posted indeed, that the best aproach is what Taco posted:

taco wrote:
Option E:

```


|      /  \      |
|     /    \     |
|    /------\    |
|   / |    | \   |
|  /  |    |  \  |
| /   |    |   \ |
```

However, as HMW pointed out, this will depend on the amount of entities to render into each leaf.

However, my suggestion about making a map with a "special layout" was right because there are some cases much more complex than just the example above, including several levels (the thrid dimension), not a single one as I guess there is in that example.

Avatar
FelixGriffin
2,680 Posts
Posted Mar 04, 2013
Replied 3 hours later
I think this quiz is a really good idea! I've only used areaportals once before, and never used hints and skips, so this is mostly new to me.

Lp, just a small typo in your first hint--in the fourth row, second column, the top left area looks like it should be orange. (I may be wrong on this.)

Avatar
Lpfreaky90
2,842 Posts
Posted Mar 04, 2013
Replied 2 hours later

FelixGriffin wrote:
Lp, just a small typo in your first hint--in the fourth row, second column, the top left area looks like it should be orange. (I may be wrong on this.)

well yes of course My fault, sorry. If you're in a visleaf obviously the adjacent is visible! Cheers, should be fixed now!

josepezdj wrote:
interlopers image

However, as HMW pointed out, this will depend on the amount of entities to render into each leaf.

However, my suggestion about making a map with a "special layout" was right because there are some cases much more complex than just the example above, including several levels (the third dimension), not a single one as I guess there is in that example.

A few things here:
- The interlopers tutorial has a 45 degree angle; this has a 60 degrees angle. The most important thing is that both ends can't see each other. That's done by drawing the line through the corridor.
- It's worth noticing that in this case both rooms aren't rendered at the same time with solution E:

https://dl.dropbox.com/u/37801279/twp/o ... skillz.png
- As for the third dimension: you can tread that the same as the 2d-version; but rather than using the xy plane you have to look at xz and yz planes; but the same rules apply.

Advertisement
Registered users don't see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted Mar 04, 2013
Replied 2 hours later
Well, I was talking more about HMW's example and those latter drawings. However I'd apply the same approach to your case. Meaning that my solution for your problem would be none of yours, but for example the following one:

Lpfreaky90 wrote:
- As for the third dimension: you can tread that the same as the 2d-version; but rather than using the xy plane you have to look at xz and yz planes; but the same rules apply.

Yeah I know but I'm meaning all at the same time: an upper room added to your case... it's easier to create a map and post it, or maybe only post some pictures of it

EDIT (further thoughts after chating with Lp)

  • I really think I won't use that specific layout because that layout is the problem itself for a good optimisation. I'd make those corners on the left middle of the drawing more closer so both meet my red line.

  • A good lesson a mapper should also learn is that while you're mapping you must have this kind of possible issues in mind and try to find the best layout possible that allows you the best (later) optimisation.

  • As an addition to the above point, even though we discuss "theorical situations" here, the mapper will have the last word about where could the player actually be in each case depending on the puzzle and elements; this way, the mapper can indeed think of a way to prevent rendering of many "costy" leaves by changing the puzzle to his advantage.

  • Even though I created more visleaves with my division, this DOESN'T mean a worse optimisation, maybe slightly a more compiling time, but not a worse performance. However I'd change a bit those angles to make possible a better optimisation.

  • This problem we're discussing is about which areas can see the other ones, thus visibility, we should not forget bout that. Those lines I drew are actually dividing real visibility areas from the others. I'm not sure if in the end I would use them though (if I would ever have to use that layout ), if there were not many entities there in those 2 upper corners I isolated with my red lines, because they won't help much to a better performance.

So this would be my layout: