Did you know? All of these messages will likely be replaced before release.

"Origin" Question

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: ividyon, Semfry, zYnthetic

User avatar Teridax
Skaarj Warlord Skaarj Warlord
Posts: 869
Joined: 11 Apr 2009, 04:10

Subject: "Origin" Question

Post Posted: 07 Oct 2015, 04:03

In brushes, is the polygon origin important? I'm talking about when you copy a brush, paste it into the editor, and see something like this:

► Show Spoiler


I have three questions:

1. Is the origin at all important?
2. If the origin is slightly off, will that negatively affect the BSP?
3. How can I stop brushes from going off grid?

From what I can tell, the vast majority of my brushes somehow managed to be off-grid even though I have had toggle vertex snap on the entire time; I've been doing actor align, and while it usually fixes the vertex problems, the origin remains unchanged. I've been operating under the assumption that the origin isn't important, but I get the feeling I'm very wrong about that.

As for the brushes constantly going off grid, I don't know how it keeps happening and I don't know how to stop it. Is there anything I can do?

Wrestling with the BSP in this map is infuriating and I've never had a map go to shit on me so quickly. At this point I get the feeling that I'll have to rebuild most (if not all) of it from scratch.
Image

gopostal
Skaarj Assassin Skaarj Assassin
Posts: 132
Joined: 01 Aug 2008, 06:35

Subject: Re: "Origin" Question

Post Posted: 07 Oct 2015, 04:51

1. Yeah it can be hugely important but this depends on what you are doing. If your brush is static then it's not AS important but it's still used to compute collision and will provide a centerpoint for rotation in any axis. This is why you see some pickups rotating incorrectly. Their mesh origin isn't centered correctly.
2. The origin is used by the engine to compute the collision box. As such it doesn't need to have an 'on the grid' value because it isn't used in that manner. It does simple calculations using the origin value and from that decides if you collided with the brush, etc.
3. Stick with using grid values and do these two things:
A) Try to manually rotate brushes as little as possible and reset your builder brush if you do
B) NEVER adjust main scale or post scale on brushes, bad things happen to the BSP when you do

If you have questions and you want to discuss in-depth just let me know. I'll meet you on Skype/someone's TS server and answer anything I can.

User avatar Teridax
Skaarj Warlord Skaarj Warlord
Posts: 869
Joined: 11 Apr 2009, 04:10

Subject: Re: "Origin" Question

Post Posted: 07 Oct 2015, 05:17

Okay, that clears some things up. Thanks for the quick response.

I have some new questions, though.

1. Does Transform -> Mirror about x/y/z have the same effect as a manual rotation (so if I mirror a brush, will it still get messed up like it does with manual rotation)? Also, if I enter in the rotation values instead of using the rotation tool, would that be any better?

2. For the 2d shape editor, there are a lot of times where I need to rotate the brush in order to use it at all (like with corridors). In the event that I absolutely have to rotate a brush, what should I do? Would it be best for me to just rotate the brush, or should I try to avoid using the 2d shape editor altogether if I'm going to run into problems like that?

3. Would it be possible for me to salvage my map by copying brushes, pasting them into notepad, and fixing the values so that they're on grid?

4. Is the prepivot at all significant? I know the pivot is for where the brush will rotate from, but I don't know what the prepivot does. I remember reading something on OldUnreal saying that the prepivot being off could indicate a bad brush, but I can't find it for the life of me.
Image

yrex
Skaarj Scout Skaarj Scout
Posts: 38
Joined: 07 Oct 2015, 11:19

Subject: Re: "Origin" Question

Post Posted: 07 Oct 2015, 12:10

The polygon origin seems to be only related to texture alignment. You can even remove it completly from the T3D and it will still import.

The polygon origin is unrelated to brush origin.

1) Transform -> Mirror just inverts one of MainScale axes. Because it's a simple multiplication, it should cause less problems than rotation which uses trigonometry.

2) If you badly want to rotate the brush without causing rounding errors, paste it in notepad and manually swap/invert the coordinates (assuming that you want to rotate by multiplies of 90 - in other cases you can't avoid rounding).

3) If you consider doing so, remember that you would only need to change Vertex values (not polygon Origin). And watch out for non-planar polys.

For which game are you mapping? Unreal 227 has two great features which help fighting BSP problems simply by not using BSP at all - static meshes and dynamic zones.

User avatar Teridax
Skaarj Warlord Skaarj Warlord
Posts: 869
Joined: 11 Apr 2009, 04:10

Subject: Re: "Origin" Question

Post Posted: 07 Oct 2015, 19:12

Thanks for the reply.

I use 227, but unfortunately the project has already been announced for both UT and 227, so I won't be using static meshes and dynamic zones any time soon for the sake of compatibility. At this point if I wanted to fix all the problems this map has I'd have to completely rebuild it. To say that I'm feeling burnt out would be an understatement.

Will the editor at least let me duplicate brushes without any problems, or can I not do that either?
Image

User avatar AlCapowned
Skaarj Warlord Skaarj Warlord
Posts: 861
Joined: 19 Dec 2009, 22:25

Subject: Re: "Origin" Question

Post Posted: 07 Oct 2015, 20:58

Not that this helps with your problem, but we could always do a poll to see what people want. What good is ensuring compatibility if it means you end up hating making maps? 227 would also make things easier for the other mappers else on the team, I imagine.

User avatar editor Dave
Skaarj Berserker Skaarj Berserker
Posts: 272
Joined: 05 Apr 2008, 15:38
Contact:

Subject: Re: "Origin" Question

Post Posted: 08 Oct 2015, 01:09

Thanks for the info on the origins.

@Teridax:
I also have the "slightly off grid vertices" (less than 1uu) caused by vertex editing, even though they shouldn't be. A friend of mine used to tell me it's a graphical glitch than a real problem which he has all the time as well.

Abandoning rotation, 2DShape Editor, duplicating or whatever alltogether might be a very safe way to solve your problem, but it would limit your mapping immensely that I wouldn't recommend it. I would check the following things instead:

1a. Does any brush have a lot of vertices (such as Terrain or a huge intersected brush)? If it is terrain built by the Terrain Tool, make sure the vertices differ only in height compared to the original brush (= the original grid of the Terrain Builder Brush should be visible via the top view, not the side views) and the brush's polygon is set to "seperated", not "merged". If it is an intersected brush, seperate the brushes again (by rebuilding it or copying from an older data).

1b. Check if some other surfaces should be rather merged or seperated compared to how they are at the moment.

2. Is there a brush with a skew surface? This will always cause huge errors, so change the brush immediately.

3. "Tidy up" with brush orders. For example recently I could solve big BSP issues just by changing some of the brushes' orders "to last". It helps with Zone Portals especially. If you want to take the time you could reduce all orders of the map's brushes to a very small number, if you define the row with every brush of the same order at once (though not necessary, will also reduce file size btw).

4. Mess with Semisolids. Some say it helps the geometry if you change every brush to a semisolid that can be turned into a semisolid. Some say don't ever use them, unless you get real problems, and then use the first method. Some say, use Semisolids only if you want to solve a BSP error in a specific place (though this method makes your brushwork look random/unkempt.)

5. Is there a brush copied from another map? Rather import it or duplicate it. Copying can cause some strange errors like invisible brush frames (when turned off in the Advanced Options, they will be invisble after a rebuild again), and more.

6. Are there any super complexly rotated brushes (= not in a 90/180/270° degree angle, in several directions)? Try to reproduce the brush with vertex editing of cubes, so all vertices are on the 16 grid.

7. If everything else fails: Is there a possibility to make meshes out of some complex brushes? => Mesh maker. However, this may cause errors with correct texture display of the Mesh, but only if you are unlucky :p (and of course, the lighting is worse -ooooor you do make it 227-only and have less problems and more possibilities)
The Unforchers will come again soon...

User avatar Teridax
Skaarj Warlord Skaarj Warlord
Posts: 869
Joined: 11 Apr 2009, 04:10

Subject: Re: "Origin" Question

Post Posted: 08 Oct 2015, 01:22

Thanks for the input, dave. I didn't know that brush order would be so useful.

The only brushes from other maps are from the ending of the previous map and CTF-Niven, but the problematic brushes are in the center area; they're just made out of simple squares so I was upset to find out that the entire area was off grid.

I'm heavily leaning towards using 227, but in any case I will definitely give your suggestions about brush order a shot.
Image

User avatar editor Dave
Skaarj Berserker Skaarj Berserker
Posts: 272
Joined: 05 Apr 2008, 15:38
Contact:

Subject: Re: "Origin" Question

Post Posted: 08 Oct 2015, 01:43

I'm glad there was something that you haven't tried before! You could also use the BSP optimization (or deactivate it if you did use it) and play around with the sliders. You could try that while you got some other work to do ;)
The Unforchers will come again soon...

yrex
Skaarj Scout Skaarj Scout
Posts: 38
Joined: 07 Oct 2015, 11:19

Subject: Re: "Origin" Question

Post Posted: 08 Oct 2015, 11:38

227 has also
Right click on brush -> Polygons -> Snap vertices to grid
however it seems to behave weirdly - after applying, many holes appear on brush, after copy pasting they dissapear.

There's also
Right click on surface -> Tesselate surface
which splits surface into triangles to prevent non-planar surfaces (which snapping to grid may create).

You can also put a big subtracted cube between problematic area and other rooms - I have done this sevaral times and it helped.

User avatar Teridax
Skaarj Warlord Skaarj Warlord
Posts: 869
Joined: 11 Apr 2009, 04:10

Subject: Re: "Origin" Question

Post Posted: 08 Oct 2015, 20:53

I knew that tessellate surface split surfaces up, but I didn't know it prevented non-planar surfaces. Tessellating all of my surfaces has drastically reduced the BSP ratio, and my movers no longer flicker (though I did have to replace some, and that seemed to have fixed the problem). Thanks so much!

Snap vertices to grid doesn't seem to be doing anything for me, though. I'll snap a brush's vertices to the grid and there will be no changes made to the brush as far as I can tell. Pasting it into notepad, it has the same values as it used to, but I guess it isn't a big deal since my map has since stabilized.
Image


Who is online

Users browsing this forum: No registered users and 4 guests