Re: [osg-users] [osgPlugins] OpenFlight-Plugin - Subfaces could notbe read by OpenFlight-API

2009-03-02 Thread Paul Martz
Sorry I have not gotten to this yet, but I have been busy with paying work.
Your models are still in my inbox. Not sure when I'll have enough down time
to get to this.

(However, I'll add that OSG is a community effort, so you are more than
welcome to debug the issue and post a fix to osg-submissions.)

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Katharina
Plugge
Sent: Monday, March 02, 2009 4:54 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] [osgPlugins] OpenFlight-Plugin - Subfaces could
notbe read by OpenFlight-API

Hello again,

i'm still having this problem with Subfaces and the OpenFlightPlugin. Has
nobody any idea?


@Paul Martz: I do not know, if you got my answer, because I only posted in
the osg forum. I do not see your E-Mail adress here. If you can give it to
me, i can send the example file again.


Thanks,

Katharina

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=7746#7746





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] OpenFlight-Plugin - Subfaces could notbe read by OpenFlight-API

2009-03-03 Thread Paul Martz
Thanks, this post from you has reminded me of some of the issues.

Quick summary / bottom line: The OpenFlight spec states that subfaces must
come after the base faces. The exporter doesn't change the ordering; for
now, you'll need to ensure that your subfaces come after the base faces.

The primary intent of the FLT exporter was to support files that had been
loaded from FLT, possibly modified in OSG, then exported back to FLT. In
this usage case, the Geometry was already in the correct order for proper
subfacing.

Could we modify the exporter to produce the correct ordering? Well, yes and
no. It's theoretically possible to rearrange the order to meet this FLT spec
requirement.

However, the spec has other requirements as well, such as: the base Face
must be large enough to completely cover the area of all subfaces. I hope
you agree that the exporter should _not_ check for an adequate base Face
size, and enlarge it if necessary. :-)

Ultimately, my philosophy is that the exporter should simply export the
scene graph that it is given, without trying to be "smart" about it. I'd
rather see a NodeVisitor that walks a scene graph and "preps" it for FLT
export, possibly displaying warnings if it detects situations that it can't
resolve. Because exporting is a const operation, this NodeVisitor would have
to be run by the application prior to export, so it would need to live in
osgUtil or osgSim, for example.

If you would like to write a NodeVisitor to change the order of subface
geometry, this would be a good start on a "FLT export prep" NodeVisitor.
Perhaps Robert would add it to OSG.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Katharina
Plugge
Sent: Monday, March 02, 2009 9:16 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] [osgPlugins] OpenFlight-Plugin - Subfaces could
notbe read by OpenFlight-API

Sorry for triple posting, but i have some new findings:

Correctly reading in Subfaces with the OpenFlight API is dependent on the
node sequence.

Group
- child1 = Subface Node
- child2 = Other Geometry

does not produce a subface in the API. Where as

Group
- child1 = Other Geometry
- child2 = Subface Node

leads to the desired result. 

Do I have to garantee in osg, that the order of the nodes is correct before
exporting to flt, or could the plugin be adjusted to put subface childs
last? The latter would help to avoid invalid results in future for people
who are not aware of the problem. 


Greetings,

Katharina

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=7776#7776





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org