Please or Register to create posts and topics.

Need help with a project - Source Optimization "test"

PreviousPage 2 of 3Next
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.

?????????????????????????????TWP Releases | My Workshop

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?

Falsi sumus crusto!
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?

Image
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 :)

Technically D will split up into different visleafs anyway. Probably into option A or C (or a mix inbetween).

But that diagram is foolproof.

?????????????????????????????TWP Releases | My Workshop

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.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

What's the best way to solve this?
Image
or maybe something else?

Hint 1

Spoiler
Image

Hint 2:
Spoiler
What seems to work? What doesn't?

Hint 3:
Spoiler
Can you try something else maybe?

Answer
Spoiler
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:
Image
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! :D

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:

Code: Select all
------------------
|      /        |
|     /         |
|    /------    |
|   / |    |    |
|  /  |    |    |
| /   |    |    |

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 thrid dimension), not a single one as I guess there is in that example.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

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.)

Falsi sumus crusto!
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
Spoiler
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.

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:

Image

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 :D 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 :wink:

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 :D), 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:
Image

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]
PreviousPage 2 of 3Next