Hi Paul,
Out of curiosity I tried changing the range mode from PIXEL_SIZE_ON_SCREEN to
DISTANCE_FROM_EYE_POINT which should be the same as re-modeling the LODs using
eye distance. The model will load as an OSG file in osgViewer, however when it
is converted to an OpenFlight model, it does not appear at all. Converting the
FLT file back to an OSG produces interesting results.
While the vertices are all correct, only one of the two models is written to
the FLT file. Also, the RangeMode is correct, but the RangeList contains only
one element instead of the original two. Debugging shows that
FltExportVisitor::apply (osg::Geode& node) is only called twice instead of the
expected three times (once for the first range and twice for the second.)
Confusing the issue further, the FltExportVisitor::apply(osg::LOD &lodNode)
function correctly sees that lodNode should have two LODs. However, the
writePushTraverseWritePop function has no effect the first time through the
loop. Stepping into the code, I noticed that the
osg::Node::traverse(NodeVisitor &) is being called, which by default does
nothing. The second time through the loop is when the aforementioned
FltExportVisitor::apply(osg::Geode&) function is reached twice.
I thought that I would see what happened if the lone Geode in the lodsample.osg
file was added to a group. While the osgviewer could view the file, the
osgconv program could not. Converting the resulting FLT file from this test
back to an OSG file resulted in a five line file:
Group {
name "lod2"
nodeMask 0xffffffff
cullingActive TRUE
}
Brian
On Mon Jun 16 23:03 , 'Paul Martz' <[EMAIL PROTECTED]> sent:
>Hi Brian -- Your LOD node is configured to switch children based on screen
>size. OpenFlight doesn't support this. You'll need to re-model the LODs
>using eye distance.
>
>The LOD exporter should probably display a warning in this case, but as I am
>in the middle of a vacation, I won't be able to make that change
>immediately. Could you please add the warning message and post to
>osg-submissions? Thanks.
> -Paul
>
>>
>> Hi Paul,
>>
>> Yes, I thought about the version possibly being an issue, so
>> I downloaded 2.5.2 but saw the same problem.
>>
>> Back a few months ago, I was given a sample LOD OSG file. As
>> a test I ran the converter against it, but it also had the
>> same problem. I've attached the file that Hans Elbers
>> provided me and am curious as to whether its format is
>> correct in terms of the converter. Are there any command
>> line switches that I need to use with osgconv?
>>
>> Thanks,
>> Brian
>>
>> On Mon Jun 16 12:43 , 'Paul Martz' [EMAIL PROTECTED]> sent:
>>
>> >Hi Brian -- First, make sure you're on 2.5.x, as some
>> important changes
>> >were made post-2.4.
>> >
>> >OSG LOD nodes are exported; see FltExportVisitor.cpp line 210. The
>> >FltExportVisitor class does _not_ override apply(PagedLOD&), so
>> >PagedLOD nodes should be treated as regular LOD nodes for
>> purposes of
>> >export. This means they receive no additional special
>> interpretation or
>> >treatment (they don't write external reference records), and
>> it means they must "look like"
>> >LOD nodes (they must have actual subtree children; file
>> names alone are
>> >not sufficient).
>> >
>> >I hope that helps,
>> > -Paul
>> >
>> >
>> >
>> >
>> >> -----Original Message-----
>> >> From: [EMAIL PROTECTED]
>> >>
>> [EMAIL PROTECTED]','','','')">osg-users-bou
>> >> [EMAIL PROTECTED] On Behalf Of Brian
>> >> Sent: Monday, June 16, 2008 9:47 AM
>> >> To: [email protected]
>> >> Subject: [osg-users] OpenFlight exporter question
>> >>
>> >> Hi,
>> >>
>> >> I was trying to convert some OSG models to the FLT format but ran
>> >> into a little trouble with one of the models. Only part
>> of the model
>> >> was converted. The model's LOD nodes were not touched by the
>> >> converter. I noticed in an earlier message that paged LOD support
>> >> does not exist yet, so is it safe to assume that what I am
>> seeing is
>> >> a direct result of that?
>> >>
>> >> Thanks,
>> >> Brian
>> >> _______________________________________________
>> >> osg-users mailing list
>> >> [email protected]
>> >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
>> >negraph.org
>> >
>>
>>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org