irrb getting shapes wrong on mesh export [solved]

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
pilesofspam
Posts: 62
Joined: Mon May 11, 2009 4:31 am

irrb getting shapes wrong on mesh export [solved]

Post by pilesofspam »

I'm back... Turns out that after a good bit of fooling around, I'm beginning to like Blender. I'm using irrb with walktest to determine when I'm getting the results I was shooting for, and that works well.

Here's the problem. I made a simple UFO. In walktest it looks like this:
Image

But when I export the mesh as an irrmesh and load it in my own scene it looks like this (um...)
Image

Any ideas?
Last edited by pilesofspam on Thu Feb 18, 2010 6:41 pm, edited 1 time in total.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Don't know how walktest works, but it looks like you are using mesh manipulators which are not applied to the mesh for real, hence you get the base primitives.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

maybe you should find a way to convert it into real mesh in your 3d software.

by the way your alien looks very similar to mine :lol: (even the color)

Image
did this 3 years ago
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

hybrid is correct - irrb doesn't apply mesh modifiers before exporting. For the record - iwalktest simply loads the exported scene using ISceneManager->loadScene() which in turn loads the exported meshes.

I think the problem pilesofspam is seeing is that the mesh contains an un-applied scale in Blender. Because iwalktest loads the mesh indirectly through loadScene, the scale (stored in the .irr scene file and not the.irrmesh file) is taken into account.

So... pilesofspam you can either:
  • Apply the scale to the mesh in Blender before exporting: (CTRL-A).
    or
    Manually set the scale in your code after you load the mesh: IAnimatedMeshSceneNode->setScale(core::vector3df&)
pilesofspam
Posts: 62
Joined: Mon May 11, 2009 4:31 am

Post by pilesofspam »

Thank you all very much. After choosing option 1 (applying the scale in blender with CTRL+A) the mesh export came out like I expected. I think I understand what I just did, but I'll need to study that a bit.

Image

Virion- that's pretty neat! The color similarity is amazing. Last year I did a pirate ship as part of a game using irrlicht for my son's birthday, but I did the ship in google sketchup and exported as a .3ds. I feel confident that I can get better results using blender and irrb. I'll also understand the mechanics or both Blender and irrlicht a little better.
Post Reply