Page 1 of 1

Wrong scaling COLLADA format

Posted: Sat Jun 25, 2011 12:13 pm
by Morganolla
Well, I make large model in Blender 2.49, then export in COLLADA 1.4 (.dae). In Irrlicht my model look very little (like 1 unit in every dimention x-y-z). What's matter?

Posted: Sat Jun 25, 2011 8:44 pm
by CuteAlien
Zoom closer with the camera or scale the model. A unit is just a unit - it doesn't mean anything. With the right camera an ant can be huge and a solar system can be small... you define in your code what the camera is like.

Posted: Sat Jun 25, 2011 9:52 pm
by Morganolla
I think Irrl don't read scale tag when import from COLLADA! This is a bug!

Posted: Sun Jun 26, 2011 1:15 am
by CuteAlien
From the code it looks like it is read. Try copying the object and then scaling the copy to another size. If they have different sizes as well in Irrlicht it's read correct, otherwise you are right and there is a bug.

Posted: Sun Jun 26, 2011 4:10 am
by Morganolla
For example... I make a cube in Blender and apply a scale 10 to it. Then I export to COLLADA, In .dae file I can see scale tag=10. But when I import in Irrla, cube looks like scale=1. Irrla importer does not consider scale tag in COLLADA file!
But when I make big cube by hand ( node by node ), and in COLLADA scale tag=1, Irrla is importing correct cube size.
Is anybody note this bug before?

Posted: Sun Jun 26, 2011 9:25 am
by CuteAlien
I just tested it the way I described above. I made 2 cubes with different sizes, exported them and loaded them in Irrlicht. They have different sizes in Irrlicht.

edit: I did some more tests. I changed the scale by hand - with the result that it changed the size in Irrlicht as well so this also worked. So - I can't reproduce your bug. To me it looks like it works exactly as expected. You can test it yourself by exporting 2 cubes with different scales. Scaling does work.

Posted: Sun Jun 26, 2011 10:06 am
by g0bl1n
Are you using the newest Irrlicht version? Collada is a newer feature is it not?

Posted: Sun Jun 26, 2011 3:36 pm
by CuteAlien
I think the only change in the loader since 1.7.2 was a recent crash-fix. And I tested with the 1.7.2 branch and svn trunk.

Posted: Mon Jun 27, 2011 8:06 pm
by Morganolla
Hi, CuteAlien! Lets make cubes separately! First make cube #1 with scale=1, and export it to file 1.dae. Then, in new Blander page make cube #2 with scale=10 and export to file 2.dae. Then import them in Irll. scene nearby . You will see, that two cubes have the same size... or not ... ?

Posted: Mon Jun 27, 2011 9:39 pm
by CuteAlien
Sorry no - definitely not in my test - sizes change when I change them in Blender and import in Irrlicht aftward. Also note that you can change the values also directly in the xml (.dae is just an xml) and see the changes directly. And lastly - you can also do a non-uniform scaling (only x or y) which makes it even more visible that scale is regarded.

Posted: Tue Jun 28, 2011 4:05 pm
by Morganolla
I think, I'll write my own class for import from COLLADA to Irll. It will be more convenient for me. Thanks...

Posted: Tue Jun 28, 2011 4:29 pm
by CuteAlien
Eh -it's not like we wouldn't fix a problem. We just have to be able to reproduce it first. If you find a way for me to reproduce it I would try and help. Just - I exported with Blender 2.49, tried different sizes, tried different Irrlicht versions and tried modifying the .dae files directly and so far all tests simply worked.

Re: Wrong scaling COLLADA format

Posted: Thu Jun 30, 2011 9:43 am
by hybrid
Can't you upload an example file which uses the same cube or so twice, and generates wrong scaling? Shouldn't be too hard since you already have them at your disk as it seems.