Concave corners - vertexes do not stay on the grid

Any aspects of level design for the Source engine.

Re: Concave corners - vertexes do not stay on the grid

Postby Text_Fish on Sun Jan 29, 2012 8:23 am

But it's not complex Phott, it's a triangle. That's the most simple face you can possibly have, infact it's the backbone of all 3D graphics which is why the vis process splits everything up in to triangles. The brush would be complex if the parallel face weren't exactly the same shape/size, but by the looks of it it is, so the brush is the second most simple brush you can possibly have after a three sided spike. Hence, this is a bug in hammer rather than poor brush work.
Mappers Top Tip #548
Lighting: The arrangement, hue and intensity of one or multiple light sources.
Lightning: A dazzling discharge of electric sparks in the atmosphere, often preceding thunder.
User avatar
Text_Fish
Been Here A While
Been Here A While
 
Joined: Tue Jul 21, 2009 8:41 am
Location: Bristol, UK

Re: Concave corners - vertexes do not stay on the grid

Postby zombie@computer on Sun Jan 29, 2012 9:25 am

its not a bug; the plane intersection algorithm in hammer is quite imprecise. Especially very sharp angles (eg edge of a knife) are prone to move around. This could be countered by using double precision or more, but usually such precision isnt needed in games.
When you are up to your neck in shit, keep your head up high
User avatar
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Oss, Netherlands

Re: Concave corners - vertexes do not stay on the grid

Postby Text_Fish on Sun Jan 29, 2012 9:40 am

Okay maybe bug's the wrong term but the occurence of Sathor's issue seems completely random as that method for concave corners is usually flawless in my experience and in Sathor's up until now evidently. If he's manipulating one vertex (or group of aligned vertexes) at a time and all vertexes are snapped to grid I don't understand how all of the methods he's tried can keep failing so it appears to me that there's some other constant effecting the map.
Mappers Top Tip #548
Lighting: The arrangement, hue and intensity of one or multiple light sources.
Lightning: A dazzling discharge of electric sparks in the atmosphere, often preceding thunder.
User avatar
Text_Fish
Been Here A While
Been Here A While
 
Joined: Tue Jul 21, 2009 8:41 am
Location: Bristol, UK

Re: Concave corners - vertexes do not stay on the grid

Postby Phott on Sun Jan 29, 2012 11:14 am

I don't think those brushes would get affected if there was something else.
User avatar
Phott
Veteran
Veteran
 
Joined: Thu Sep 11, 2008 6:34 pm

Re: Concave corners - vertexes do not stay on the grid

Postby Sathor on Sun Jan 29, 2012 11:17 pm

Now, thanks for your help guys ...

But I have now redone everything with a different method - like Phott did.

But the same issue remains. I just loaded the saved file again and discovered the vertexes at the tip of the both farthest out and sharpest brushes have strayed again!

...
User avatar
Sathor
Senior Member
Senior Member
 
Joined: Sat Jan 20, 2007 10:31 pm
Location: Germany

Re: Concave corners - vertexes do not stay on the grid

Postby Sathor on Mon Feb 06, 2012 1:11 pm

Phott and me (thanks Phott!) have talked for a long time about the issue and both of us have done some experiments.

http://img84.imageshack.us/img84/5783/s ... rtexes.jpg

This is what happens when I create such triangles. I tested with 1xY (Y = 1 to 10) and 2xY (Y = 1 to 10). The point-vertex will begin to stray with the 1x3 or 2x6 triangle. The 2x5 is fine (see the screenshot).

Now, in the last few minutes, we have come a lot closer to the problem.

I had sent Phott my map file and he looked at it in Hammer. He did not have the issue.

BUT! He tested with DoD:S, not CS:S.

Now, I have done the SAME tests with EP2 ... and all vertexes stay on the grid.

So it would seem that the issue is related to the Source Engine version which CS:S uses.

Perhaps zombie can explain a bit more?
User avatar
Sathor
Senior Member
Senior Member
 
Joined: Sat Jan 20, 2007 10:31 pm
Location: Germany

Re: Concave corners - vertexes do not stay on the grid

Postby Phott on Mon Feb 06, 2012 1:18 pm

I am absolutely perplexed. Brushes that stay on grid on a newer engine go nuts on an older engine, and I've never seen it before.
User avatar
Phott
Veteran
Veteran
 
Joined: Thu Sep 11, 2008 6:34 pm

Re: Concave corners - vertexes do not stay on the grid

Postby Smurftyours on Mon Feb 06, 2012 3:42 pm

Counter strike is OB engine though, its no more out of date than tf2 or Dod:s, which makes this even more confusing.
jangalomph wrote:Wise words from a wise man. ^
User avatar
Smurftyours
Senior Member
Senior Member
 
Joined: Tue Aug 04, 2009 6:11 pm
Location: California, US.

Re: Concave corners - vertexes do not stay on the grid

Postby Phott on Mon Feb 06, 2012 4:05 pm

Smurftyours wrote:Counter strike is OB engine though, its no more out of date than tf2 or Dod:s, which makes this even more confusing.

That's what I thought, but the issue only came up in CSS so that's the first thing that came to mind.
User avatar
Phott
Veteran
Veteran
 
Joined: Thu Sep 11, 2008 6:34 pm

Re: Concave corners - vertexes do not stay on the grid

Postby zombie@computer on Mon Feb 06, 2012 5:36 pm

Sathor wrote:Phott and me (thanks Phott!) have talked for a long time about the issue and both of us have done some experiments.

http://img84.imageshack.us/img84/5783/s ... rtexes.jpg

This is what happens when I create such triangles. I tested with 1xY (Y = 1 to 10) and 2xY (Y = 1 to 10). The point-vertex will begin to stray with the 1x3 or 2x6 triangle. The 2x5 is fine (see the screenshot).

Now, in the last few minutes, we have come a lot closer to the problem.

I had sent Phott my map file and he looked at it in Hammer. He did not have the issue.

BUT! He tested with DoD:S, not CS:S.

Now, I have done the SAME tests with EP2 ... and all vertexes stay on the grid.

So it would seem that the issue is related to the Source Engine version which CS:S uses.

Perhaps zombie can explain a bit more?
Your guess is as good as mine. :)

The algoritm that constructs geometry from planes in the sourcesdk codebase is the same as the one found in the leaked hammer sourcecode (i've HEARD, i dont have this zip file full of hammer source code files lying around on my D: disk under /projects/ of course). I can only assume valve never altered anything, but its possible they've added some extra vertex rounding or increased precision in the last engine(s). I can't imagine it in all honesty, but its the only explanation i can think of.

No, wait, i can think of one more explanation. Did you create all triangles at the same location in both engine versions ? Internally 32 bit floating point arithmetics are used. It may be possible that different positions might just reach a border of precision (the larger the value in a floating point, the less precise it becomes).
When you are up to your neck in shit, keep your head up high
User avatar
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Oss, Netherlands

Re: Concave corners - vertexes do not stay on the grid

Postby Mehis on Mon Dec 31, 2012 5:18 pm

Since I'm trying to use the same method as Sathor, I stumbled upon this problem myself too. I tried to research the problem a little bit. I found some weird results.
I know that my example is far more extreme than Sathor's.

On the bottom you can see the arch I'm trying to create.
I copied the same arch, with different textures and I turned it 90 degrees.

Image

After snapping each individual vertice to grid (like they should be), I saved and reopened the map.
This is the result.

Arch #1 from Front view

Image
VMF Coords (Example):
Code: Select all
"plane" "(-918.986 3072 1456) (-918.986 2880 1456) (-918.986 3015 1452)"


Arch #2 from Side view

Image
VMF Coords (Example):
Code: Select all
"plane" "(-1032 2749.99 1560) (-840 2749.99 1560) (-975 2749.99 1556)"


The rotated arch is far more accurate.

I also tried same map with 2006, 2007 and MP. 2006 and 2007 gives the same results, however MP decides to scatter vertices even more.

But in the end, can't we actually fix the problem by using -block/-blocks BSP command? I have no idea how to use it, though.
So should I redo my arches?
User avatar
Mehis
Regular
Regular
 
Joined: Fri Jan 28, 2011 8:41 pm

Re: Concave corners - vertexes do not stay on the grid

Postby MaK on Mon Dec 31, 2012 9:36 pm

I would stick with Phott's method. It may not be the most optimized but it should work.

Phott wrote:Image
User avatar
MaK
Senior Member
Senior Member
 
Joined: Thu May 18, 2006 12:08 am
Location: USA
Previous

Return to Hammer Editor Help

Who is online

Users browsing this forum: Alexa [Bot]