AFTER 2.65 - Collada Spotlight angle animation is in radians not degrees
Closed, ResolvedPublic

Description

Windows 7 64bit
Blender 2.64.0 release 64bit version
GeForce GT 230M

Blender is exporting and importing spot light angle as radians, but it should be in degrees.

default scene
open light properties
convert to spot light
right click Size: under spot shape set 75 degrees and insert a keyframe
move time to 60
set Size 30 degrees
right click insert keyframe
file - export - collada
selection only

dae file light set to 30 degrees in the scene section = the value with the blender scene at frame 60
animation values show as 1.308997 0.523599
1.308997 rad -> 75 degrees
0.523599 rad -> 30 degrees

when the dae file is read back into blender the radians are converted back to degrees

mont29 (Bastien Montagne) added a comment.Via Old WorldDec 4 2012, 12:28 AM

Pff… Another stupid one…
For some reason, spotsize angle is still stored as degrees in blender's internal data (whereas it should be as radians, as any other angle now). So basically, as COLLADA seems to expect degrees, the exporter should do RAD2DEG conversion systematically.
The funny stuff is that animation is handled through “pure” RNA, hence in radians!

Anyway, it’s not trivial change (would need a version bump & loader adapting func), so guess it’s post-2.65 now.

gaiaclary (Gaia Clary) added a comment.Via Old WorldDec 5 2012, 8:39 PM

Is this something that changed from 2.64 to 2.65 ? We fixed a similar issue for the Camera fov for 2.64. The whole topic of materials and lighting is yet to be reviewed and hopefully completed. That is also on my investigation list :)

dingto (Thomas Dinges) added a comment.Via Old WorldFeb 19 2013, 1:31 AM

What is the status of this?

mont29 (Bastien Montagne) added a comment.Via Old WorldFeb 19 2013, 8:10 AM

Mmmh… Only real good way to solve this would be to apply that todo: http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Compatibility_Breaking

Not hard, but breaks forward compatibility. Any other solution would be a hack in collada area I guess, but that’s up to Gaia.

gaiaclary (Gaia Clary) added a comment.Via Old WorldFeb 19 2013, 10:12 AM

I guess it could be quickly fixed (hacked) but since at the moment the collada exports for material&light only work reasonably in conjunction with the blender collada importer, i do not see where such a "fix" would help anything in that case.

What i mean is: When i use Maya for testing, i see serious compatibility issues with the material&light related exports from Blender. I would prefer to rewrite the export&import of materials&light. But that can not be done in one afternoon...

So IMHO this report should be moved to TODO ( as part of a rewrite of the light/material transfer )

gaiaclary (Gaia Clary) added a comment.Via Old WorldFeb 19 2013, 12:07 PM

Collada Import bugs will be investigated for Blender 2.65

For this reason this Report has been set as "Closed/Todo" and linked from our wiki page.

http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Import_Export#OpenCollada

You can still update this report with more detailed information until it gets reopened/fixed.

gaiaclary (Gaia Clary) closed this task as "Archived".Via Old WorldFeb 19 2013, 12:08 PM
gaiaclary (Gaia Clary) reopened this task as "Open".Via WebJan 30 2014, 10:11 PM
gaiaclary (Gaia Clary) changed Type from To Do to Bug.Via WebJan 30 2014, 10:14 PM
gaiaclary (Gaia Clary) edited this Maniphest Task.Via LegacyJan 30 2014, 10:22 PM
gaiaclary (Gaia Clary) added a comment.Via WebJan 31 2014, 9:44 AM

Thanks to clintonman for reporting, and
thanks to sauraedron for fixing this :)

gaiaclary (Gaia Clary) closed this task as "Resolved".Via WebJan 31 2014, 9:45 AM
gaiaclary (Gaia Clary) claimed this task.
gaiaclary (Gaia Clary) edited this Maniphest Task.Via LegacyFeb 2 2014, 2:33 PM

That's great that this got fixed. I'm not sure how useful backward compatibility would be, unless someone was manually editing Collada files to get them into Blender properly., but it's a nice safety net to have just in case.

gaiaclary (Gaia Clary) added a comment.Via WebFeb 2 2014, 6:04 PM

The problem is that any Collada file that was made by blender 2.69 or older will import spotlight_size wrong when imported to Blender 2.7 or newer. So actually i believe we should have this "compatibility check" to avoid any issues.

Add Comment