View Full Version : Physics problems at large maps
fred450
04-23-2007, 06:27 PM
Hello everybody,
I need to do a huge map for these vehicles I'm developing. So I carved a cube with size around 500,000 x 500,000 x 500,000 unreal units in UED (the max allowed size - still small). When playing, I noticed that whenever I'm about 65,300 uu or more distant from the map center (0,0,0), on foot, I start to have movement problems. Usually, when I dodge at one direction, my running speed becomes permanently reduced at that direction. Ground friction becomes odd, making me slip slowly and never stop, as if I was standing on ice.
This problem limits the UT2004 effective maximum size to about 65,300 * 2 = 130,600 uu. That is 2,600 meters, really small.
Now, my question is: Has anyone already made a map bigger than that? Does anyone know how to overcome this problem?
I tried adding new PhysicsVolume, new ZoneInfo, but no luck. I also can't find any value related to that in the ZoneInfo properties.
Thanks a lot
EDIT: Curiously, the engine's max view distance is also around 65,300 uu, but this has already been overcome. I wonder if it will be possible to overcome the physics problem too, so realistic maps could be done.
Angel_Mapper
04-23-2007, 06:39 PM
It's probably due to inaccuracies in floating point calculations at points that far from the origin. Not really anything you can do about that.
fred450
04-23-2007, 07:07 PM
Problem is... except for what I mentioned, everything else works perfectly: ground and flying vehicles, which use karma physics, player falling physics, weapons, etc., even at the edge of a 500,000 uu map. If it was due to engine inaccuracies, I think everything would become malfunctional, not just the ground friction.
IceCreamYou
04-23-2007, 09:43 PM
The size is resolvable by creating multiple parts of the map on different levels, i.e. make a second map "above" the first one (above the original subtraction in UEd) and connect them with WarpZones.
But do you have any idea how long it takes to run that far? How hard it is for the engine to render that much? How big your filesize will be? How much work it's gonna take to do something like that? What are you making, an entire city?
fred450
04-23-2007, 11:12 PM
The size is resolvable by creating multiple parts of the map on different levels, i.e. make a second map "above" the first one (above the original subtraction in UEd) and connect them with WarpZones.?
This would kill the mod, which is a flight-simulator-like.
But do you have any idea how long it takes to run that far? How hard it is for the engine to render that much? How big your filesize will be? How much work it's gonna take to do something like that? What are you making, an entire city?
With the F-16 I take about 50 seconds to cross the hole 500,000 uu map, and I don't even have space to accelerate to full speed before I hit the wall on the other end.
About rendering performance, the map is much faster than the average UT2004 maps, because performance has nothing to do with size. It has to do with polygon count, and my big map is still just one big cube with 4 more cubes inside. So 5 cubes * 6 sides each = 30 sides * 2 triangles each = 60 triangles total. It compiles much faster than the small house I did earlier. File size, as for now, is 384 KB.
The goal is to keep about the same number of polygons of a standard UT2004 map. The ony difference is that those polygons will be spread over a larger area, yelding a less dense map. So I know I can't make a metropolis, but I can make several small villages and bases across the map. It's not supposed to be a fast paced action shooter anyway.
The small maximum size and, even more important, the small view distance makes a flight simulation mod very unlikely to be possible for the Unreal engine, althought the karma vehicles provide an excellent base. I found a way around the view distance problem
http://forums.beyondunreal.com/showthread.php?t=176122&highlight=scaling
but not around the map size. I have scaled everything down 50x (0.02 scale) to overcome the size limitation, but that has proved to be a big no no. You get all sorts of problems with that, from rendering to physics issues.
I'll try to raise that scale untill I get a bug free gameplay and see what I can I do with that...
Angel_Mapper
04-24-2007, 02:17 AM
Problem is... except for what I mentioned, everything else works perfectly: ground and flying vehicles, which use karma physics, player falling physics, weapons, etc., even at the edge of a 500,000 uu map. If it was due to engine inaccuracies, I think everything would become malfunctional, not just the ground friction.Na, not necessarily everything. If it's happening at all that would be the most likely cause, there isn't anything else I can think of that would cause that.
[edit] The distance you say it happens at would seem to support that theory as well. 65536 is 2^16, so at that point it would take another ^2 of accuracy from the float.
Now you've got my attention Angel....
fred450
04-24-2007, 06:18 AM
The distance you say it happens at would seem to support that theory as well. 65536 is 2^16, so at that point it would take another ^2 of accuracy from the float.
That makes sense. But woudn't that mean that the engine is using 16-bit accuracy? I thought it used 32-bit.
Angel_Mapper
04-24-2007, 01:33 PM
I have no idea, I've never actually looked at the engine internals, and probably wouldn't know where to look anyway. :D
IceCreamYou
04-24-2007, 05:28 PM
There's already a flight simulator mod. It's just based on fighting, and on slower aircraft (blimps). It's called Air Buccaneers.
My advice is just to slow the vehicles way down. If you do the rest of the world detail correctly, you won't notice the difference. Just make the ground textures really small. Scaling is a good idea, but I wouldn't go lower than 1/8 of normal size. Still, that 1/8 gives you almost 7 minutes before you hit a wall rather than the 50 seconds you gave before.
IceCreamYou
04-24-2007, 05:30 PM
That makes sense. But woudn't that mean that the engine is using 16-bit accuracy? I thought it used 32-bit.
Yes. UEd4 (for UT3) uses 32bit I believe.
fred450
04-24-2007, 07:23 PM
Yeah, Air Buccaneers is an excellent mod. It came with my ECE version of UT2004 and I wasn't very attracted to it at first. But when I finally played it I was amazed with its gameplay and, mostly, with its originality. That's something you don't see everyday. But Air Buccaneers isn't a flight simulator in the traditional way, it's rather slow-floating baloons and don't require very large spaces or visibility. Even so you can notice the map size problem when you are in the air and can see the map edges.
You are right about vehicle speed. Scaling down will slow everything down if done the proper way, without the loss of speed being felt if drawscales, texture scales and velocity scales all match up. So the amount of 'slowing down' must be equal to the amount of scaling down, once high speeds are very important to jet simulations. Actually, since I'm a big fan of Falcon 4.0 Allied Force, I made sure my F-16 acceleration and speed matched up with the F4's F-16 (which is the same of the real jet). I wouldn't scrifice that for nothing.
Thanks for your suggestion on the 1/8 scale. I'll make sure I'll start with that and will let you know what I accomplished (if I accomplish anything).
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.