Atlas-Output: <AtlasXML/> vs. <PlaneGraphXML/>

Following issue popped up during experimenting with MURL:
We used Atlas Generator to create an Atlas image and the Atlas XML...
The Atlas XML consists of a lot of Rectangles. So far, so good...

Is it true that, if I want to refer to a single image within the Atlas i can only use numbers as selectors? Rectangle has for itself no id-specifier unlike PlaneGraphXML which has id="".

What can <AtlasXML/> be used for in comparison to <PlaneGraphXML/>?

I hope I my question is clear enough to be understood...

Best regards,

Depending on how you want to actually access the contents of the generated atlas image, you can use either the <AtlasXML/> or <PlaneGraphXML/> output (or both):

- The output from the <AtlasXML/> element represents an atlas XML resource file, which is used in conjunction with a PlaneSequenceGeometry node (via its atlasResourceId attribute) that you define somewhere in your scene graph. In this case, it is true that the individual images can only be selected by their zero-based index into the generated resource. The advantage of this method is, that you can also specify an animation resource file via the node's controller.animationResourceId attribute, which allows to play back the rectangle sequence stored in the atlas resource. When doing so, the PlaneSequenceGeomentry node gets regularly updated to show the currently selected atlas rectangle, with given size and texture coordinates. You can however also manually set the desired image shown by calling the SetIndex() method on the IPlaneSequenceGeomentry interface, without using an animation resource. This may be helpful when you want to quickly change the contents of a plane object at runtime.

- The output from <PlaneGraphXML/> represents an actual sub-graph resource, which you can e.g. instantiate once in your scene graph (via an Instance node from the scene graph, or using an Instance element in the package.xml file) and reuse the individual PlaneGeometry nodes wherever you need them. This works by using a Reference or ReferenceTransform node, with the targetId attribute pointing to one of these planes. Here, the given planes are static and do not have any connection to the other rectangles in the atlas.

The AtlasDemo tutorial uses both methods. The <PlaneGraphXML/> output is used to show 4 different spaceships, which are not animated but share the same atlas image for performance and memory consumption reasons. The <AtlasXML/> resource is used to show a single animated alien figure, using an animation resource. View the tutorial document here:

Hope that helps,


Forum Jump:

Copyright © 2011-2022 Spraylight GmbH.