Thanks Bjorn, fix merged and submitted to svn/trunk.

On 23 May 2014 09:44, Björn Blissing <[email protected]> wrote:

>  Hi,
>
>
>
> I dug a bit deeper down to how the glossiness value was stored and it is
> stored using the exponential format: shininess= (2^(log2(glossiness)).
>
> Since log is undefined for zero. FBX exports glossiness values of 0 as 1.
>
>
>
> So I updated the recalculation back to osg's linear format.
>
>
>
> Disregard the previous file and see the attached file for latest version.
>
>
>
> Best regards
>
>
>
> Björn
>
>
>
> *From:* osg-submissions [mailto:
> [email protected]] *On Behalf Of *Björn
> Blissing
> *Sent:* Thursday, May 22, 2014 6:35 PM
> *To:* [email protected]
> *Subject:* [osg-submissions] Fix to support correct shininess and
> transparency in FBX plugin
>
>
>
> Hi,
>
>
>
> When working with one of our subcontractors, which was working in Autodesk
> Maya, we discovered that the FBX plugin could not handle the transparency
> during import. This is caused by Maya using a different encoding of
> transparency. Instead of using a single TransparencyFactor value. It uses
> transparency for each color, stored in the opacity property.
>
>
>
> My solution checks if the opacity property has colors defined as
> transparent. If they have transparent colors they will be converted into a
> greyscale factor (using the luminosity method). If this value has been
> calculated we use this instead of the transparency factor, otherwise we use
> transparency factor as before.
>
>
>
> When it comes to shininess this is something that 3D studio Max uses the
> term "Glossiness" for. In 3D studio Max the value is usually between 0-100,
> higher values are allowed but will result in some odd clipping. The
> glossiness value is stored in exponential form in the FBX file. To be able
> to use this we need to linearize and scale it to OSG's 0-128. If the user
> uses glossiness values above 100 these will be linearized, scaled and then
> clamped (resulting in the usual warning).
>
>
>
> Best regards
>
> Björn
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to