Double scaling for cylinder shape in .bullet export, cone shape not serialized #38474

Closed
opened 2014-02-04 08:43:22 +01:00 by Alexander Filonov · 11 comments

System Information
Windows 7 x64

Blender Version
Broken: 2.69.0 r60995

In blender, Scale and dimension of an object change simultaneously. I export the model with cylinder collision shape to the .bullet through the usual script:

import PhysicsConstraints
PhysicsConstraints.exportBulletFile("d:/myFile.bullet")

and then deserialize it to my application, based on bullet (bullet-2.82-r2704). During the import, the collision shape is imported with the given dimensions, and then scaling is applied, which results in squared shape dimensions - e.g. cylinder with scale 3.0 has dimension 23.0=6.0 in blender, but after importing corresponding .bullet file it becomes 23.0*3.0=18.0 in my app.
I tried this for box, sphere, convex hull and cone, all works ok for box, sphere and convex hull, cylinder has errors as mentioned above, and cone is not deserialized at all - there must be some binary structure misalignment.

blender scene: scaling_blender.png
blender file: scaling.blend
my application output: scaling.png (the big base plane is not related to the original scene)

**System Information** Windows 7 x64 **Blender Version** Broken: 2.69.0 r60995 In blender, Scale and dimension of an object change simultaneously. I export the model with cylinder collision shape to the .bullet through the usual script: ``` import PhysicsConstraints PhysicsConstraints.exportBulletFile("d:/myFile.bullet") ``` and then deserialize it to my application, based on bullet (bullet-2.82-r2704). During the import, the collision shape is imported with the given dimensions, and then scaling is applied, which results in squared shape dimensions - e.g. cylinder with scale 3.0 has dimension 2*3.0=6.0 in blender, but after importing corresponding .bullet file it becomes 2*3.0*3.0=18.0 in my app. I tried this for box, sphere, convex hull and cone, all works ok for box, sphere and convex hull, cylinder has errors as mentioned above, and cone is not deserialized at all - there must be some binary structure misalignment. blender scene: ![scaling_blender.png](https://archive.blender.org/developer/F75940/scaling_blender.png) blender file: [scaling.blend](https://archive.blender.org/developer/F75942/scaling.blend) my application output: ![scaling.png](https://archive.blender.org/developer/F75938/scaling.png) (the big base plane is not related to the original scene)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @kingsb

Added subscriber: @kingsb
Member

Added subscriber: @brita

Added subscriber: @brita
Member

@kingsb there were some changes affecting this recently, can you test again in with the 2.71 RC?

@kingsb there were some changes affecting this recently, can you test again in with the 2.71 RC?
Member

@kingsb I can not possibly test in useful time if this is working or not with your setup without your collaboration.

@kingsb I can not possibly test in useful time if this is working or not with your setup without your collaboration.

@brita, Cone now deserialized perfectly. For cylinder deserialization to work, fixes to bullet code required - but this does not relates directly to blender. Scale and dimension of an object still change simultaneously - as I understand it's a choice of design, they are synonyms in blender, while in bullet they have slightly different meaning and can be changed independently.

@brita, Cone now deserialized perfectly. For cylinder deserialization to work, fixes to **`bullet`** code required - but this does not relates directly to blender. Scale and dimension of an object still change simultaneously - as I understand it's a choice of design, they are synonyms in blender, while in bullet they have slightly different meaning and can be changed independently.
Member

@kingsb in blender you also have scale and dimension. If you scale an object, both will change, but you can then apply the scale meaning that it will be set to 1 while keeping the dimensions.
This is no longer a problem then? I can close?

@kingsb in blender you also have scale and dimension. If you scale an object, both will change, but you can then apply the scale meaning that it will be set to 1 while keeping the dimensions. This is no longer a problem then? I can close?

Sorry, I did not find the way to change the scale separately from dimensions. How to do that?

Sorry, I did not find the way to change the scale separately from dimensions. How to do that?

Oh, I found it! Ctrl-a - so simple!
Yes, you can close.

Oh, I found it! Ctrl-a - so simple! Yes, you can close.
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Inês Almeida self-assigned this 2014-07-03 19:30:20 +02:00
Member

I am glad you have a simple solution to your workflow :)
closing

I am glad you have a simple solution to your workflow :) closing
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blender/blender#38474
No description provided.