Collada: importing a scene from sketchup 8 changes the unit system in Blender #33437

Closed
opened 2012-12-07 08:04:17 +01:00 by mat ali · 12 comments

Duplicates: #28242

%%%Importing any Collada scene from Sketchup 8 (I think it's not specific to sketchup but didn't see that problem with my other programs as they all produce meters .dae files) to Blender changes the unit system of the current scene. An imported object should respect user's chosen unit system not the other way round.
I can make an example scene at school if needed, but just doing a 222 cube in sketchup, exporting to collada is enough to see the bug.%%%

**Duplicates**: #28242 %%%Importing any Collada scene from Sketchup 8 (I think it's not specific to sketchup but didn't see that problem with my other programs as they all produce meters .dae files) to Blender changes the unit system of the current scene. An imported object should respect user's chosen unit system not the other way round. I can make an example scene at school if needed, but just doing a 2*2*2 cube in sketchup, exporting to collada is enough to see the bug.%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%It's a feature actually, though I agree it's not a good idea to change the units by default. The wanted behavior is different depending if you are importing an entire scene, or adding an object into an existing scene.%%%

%%%It's a feature actually, though I agree it's not a good idea to change the units by default. The wanted behavior is different depending if you are importing an entire scene, or adding an object into an existing scene.%%%
Author

%%%hmm, maybe i didn't explained it good enough, sorry. I join the example file. It's a 2m cube, import it in the default scene after setting meter, with default blender's cube, 2m then too) and compare the 2 cubes. Everything that was in Blender before the import get weird measures.%%%

%%%hmm, maybe i didn't explained it good enough, sorry. I join the example file. It's a 2m cube, import it in the default scene after setting meter, with default blender's cube, 2m then too) and compare the 2 cubes. Everything that was in Blender before the import get weird measures.%%%

%%%I understand what you're saying, but this option was implemented with the idea that you'd be importing an entire collada scene, with unit settings included. Which in your case clearly is not useful behavior.%%%

%%%I understand what you're saying, but this option was implemented with the idea that you'd be importing an entire collada scene, with unit settings included. Which in your case clearly is not useful behavior.%%%
Member

%%%I could add the checkmark as also proposed in the other reportto the importer "import metric" which could be disabled by default (or enabled whatever is more convenient).%%%

%%%I could add the checkmark as also proposed in the other reportto the importer "import metric" which could be disabled by default (or enabled whatever is more convenient).%%%
Author

%%%Yes, would be nice to add a checkmark. At least, if continuing with inches, that a 2m cube made in Blender and a 2m imported cube get the same size.

I'm not an expert with float precision, but importing a scene and then using 0,0254 as scale for world may reduce precision ? I import scenes that are sometime 2km big, they are 2km big in blender after 0,0254 scale, that means they are about 78 km big (x and y) at scale 1. Maybe doing the conversion to BU/meter during import would increase accuracy, i noticed some weird distortions at edges of such big planes.%%%

%%%Yes, would be nice to add a checkmark. At least, if continuing with inches, that a 2m cube made in Blender and a 2m imported cube get the same size. I'm not an expert with float precision, but importing a scene and then using 0,0254 as scale for world may reduce precision ? I import scenes that are sometime 2km big, they are 2km big in blender after 0,0254 scale, that means they are about 78 km big (x and y) at scale 1. Maybe doing the conversion to BU/meter during import would increase accuracy, i noticed some weird distortions at edges of such big planes.%%%

%%%Adding an option seems a good solution yes. Probably should be called "Import Units" since it's not only metric units that are supported. Actually scaling objects to match units could be done too, but would not consider that needed as a bugfix, the Collada importer can be improved in many ways.%%%

%%%Adding an option seems a good solution yes. Probably should be called "Import Units" since it's not only metric units that are supported. Actually scaling objects to match units could be done too, but would not consider that needed as a bugfix, the Collada importer can be improved in many ways.%%%

%%%The problem is more visible in SketchUp because it always export the models as Imperial, even if you were working with meters.

I think the whole point here is not to "keep the scene in meters". One can easily go to scene panel and switch back to meters, and the 222 cube will be 222 meters.
The actual problem is the scale factor, because if one was working in the scene before and want to add an asset from a .dae file, the (x) meter = 1blender unit has to be the same for the imported models. So basically I wouldn't ever change the scene "scale", but the other way around. And I do think it's a bug, if it's an option I hope it can be True by default.%%%

%%%The problem is more visible in SketchUp because it always export the models as Imperial, even if you were working with meters. I think the whole point here is not to "keep the scene in meters". One can easily go to scene panel and switch back to meters, and the 2*2*2 cube will be 2*2*2 meters. The actual problem is the scale factor, because if one was working in the scene before and want to add an asset from a .dae file, the (x) meter = 1blender unit has to be the same for the imported models. So basically I wouldn't ever change the scene "scale", but the other way around. And I do think it's a bug, if it's an option I hope it can be True by default.%%%
Member

%%%Your reported issue has been fixed in SVN. Thanks for taking the
time to report!.%%%

%%%Your reported issue has been fixed in SVN. Thanks for taking the time to report!.%%%
Member

%%%partial fix in revision 54411
Note: When the import Units option is disabled, then we might need to adjust the imported object scalings to match Blender's current settings. This is not yet implemented and will be done after 2.66. Please feel free to add a feature request to the Collada Wiki Page at:

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

Closing.%%%

%%%partial fix in revision 54411 Note: When the import Units option is disabled, then we might need to adjust the imported object scalings to match Blender's current settings. This is not yet implemented and will be done after 2.66. Please feel free to add a feature request to the Collada Wiki Page at: http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Import_Export Closing.%%%
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

%%%In svn revision 54442 i have added scale adjustment during import.

By default Blender now tries to match the scales such that units are preserved. Thus for example:

  • in Blender scene set to metric, factor 0.01 -> 1 BL_UNIT equals 1 cm
  • In Collada file: unit = 1 Meter
  • assume a cylinder of length 1 meter in Collada file

After import the cylinder will have 100 Blender units and it will still be of size 1 meter.
I have briefly tested with Imperial units. Unit type NONE is mapped to 1 BL_UNIT==1 Meter

Please can you test that in depth ? I think i made it correct, but it really can be helpful to have a second opinion on that :)%%%

%%%In svn revision 54442 i have added scale adjustment during import. By default Blender now tries to match the scales such that units are preserved. Thus for example: - in Blender scene set to metric, factor 0.01 -> 1 BL_UNIT equals 1 cm - In Collada file: unit = 1 Meter - assume a cylinder of length 1 meter in Collada file After import the cylinder will have 100 Blender units and it will still be of size 1 meter. I have briefly tested with Imperial units. Unit type NONE is mapped to 1 BL_UNIT==1 Meter Please can you test that in depth ? I think i made it correct, but it really can be helpful to have a second opinion on that :)%%%
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#33437
No description provided.