Game Engine Forum - Grit Open Source Streaming Game Engine
Site Header
It is currently Tue Jun 18, 2013 7:03 am

All times are UTC




Post new topic Reply to topic  [ 20 posts ] 
Author Message
 Post subject: Grit Engine with real world data
PostPosted: Sun Apr 10, 2011 3:26 pm 
Offline
Newbie

Joined: Sun Apr 10, 2011 3:20 pm
Posts: 12
hi

I just discovered this engine wich look awesome !


and i am wondering if it can handle real world data like does www.openscenegraph.org for example

by this i mean terrain data (dem) + georeferenced images (geotiff) in flight simulations type applications

the data can be huge especially the images (> 2go for relatively small portion of the terrain)


any idea is welcome
thanks and good day !


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Sun Apr 10, 2011 5:17 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Fri Mar 26, 2010 10:06 am
Posts: 351
No, we do not currently support or believe in terrains. Maybe there can be a terrain system, but it's not worth doing with immediacy when you can usually make a terrain elsewhere and cut it up yourself. We target GTA-like map design and similar, so terrains would kinda look wrong and unable to reach the kind of fidelity we aim to support on open worlds.

However, that doesn't stop you from creating your world in other apps and exporting it to the proper formats and setup for grit.

This is an asset streaming implementation, so what you will do to make a world is make meshes that only draw for so far and switch those out with LOD levels as you get further away. Every model in grit is a mesh.


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Sun Apr 10, 2011 5:34 pm 
Offline
Newbie

Joined: Sun Apr 10, 2011 3:20 pm
Posts: 12
ok got it !

see u later :)


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Sun Apr 10, 2011 10:53 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 422
You can consider a larger scale by just having 1 unit be 10 metres instead of 1 metre or something like that. Alternatively you can tweak some other things about the rendering such as the near and far clip distances.

As for scenery, you would have to do some work offline to convert the heightmap into mesh pieces (and lod pieces) and chop up the texture, etc. It would work, I have done it before with satellite imagery from nasa. However it doesn't look very good because heightmaps are not very good. You get nasty texture stretching on anything approaching a steep gradient, and things like cliffs are pretty much impossible.

Buildings, trees, etc would probably be no different to normal.

To use the streetmap road data you'd have to build meshes for the roads and intersect them neatly with the heightmap chunks.

it could all be done, but we don't provide anything to help you do it.


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Tue Jun 28, 2011 10:55 am 
Offline
Newbie

Joined: Sun Apr 10, 2011 3:20 pm
Posts: 12
Hi guys !

really sorry for the very late reply
I am seriouselly thinkinig to port my app to ogre and grit engine

OSG is a great engine especially for scientific and simulations application but it's too "low level" to me, i want to switch to ogre to push my app to the next visual level .

like nice atemospheric effects, forest/urban areas, nice shadows, nice terrain texture splatting, ocean /sea,..... and so on

Now :

OSG has already an offline tool that process the dem+imagery data to make the LOD meshes and submeshes :
http://www.openscenegraph.org/projects/ ... netBuilder
so all i have to do is to convert these mesh to an ogre meshes ... correct ?
i have already my terrain database made with 90meters dem + 0.6m satellite imagery
and i will get better resolution in future i hope


Next i have some question about grit engine :
- how these meshes and LOD can be done in the grit engine ?
- that the grit engine offer a visual editor to design the scene (place objects, texture painting... etc)?

that's all for the moment

thanks and good day


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Thu Jun 30, 2011 12:00 am 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 422
amigoface wrote:

Next i have some question about grit engine :
- how these meshes and LOD can be done in the grit engine ?


You have the the high def and LOD mesh on disk. You reference the LOD mesh as an optional attribute on the class that uses the high def mesh.

The transitions, resource management, etc are automatic. (Used to work, broken at the moment, but will be fixed soon).

Quote:
- that the grit engine offer a visual editor to design the scene (place objects, texture painting... etc)?


You can place objects very easily without any 'visual editor' just by using a bit of in game scripting. I've used it a lot and it would be easy to file down the edges and make this pretty user-friendly.

As for texture painting, this is more modeller territory. The tools in a modeller will be far better than anything we could do in reasonable time. Check out the texture painting features in the latest blender to see what I mean.


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Thu Jun 30, 2011 8:54 am 
Offline
Newbie

Joined: Sun Apr 10, 2011 3:20 pm
Posts: 12
well

here the complete story :

i have modeled a mini airport in blender with runway, taxiways, some texture splatting ... etc
imported it into my little flight-sim app but like i said i am not very happy with the result
i want more !!!


now i am searching how to get a better visual apparence with existing engines/tools ,
Here randoms ideas that come in my mind and that need discussion :

- Grit Engine for the terrain streaming option since i have already the terrain a separate mesh with differents regions/LOD
any information about the fix , roadmap ... etc ?

- Use some Ogre Editor like
http://www.artifexterra.com/
or
http://ogitor.org/
to edit the terrain texture splatting , add paged geometry for trees/grass and maybe surrounding buildings

- use Skyx and hydrax for weather effects
i like especially the skyx for it's volumetric clouds effect


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Thu Jun 30, 2011 1:56 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 422
amigoface wrote:
any information about the fix , roadmap ... etc ?


don't know what you're talking about here


Quote:
- Use some Ogre Editor like
http://www.artifexterra.com/
or
http://ogitor.org/
to edit the terrain texture splatting , add paged geometry for trees/grass and maybe surrounding buildings


Why not do that stuff in blender though?

Quote:

- use Skyx and hydrax for weather effects


The basic sky colour, sun, moon, aspects of skyx we already have in Grit with custom code, in fact it was developed before skyx I think.

I think skyx has better clouds but I've only seen them in screenshots. They use LGPL so we can't integrate code directly.

I think our starfield is better than skyx's.

Neither systems have things like jet streams and shooting stars which are really needed to make it come alive.

Grit doesn't have water yet, there are various complications with doing water in a GTA-like engine that hydrax doesn't handle but I can't remember the details.

Obviously adding water requires physics as well as just graphics so it's not just a case of 'plug in hydrax'.


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Thu Jun 30, 2011 2:05 pm 
Offline
Newbie

Joined: Sun Apr 10, 2011 3:20 pm
Posts: 12
[Edit]The transitions, resource management, etc are automatic. (Used to work, broken at the moment, but will be fixed soon).[/Edit]
that's what i was talking about

anyway

can other ogre code/framework like skyx/hydrax be integrated into grit ?


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Thu Jun 30, 2011 5:32 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 422
Ah right I thought you were talking about the kind of roads that get driven on :)

The problem at the moment is that only meshes are background loaded -- in fact this was always the case but there was a hack that allowed you to list the textures in the class to allow those to be background loaded. I have removed the hack in preparation for making it automatically background load the textures too.

This was all part of an ongoing effort to improve the modular structure in the code -- isolate Ogre more and allow the streaming mechanisms to handle non-ogre resource types such as collision meshes and sounds.

Integrating things like skyx/hydrax into Grit should be easy in theory. You have to be careful about licensing of course. Grit is distributed as a static binary.

However a lot of these things tend to have missing features and problems that you don't anticipate, and you end up having to make substantial modifications to them in order for them to work the way you need. It's never a 'turn key' thing.


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Thu Jun 30, 2011 7:41 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 422
To clarify Brian's point about heightmaps from a while ago, we chose not to support heightmaps because they are not sufficiently general -- we support the more general meshes instead. However since heightmaps can be converted to meshes, this is not a big deal.

However we do not provide any tooling to do this.

I in fact did a project a few years ago where I converted Earth data from NASA to run in the Grit Engine. However due to a disk crash I lost all that data. All I have is a few screenshots:

http://spark.woaf.net/grit/earth_scotland.png
http://spark.woaf.net/grit/earth_scotland_close.png
http://spark.woaf.net/grit/earth_scotland_wireframe.png

The main problem was reducing the triangle count down, which required some clever algorithms and a lot of CPU time. That's why I'm not keen on regenerating this data from the original heightmaps.


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Sun Jul 03, 2011 4:12 pm 
Offline
Newbie

Joined: Sun Apr 10, 2011 3:20 pm
Posts: 12
Hi spark !

well i think we can do something with that

as i said before http://www.openscenegraph.org has a great tool for generating PagedLod terrain database based on heightmap and satellites imagery
http://www.openscenegraph.org/projects/VirtualPlanetBuilder

this work very very well and can handle terrabytes of data

the generated tiles are all static meshes (*.ive) wich is the binary native format of OSG,
that can be converted to any 3d format with it's overlaying texture in .dds format

the task now will to port the paging mechanism to grit

if i understand correctly the paging mechanism is already implemented in grit



refering to this page we can understand how VPB generate terrain meshes with their LOD
http://forum.openscenegraph.org/viewtopic.php?t=4255


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Sun Jul 03, 2011 8:52 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 422
Yes I am currently tweaking the code, the issue i mentioned earlier is very close to being fixed.

You should experiment with the engine, creating your own assets in a modeller, exporting, writing materials, etc.

Then once you are comfortable, write code to generate the stuff :)


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Sun Jul 03, 2011 9:19 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 422
The community can help you get started with loading assets into the engine, many people on IRC can answer questions and there are some tutorials / documentation pages on the forum & wiki.

As for OSG formats, and stuff like that, I'm afraid you're on your own :)

But by all means tell us how many chunks, how big the chunks are (both physically in real world units, and in terms of resolution, bytes on disk, etc), whether you will need spec / normal maps, etc.


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Sun Jul 03, 2011 9:22 pm 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 422
Also, do you need collision data, are you able to determine somehow what kind of material the ground is made of (stone, grass, etc). This is important for vegetation placement, as well as the more obvious vehicle / rigid body behaviour.


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Mon Jul 04, 2011 8:48 am 
Offline
Newbie

Joined: Sun Apr 10, 2011 3:20 pm
Posts: 12
yes you are definitively right !,

i have to experiment myself the engine and try things ...

i just wanted to get some theory and to know if it's possible to do what i am trying to do

- for collision : yes i want some collision detection to prevent the airplane to go trought the ground or any other object

- as for the ground material i don't think that is much important
since the terrain is made from static meshes themselves made from satellite imagery

maybe we can do some grass dirt painting in some region of the terrain especially near the airport area

anyway

i have to compile the engine,
test the samples if exists,

and try things, before i can go forward


good day


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Tue Jul 05, 2011 12:56 am 
Offline
Supreme Tyrant of All
Supreme Tyrant of All
User avatar

Joined: Sat Mar 27, 2010 1:13 pm
Posts: 422
You don't need to compile it, just use the prebuilt versions. Compiling it takes hours.


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Wed Jul 06, 2011 11:23 am 
Offline
Newbie

Joined: Sun Apr 10, 2011 3:20 pm
Posts: 12
i will do my best

thanks


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Wed Oct 24, 2012 11:45 am 
Offline
Newbie

Joined: Wed Oct 24, 2012 11:09 am
Posts: 2
As long as you have the heightfield as a procedural algorithm you should be able to call a single function and get height data to collide with. If colliding a rigged character I recoommend MobyBangleBSphere from insomniac games. That way you can collide a sphere against a trimesh for the first stage.

That's part of the reason a terrain system is actually a good idea to implement. It should generate in chunks. Typically it's done either with tristrips. Depending on shader model (number of vertexes in equals nuber out pre SM?).

Will see if I can get you a good implementation. *puts on code digging goggles*


Top
 Profile  
 
 Post subject: Re: Grit Engine with real world data
PostPosted: Wed Oct 24, 2012 1:34 pm 
Offline
Newbie

Joined: Wed Oct 24, 2012 11:09 am
Posts: 2
Also, OSG is terrible, the architecture has as many performance limitations as any other scenegraph based solution. And the screenshots are postage stamps, BRILLIANT, I've always wanted to play a game in postage stamp mode.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Localized by MaĆ«l Soucaze © 2010 phpBB.fr