Help rotating groups of items - Grr UE3!!

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

IdahoEv

New Member
Jun 5, 2004
31
0
0
So I have this perennial problem with UE3. Sometimes I need to position entire groups of items together, keeping their relative positions the same. But if positioning them includes rotating, I can only rotate in one axis before they get severely borked up. I need a workaround to this problem, and I can't find one.

A common example is a set of static meshes, say several replications of one item making a long object, or several different items as a group. Here are screenshots showing what I'm trying to do. Say I've got a long girder made from several repeats of a short girder, and I want to put it at a double angle. (e.g. the longest dimension of a cube, at 45 degrees to all three planes). I can't do it in UED without screwing up the relative positioning of the group!

Example:

Three short girders (Industrial_Static.Objects.supporttri) stacked up to make a long one. I place the pivot near the bottom so I can rotate the whole assembly around it.

straight.jpg


Rotate on one axis, and the assembly rotates correctly:

oneangle.jpg


But when I rotate on a second axis, they rotate wrong! They all rotate the same amount around their own centers of gravity, but their centers don't move proportionally so as to keep their relative positions the same.

They end up disconnected!

twoangle.jpg


Am I doing something wrong? Is there a workaround to this problem? I've had similar problems with scaling and mirroring, where groups of items will lose their relative positions during transformation. I'd positively kill at this point to be able to lock groups together and transform them as single objects, like in Maya. UED just doesn't seem to handle transformations of groups well at all.

Unfortunately, there are things in my current map that can be done no other way. I've thought of two "solutions", but they both have problems.

1) I could rotate one mesh and then replicate later. But things with double-angle rotations usually end up with endpoints off the grid, so it would be very hard to line them up correctly afterwards. And it doesn't help if my group includes several different meshes. (The actual girder in my map has lights and wires as well, so it ends up a total mess).

Also, my longest girders have about 25 of these meshes strung together, and I have a half-dozen of those groups going at different angles. Lining up every single mesh by hand, off grid, would take me a week.

2) I could make single long girders in Maya, and import them as static meshes. But then I lose the performance benefit of having repeated static meshes. And, every place I needed a different overall length, I'd have to make a new static mesh, which is a total waste.

Help!

Thanks,
Ev
 

CyberSirius

Mostly dead.
Jan 4, 2004
1,369
0
36
33
Rotate them individually

EDIT: Got 404 posts,See pic.
 

Attachments

  • lol404.jpg
    lol404.jpg
    21.5 KB · Views: 11
Last edited:

IdahoEv

New Member
Jun 5, 2004
31
0
0
So I've spent an hour or so characterizing the problem better, and I've found a partial workaround. Here's what I've learned.

1) The problem doesn't affect brushes. Only static meshes.

2) The problem affects all static meshes, it's just more obvious in groups.

3) Basically what's happening is that static meshes rotate wrong if you rotate them around the X axis after you've rotated around Y or Z. They also rotate wrong if you rotate around Y after Z.

4) This means you can do 2 and 3 axis rotations, as long as you do them in X Y Z order. But, if you discover after rotating around Y that you didn't rotate around X far enough, you have to go back and start over! Because if you try to rotate on X again, you'll break your grouping.

5) I THINK what's going on is that if you rotate around X after Y, X after Z, or Y after Z, the mesh's center of gravity rotates around the world axis but the mesh's vertices rotate around the center of gravity on its own local axis instead of the world axes. That's maybe not exactly right, but it's something along those lines.

6) It becomes extremely obvious if you rotate one brush of a group around Y first, and then try to rotate the whole group around X. The behavior is just obviously totally wrong.

Here's a demo:

I take 3 identical meshes and stack them up without rotating them. Then I put the pivot at the origin and rotate the whole group around X. Everything works fine.

okrotate.jpg



Now I take the same 3 meshes but rotate the middle one around Y by 90 degrees first, so it's on its side. Then I rotate the whole group around X.

badrotate.jpg


And the middle brush goes off into the wild blue yonder.

This spells bad things for level design. Suppose you make a room with a bunch of columns, and all the columns are made from static meshes, and rotated around Z to form a circle with the same part facing inward.

Then, four days later you decide you want to put the entire room on a hill, tilted. Maybe you're making the leaning tower of Pisa. So you try to tilt the whole building by rotating around X or Y. You're farked, because you rotated those columns around Z last week. When you try to rotate the room around X or Y, the columns lift off up the floor and twist off in weird directions, instead of moving with the room.

Maybe Epic will release a patch that fixes this? It's really annoying.

Ev
 

IdahoEv

New Member
Jun 5, 2004
31
0
0
CyberSirius said:
Rotate them individually

This isn't really an option, at least with the girders in my current ONS map. I'm surrounding an asteroid in space with a huge truss gantry, where the lines of the gantry follow the edges of a polyhedron. (A nonsolid shell that's the "force field" providing gravity and atmosphere for the playing field on the asteroid).

Anyway the huge gantry will have about 300 copies of the little truss static mesh in it. Most of those will be at weird double angles, which means their ends aren't on the grid. But they have to line up perfectly because they make a straight line in empty space ... so its' **really** obvious they don't line up if they're off by more than 1UU or so.

Which means, ultimately, I'd have to rotate and line up about 200, double angle rotated static meshes and get them perfectly aligned without the help of the grid. It would be a nightmare, and would take me all week.

But see my last post ... I've found I can do it, as long as I only rotate in X Y Z order, once each, and never back up. CTRL-L/R rotates around X, CTRL-L rotates around Y, and CTRL-R rotates around Z.

I know it sounds like a pain in the ass complex thing for a map, but I've already done the lines that require only 0 or 1 rotation, and it looks wicked sick... So now that I have at least a partial workaround, it's going to be very worth it.
 

IdahoEv

New Member
Jun 5, 2004
31
0
0
Here's an even better example of the bug when trying to make the Leaning Tower of Pisa out of a single static mesh. I sent this in a bug report to the UDN staff; fingers crossed for an answer.

Note that if you did this out of BSP instead of static meshes, it would work just fine. But static meshes are cool and we like them. So we wants them to work right in UE3, yes we do my precious. :)

BugDemo2.jpg