Hi all,

Defining a coordinate system for OSG is a good idea. Though to me the
most important aspect of reader and writers, is that this expression
must be true:

read( write( A ) ) = A

Rizzen

Sukender wrote:
> Hi Ulrich, Paul, and all,
>
> I agree we should unify the coordinate system during loading AND writing. 
> Here are my suggestions :
> - Have plugins do NO rotation by default (reading and writing) when the 
> format doesn't have coordinate system information (that is to say all but FBX 
> and maybe FLT).
> - Have plugins read and apply coordinate system information if available by 
> default when reading.
> - Have optionnal READING options:
>     - readXup, readYup, readZup to suppose model is X, Y or Z-up (overrides 
> format's coordinate system information)
>     - readLeftHanded, readRightHanded (similar setting)
>     - When in conflict (two options defined), use the latest one
> - Have optionnal WRITING options:
>     - writeXup, writeYup, writeZup, writeLeftHanded, writeRightHanded (which 
> should almost never be supported, in my opinion)
> - Let plugings optionnally support these options prefixed with their name and 
> "_". For instance "3ds_readYup" would assume ONLY ".3ds" files are Y-up. 
> These would take precedence over the general settings.
> - Also support "pluginName_read/writeAutoUp" and 
> "pluginName_read/writeAutoHanded", which would specifically deactivate a 
> global setting for a given plugin. For instance, "fbx_readAutoUp" would let 
> the plugin decide the up vector (here using coordinate system information in 
> the .fbx). "3ds_readAutoUp" would mean "no rotation" for .3ds.
> - Write a portion of code somewhere in osgDB to parse all these options and 
> store it in a nice structure (to avoid each plugin duplicating code). To be 
> called with something like "myStructure = 
> osgDB::readStandardCoordinateSystemOptions(PLUGIN_NAME)".
> - As OpenGL doesn't have a "etched in stone" orientation standard, use the 
> osgGA as an "internal" standard (that is to say +Z up, right handed) when a 
> change is needed.
>
> 1. Please raise your hand if you agree, and tell about changes you'd like to 
> introduce in this summary.
> 2a. Please mention all plugins you know which break these rules.
> 2b. Please tell if you agree modifying those plugins.
>
> When all is ok, I'll code it.
>
> Cheers,
>
> Sukender
> PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
>
> ----- "Ulrich Hertlein" <[email protected]> a écrit :
>
>   
>> On 29/12/09 6:52 PM, Paul Martz wrote:
>>     
>>> Paul Martz wrote:
>>>       
>>>> I've noticed the same thing with OBJ.
>>>>         
>>> A little digging reveals that the OBJ plugin has a "noRotation"
>>>       
>> Option
>>     
>>> that disables the x axis rotation. The rotation is only done on
>>>       
>> file
>>     
>>> load, not on file write.
>>>
>>> Rotation about x is on by default. I'd suggest a change to off by
>>> default, and the Option changed to "doRotation" to enable it.
>>>       
>> The .x plugin has 'leftHanded' and 'rightHanded'.  Maybe we could
>> establish a common
>> option for this type of functionality (one that does 'convert to
>> right-handed, Z-axis up').
>>
>> There already are options with (apparently) related functionality
>> (courtesy of 'osgconv
>> --formats'):
>>
>> Coordinate system:
>>    obj:noRotation
>>    x:leftHanded
>>    x:rightHanded
>>
>> Optimization:
>>    obj:generateFacetNormals
>>    obj:noTriStripPolygons
>>    stl:generateNormals
>>    stl:smooth
>>    stl:tristrip
>>
>> Image orientation
>>    hdr:NO_YFLIP
>>    hdr:YFLIP
>>    x:flipTexture
>>
>> Cheers,
>> /ulrich
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>     
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>   

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

Reply via email to