Jump to content

Question regarding terrain


freeflyklown
 Share

Recommended Posts

Hi,

 

I am still evaluating engines for my flightsim project. Leadwerks looks very good, but there is the problem that the terrain simply is too small. 4096 x 4096 only gives roughly 40km x 40km if 1 pixel = 10m. But I need something like 500km x 500km. Now my question is if there are plans to include the possibility to create such huge terrains?

I sw there is a helo sim in development running on leadwerks and it looks very nice so far. But my project is with jet aircraft, so I need a bigger terrain. I fear that such a thing is not really a priority for leadwerks, as it is not really useable except for flightsims, but still it would be nice to know for sure if this is coming or not. If not, does anybody now good alternatives? I rather prefer to use a game engine instead of creating my own....

 

Thanks

 

andi

Link to comment
Share on other sites

If you are making a flight sim, you don't need such a high resolution terrain. You can easily make a much bigger terrain by using a lower resolution. Instead of 2 meters per tile, use 10.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

If you are making a flight sim, you don't need such a high resolution terrain. You can easily make a much bigger terrain by using a lower resolution. Instead of 2 meters per tile, use 10.

 

Josh, thanks for jumping in. I don't quite understand....so if one pixel of 4096 x 4096 heightmap equals to 10m, I only get around 40km, correct? What do you mean by using 10m instead of 2m per tile?

Link to comment
Share on other sites

  • 4 weeks later...

I only just came upon this topic as I was working on the problem of trying to position the terrain entity, so apologies if this is not news or is a little late.

 

For our helicopter combat sim (emphasis on combat rather than being a fully fledged flight simulator), 10m per tile with 4096 heightmap resolution. 40km2 seems about the right size for a combat zone, other games of this type used the same size (Janes Longbow 2 for example).

 

But for a jet sim or any kind of large open world it's (probably) not going to be good enough.

 

If you're embarking on creating a flight simulator or any kind of large world there's the inherent problem of dealing with floating point errors with 32 bit math. OpenGL and LE uses 32 bit math. It's the same with many other 3D engines. As soon as you move more than a few thousand meters away from the origin you'll begin to see polygons wiggling around when the camera or object moves due to imprecision. This is what we see in our helicopter project, it's pretty ugly and I'm still trying different ideas to make the problem go away.

 

Flight simulators (such as Microsoft Flight Simulator X) get around this by periodically resetting the local origin.

 

Their approach is documented in part 7 of this document... Microsoft ACES Game Studio Terrain System

 

In Leadwerks Engine you can't translate or move the terrain entity, it locked to world origin. So you can't employ this trick of moving the world around the viewpoint and resetting the world origin to keep things from getting wobbly.

 

myTerrain.Translate(Vec3(0, 0, 512), 1);

 

This doesn't work at all.

 

If you create you own terrain system there's the problem of moving the scene around you. Periodically looping through all the entities to move them relative to the camera is not efficient at first glance, here's a clunky example, imagine having 1000 entities...(and is pointless as it doesn't work with vegetation or the terrain)

'where xoff,yoff,zoff is inverse to viewpoint movement'
For Local ent:TEntity = EachIn CurrentWorld().Entities
	If ent <> camera Then
		ent.Translate(Vec3(xoff, yoff, zoff), 1);
	End If
Next

 

It's possible to do break that down so you have a duplicate world and periodically translate them but it all starts to get hideously complex which isn't what LE is about.

 

So it's not good for really large worlds like what you'd need for a flight sim. But you'll have this problem with Unity and Ogre3D except Ogre3D has a paging terrain module and lets you do things like this to make it work but requires *a lot* of work to get results.

 

Maybe there's some other way to stop the camera from exhibiting these wiggly float-point math issues. I wonder how Just Cause 2 does it.

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

  • 1 month later...

Flexman, thanks for those insights...and your helo sim looks fantastic!

 

I'm also considering LE as a quick(ish) way of trying out some jet flight sim concepts and I can live with the 4096x4096 limitation if I'm allowed an uneven distribution of polygons.

 

Unfortunately, after a whopping 10 minutes with the demo, it looks like only regular spaced raster heightmaps are allowed.

 

Is this true?...or can I somehow load the terrain as a single 3d object?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...