scale of the scene

I am trying to write a program to convert .an8 files from Anim8or (www.anim8or.com) to Collada.

My goal is to be able to import a scene in Blender with meshes, camera, and lights.

But the default scale of the scenes are bigger in Anim8or than in Blender.

Is there a simple tag in Collada which can reduce the scale of the whole scene ?

If i use <scale> in the nodes, it will affect only the scale of the meshes. But not the positions of the meshes, cameras and lights.
the <unit> tag (in <asset>) seems to be just an information (?)

Thanks.

Yes the <unit> tag in the <asset> element should be used for this. Currently this is not featured in the Blender importer. I was going to do this for the latest release but decided to wait until someone posted a request…

And here we are today. :slight_smile:
I’ll add this to the list for things to be added for the upcoming version but if you need this A.S.A.P. let me know.

Thanks.
But i can wait. I have a lot of other things to finish in my converter.

By “scale” do you mean that each tool uses a different measure of distance? Is one in centimeters and the other inches for example?

That’s not true. The <scale> will affect the coordinate system of the parent <node> and that will affect apply to all geometric/spatial coordinates within it. If this is not happening in the tools you are using then please report a bug.

The <unit> element defines the unit of distance of the document. If your tool is using a different unit of measure then it can scale the contents on import using the information.

By “scale” do you mean that each tool uses a different measure of distance? Is one in centimeters and the other inches for example?

It’s not really a question of measure of distance. If you create a basic cube in Blender, it can have a size of 1.0. But in Anim8or, a cube with a size of 1.0 is very small and you will have difficulties to move its vertices (Anim8or is not enouth occurate with float).

If the scene i import in Blender fom Anim8or is too big, i will not see where the camera and the lights are.

That’s not true. The <scale> will affect the coordinate system of the parent <node> and that will affect apply to all geometric/spatial coordinates within it. If this is not happening in the tools you are using then please report a bug.

If i have a sphere with a radius of 10.0 and i use a scale such as <0.5 0.5 0.5>, my sphere will have a radius of 5.0. But if i use also a translate such as <10.0 0.0 0.0>, the sphere will have 5.0 for radius but will be translate with <10.0 0.0 0.0> and not <5.0 0.0 0.0>.
If i have a car made of several meshes, it will be a big problem.
Doesn’t it ?

The <unit> element defines the unit of distance of the document. If your tool is using a different unit of measure then it can scale the contents on import using the information.

OK. But if the modeler do not use any unit, how does it work ?
One meter can be equal to 1.0 a modeler, and it can be equal to 10.0 in another modeler.

It depends on the order in which you apply the transformations. As long as the scale is applied after the translate (which can be achieved by putting the scale in the root node), then in your example the sphere would be translated by 5 units, not 10. To prove this write out the transforms as matrices on paper and multiply them.