irrb 0.4 (Blender Exporter)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

When I turn off gouraud shading the export looks like the image on the left. Can you post a link to your .blend file? Thanks.
Flatlander
Posts: 9
Joined: Sun Feb 25, 2007 7:18 pm
Location: Finland
Contact:

Post by Flatlander »

Here is a .zip with both the original .blend file and an exported .irrmesh: http://yellow-hut.com/images/Cube.zip

As a quick test I just modified the 04.Movement example, like this:

Code: Select all

 /*
    Now we create another node, movable using a scene node animator. Scene
    node animators modify scene nodes and can be attached to any scene node
    like mesh scene nodes, billboards, lights and even camera scene nodes.
    Scene node animators are not only able to modify the position of a
    scene node, they can also animate the textures of an object for
    example. We create a cube scene node and attach a 'fly circle' scene
    node animator to it, letting this node fly around our sphere scene node.
  */
  scene::ISceneNode* n ;// = smgr->addCubeSceneNode();
  n = smgr->addAnimatedMeshSceneNode(smgr->getMesh("Cube.irrmesh"));

  scene::ILightSceneNode* l = smgr->addLightSceneNode(0, core::vector3df(0,0,0), video::SColor(255, 255,255,255));
  l->setLightType(video::ELT_DIRECTIONAL);


  if (n)
    {
      n->setMaterialTexture(0, driver->getTexture("../../media/t351sml.jpg"));
      n->setMaterialFlag(video::EMF_LIGHTING, true);
      n->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
      n->setMaterialFlag(video::EMF_GOURAUD_SHADING, false);

      scene::ISceneNodeAnimator* anim =
	smgr->createFlyCircleAnimator(core::vector3df(0,0,30), 20.0f);
      if (anim)
	{
	  n->addAnimator(anim);
	  anim->drop();
	}
    }

...
With these changes on my machine the bottom of the Cube.irrmesh seems corrupted.
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

Turns out this was a bug in irrb, specifically how quads were being converted to tris during the export. I've fixed it in the upcoming 0.4 release:
Image
The workaround for 0.3 is to convert quads to tris in Blender (CTRL-T in edit mode) before exporting. Thanks for reporting this.
Flatlander
Posts: 9
Joined: Sun Feb 25, 2007 7:18 pm
Location: Finland
Contact:

Post by Flatlander »

Great! Thank you for the quick fix :)
oli03
Posts: 4
Joined: Tue Aug 25, 2009 4:08 pm
Location: Auvergne - France

Post by oli03 »

I've tested exporting models with un-applied scaling and rotation so I'm not sure what the problem is here. Please post a link to a .zip file that contains the problem .blend file and the "irrb.log" file that is generated in the scene output directory. Thanks.
I've found the problem, it's my fault : I had objects with negative scale in X or Y or Z ! That's why I had to apply transformation.
Thanks.
squisher
Competition winner
Posts: 91
Joined: Sat May 17, 2008 2:23 am
Contact:

Post by squisher »

pc0de,

anxiously awaiting your 0.4 release :D

any idea how soon it'll be ready?
drr00t
Posts: 14
Joined: Wed Aug 05, 2009 2:11 pm
Location: Brasilia/DF - Brasil

meshe loading with irr binary format

Post by drr00t »

Hi,

I´m coding my own irr scene loader because i want control insert and remove meshes from scene. Until now i was using standard irr mesh format irrmesh and all work fine, but when i try load same mesh converted to irrbmesh (irr binary) any material is loaded, just the meshes. To load a irrbmesh i use last version of CIrrBMeshLoader from Tubras repository.

steps to load mesh are:

1 - register irrb meshe loader as external loader
2 - parse mesh parameters from scene file
3 - create IMesh using scene manager and meshe parsed by scene loader
4 - attach mesh to scene node.

Any about why standard mesh work and binary meshe not?

thanks in advance.

irrb is really cool exporter!
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Re: meshe loading with irr binary format

Post by pc0de »

squisher wrote:anxiously awaiting your 0.4... how soon...
You'd think I'd learn how to estimate better. Let's see, 1st week of Sep. / 1.6 * 2.0 = if not this weekend, then likely the next :).
drr00t wrote:Hi, Any about why standard mesh work and binary meshenot?
To be sure, did you use version 0.3 of imeshcvt.exe? Does it work if you use iwalktest as the viewer? Also, post or send me the irrb.log file from the export (located in the same directory as the scene file). Thanks.
ProjectIRR
Posts: 21
Joined: Mon Oct 26, 2009 3:21 am

Post by ProjectIRR »

Wow! If only there was one for Maya!
Quillraven
Posts: 62
Joined: Fri Aug 22, 2008 7:22 am

Post by Quillraven »

hey,

is there any possibility that irrb isn't compatible with the newest blender version 2.49b?

i get errors like:
error in iGUI.py
import Blender,types,os,sys,subprocess
ImportError: no module named types, os, subprocess
// ...
what am i doing wrong?

irrb worked for me with an older version of blender. i unzipped the irrb.zip in the .blender/scripts folder. guess that's everything you have to do?
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

Quillraven wrote:compatible with the newest blender version 2.49b
Shouldn't be a problem. Is Python installed on the machine you're running 2.49b on?
Quillraven
Posts: 62
Joined: Fri Aug 22, 2008 7:22 am

Post by Quillraven »

yes it is.

here are the exact errors:
Image

edit: oehm k. the first line of the console tells me, that python is not installed oO
but in fact, it is?

edit2:
k python problem fixed with this thread
http://www.blender.org/forum/viewtopic.php?t=11938

errors stillt remain :/
Image

edit3:

nvm, works now :D
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

@Quillraven:
:)

@drr00t:
Thanks for the log file - everything looks good there. Are you able to view the materials in iwalktest when "Create Binary Meshes" is checked in irrb?
drr00t
Posts: 14
Joined: Wed Aug 05, 2009 2:11 pm
Location: Brasilia/DF - Brasil

Post by drr00t »

Hi,

Yes, i using iwalktest all work fine and fast. Material isn't loader... i trying understand what happening here...

I look at code of iwalktest and mesh load in made by scene manager like using CIrrBMeshLoader like me, but with me the material isn´t loaded when i try irrbmesh, but works with normal irrmesh.

thanks for answer
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

After reviewing your log again, I noticed you're using the un-released version of irrb 0.4. A test I did earlier this week with 0.4/irrbmesh also had material issues and it's still on my list to fix. I do know that updating the scene load to be:

Code: Select all

stringc saveDir = getFileSystem()->getWorkingDirectory(); // new
getFileSystem()->changeWorkingDirectoryTo(sceneDirectory); // new

getSceneManager()->loadScene(m_sceneFileName.c_str(), this);

getFileSystem()->changeWorkingDirectoryTo(saveDir); // new
fixed the material problem, but I haven't yet taken the time to figure out why. You could try modifying your code to include the above working directory logic or hold off until 0.4 is officially released. Thanks.
Post Reply