Robert Osfield wrote:
Thanks Jason, changes built fine and are now checked into svn/trunk.

Excellent!  I was hoping to make the 2.8 release  :-)


Merging these changes reminded me of the scaling problem, and that the
old Quake plugin had the same problem originally, but I vaguely recall
fixing this.  So I've just done a review of the old quake3 bsp code
and found a hacky fix for the scaling in
Q3BSPReader::convertFromBSP(..).  This hack hardwires the scaling to
0.03.

Could it be that the Q3 models are scaled in inches rather than
metres?  Could it be that the Valve models have the same scale?

The Valve models are indeed natively in inches. I already went ahead and scaled (0.0254) all the vertices as they're read from the file in both the bsp and mdl plugins. I thought about using a global MatrixTransform as well, but I've often found these annoying to deal with when writing applications (you have to be careful what units you're working with any time you have to do any processing on the geometry). Scaling the vertices directly (essentially, just pushing the transform down to the leaves) always seemed less problematic to me. That said, I'm not *strongly* opposed to a MatrixTransform at the top, if you'd prefer it that way.

A ReaderWriter option is definitely a good idea, though. We could replace the hard-coded scale factor on both sides with a user-defined scale factor that defaults to 0.0254.
--"J"

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

Reply via email to