Two egg questions

Greetings all!

I’ve read over the egg file format, and I think I get it. There are just two features I’m not sure whether or not it has:

  1. Is it possible to reference the contents of another egg file from within an egg, sort of like an import?

  2. Is it possible for a section of the model defined in the egg to be instanced in multiple places in the egg format? If we have a forest of trees in Maya (where the trees are instances of a single model) and we export the forest, it appears that the egg re-constructs the tree mesh over and over again in each of the locations it was instanced. Is that the optimal way to describe the scene using only a single egg file, or is there an instancing feature that maya2egg doesn’t take advantage of?

Thank you for all the help!
-Mark

Addendum:

Oops! I see where #2 was answered in this thread.

As for question 1: Is that import possible, or is it assumed that such “stitching” of different geometry sources will be handled by the game itself?

Thanks,
Mark

The egg syntax does support external references. Scroll to the very bottom of the eggSyntax.txt document, and you will see a description of the syntax.

The entry is usually placed within an entry, which allows the vertices in the referenced file to be expressed in local coordinates, rather than global coordinates, thus allowing you to reference the same multiple times and place different copies of your tree in different places. Don’t get excited by the word ; it doesn’t actually refer to multiple shared instances of the same memory. The tree will still be replicated n times in memory when the egg file is loaded.

David

That’s exactly what I was wondering. Thank you!

-Mark