FAQ  FAQ   Search  Search   Memberlist  Memberlist   Usergroups  Usergroups
Register  ::  Log in Log in to check your private messages

Post new topic  Reply to topic
 Output Examples? « View previous topic :: View next topic » 
Author Message
PostPosted: Sun May 27, 2007 3:19 pm    Post subject: Output Examples? Reply with quote

Joined: 27 May 2007
Posts: 1


I'm an indie developer evaluating Grome for a project I'm working on. I've been reviewing features and some of the forum posts, and I have two questions... If these have been answered before, a forum link would be fine as an answer -- I searched but didn't find a topic on these.

1) I believe there are standard export tools for text output, as well as XML output. Is there an example available of either (or both!) of these export formats? I'd like to see how object placement/rotation data is presented, so I can determine how I might use these to import data into my engine, without needing to create a custom exporter using the SDK.

2) I noted in the forums that there is a road/river system in the works for a "2.0" release -- this would obviously be very helpful. Is there a tentative release date for this version? Will there be upgrade fees?

Grome looks like an excellent product. Thanks for your help.
Back to top
View user's profile Send private message
PostPosted: Mon May 28, 2007 7:44 am    Post subject: Reply with quote

Joined: 12 Feb 2007
Posts: 1326

Hi, the text format is quite simple to parse. For each object instance you have the following structure:

name = "name of the instance"
template = "name of the object to be instantiated"
flags = "various flags that can be omitted"
link_pos = X Y Z
link_norm = X Y Z
link_norm_strength = 0.000000
scale = X Y Z
rot = X Y Z
tran = X Y Z

Every instance is linked to a point on the terrain (called link point) so we have:

link_pos = position of the link point
tran = translation from the link point

So total instance position is link_pos + tran

The same goes for rotation:

link_norm = Normal orientation of the terrain surface at the link point
link_norm_strength = Strength at which OY axis of the object is aligned to the link normal (0 no follow, 1 full follow)
rot = rotation applied after the link normal following is applied.

So total object rotation is the rotation caused by following the link surface combined with the rotation of the instance itself. This can be computed by multiplying the rotation matrices.

Scaling is indicated by the scale.

In the text file there are other terrain data included: terrain heightmaps, terrain mappings, layers and their textures etc. I’ve included a sample file at:


Object templates are not included in the export file (only their instances) since they are shared among multiple projects and are contained in separate artwork libraries.

Other outputs from the text plugin include the terrain images (masks and colors) and heightmaps in 16 raw or png image format.

To be noted that the SDK comes with full source code of the export plugins. Thus you can modify the text export plugin. You can for example have access to the final transformation matrix of the instance and write it as such in the text file. Or you can take this final transformation as separate components: final translation, rotation and scaling. The source is well documented and can be easily modified. It may be that would be faster for you to write your own plug-in than to parse the results of the text file as it is now. All depends on your current formats and your project needs. To write plug-ins is pretty easy as the entire process in detailed documented.

Adrian Licu
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

Jump to:  

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
You cannot vote in polls in this forum

Based on a template by Dustin Baccetti
Powered by phpBB © 2001, 2005 phpBB Group