Wrong scaling COLLADA format

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Morganolla
Posts: 44
Joined: Tue Nov 17, 2009 9:56 am
Location: Rus

Wrong scaling COLLADA format

Post 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?
CuteAlien
Admin
Posts: 9716
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Morganolla
Posts: 44
Joined: Tue Nov 17, 2009 9:56 am
Location: Rus

Post by Morganolla »

I think Irrl don't read scale tag when import from COLLADA! This is a bug!
Last edited by Morganolla on Sun Jun 26, 2011 4:21 am, edited 2 times in total.
CuteAlien
Admin
Posts: 9716
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Morganolla
Posts: 44
Joined: Tue Nov 17, 2009 9:56 am
Location: Rus

Post 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?
CuteAlien
Admin
Posts: 9716
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
g0bl1n
Posts: 63
Joined: Thu Feb 21, 2008 8:45 am

Post by g0bl1n »

Are you using the newest Irrlicht version? Collada is a newer feature is it not?
CuteAlien
Admin
Posts: 9716
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Morganolla
Posts: 44
Joined: Tue Nov 17, 2009 9:56 am
Location: Rus

Post 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 ... ?
CuteAlien
Admin
Posts: 9716
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Morganolla
Posts: 44
Joined: Tue Nov 17, 2009 9:56 am
Location: Rus

Post by Morganolla »

I think, I'll write my own class for import from COLLADA to Irll. It will be more convenient for me. Thanks...
CuteAlien
Admin
Posts: 9716
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Wrong scaling COLLADA format

Post 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.
Post Reply