Clay, Bruce wrote:

Some of these attributes can be defined programmatically and others will require human assessment.

I have been able to find the number of vertices using OSG but I have not found out how to count the polygons. Which number would be a truer or better number to store in the database to reflect the load the model will have on the simulation.


I'm not sure which would be better, but you might want to consider number of triangles as well, as that's what will eventually be drawn (polygons is somewhat nonspecific).

You should be able to get these numbers by iterating over the primitive sets in each drawable. You'll have to count differently depending on primitive type and primitive set type, but it's not that difficult (there may already be a visitor in OSG that does this, I'm not sure).


I can get a list of the parts that make up a model which would be useful for animations but that is so variable that I don’t see a good way to store that information in a database other than as a potentially very long string.


Yeah, that's a tough one to characterize. It really depends more on the target application than what's in the model itself.



Are there any other things we can use OSG to extract from the individual models that should be included (scale, smoothness etc)?


Overall size would be a good one. You could combine this with the model's scale so you present overall size in meters and then list the units and/or scale factor to indicate what units the model uses. This is kind of how COLLADA's asset tag does it.

Also, the coordinate system would be useful to know. COLLADA restricts it to telling you which axis is up, which is enough in most cases, but a complete description would probably be appropriate here (Z up, X right, Y forward; Y up, X right, Z backward; etc).


If there is an interest in such a database the list can be posted on the OSG site for the community to use and update after the initial creation.


Sounds like a good idea to me. Just curious, have you looked around to see if anyone else has created something like this?

--"J"


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to