irrb 0.4 (Blender Exporter)

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

Post by pc0de »

vermeer - Thanks.

Quillraven - Yes, your mesh exceeds the 64k index limit. The exception is caused by a bug in irrb.

The reason afecelis doesn't see the error is because his scene is composed of multiple meshes verses a single, big mesh.

To fix the exception in 0.2, change line 237 of iMesh.py:

Code: Select all

From:
    (buf.bMesh.name,len(buf.faces)))

To:
    (meshBuffer.bMesh.name,len(meshBuffer.faces)))
Although that fixes the exception, the exporter will then abort with the message "Mesh exceeds buffer index limit". Until the .irrmesh loader is updated to use 32 bit indices, you can either reduce the number of faces in the mesh, or separate your mesh into individual meshes that stay under the 64k restriction.

If you choose to reduce faces, keep in mind that irrb automatically converts Blender quads into triangles. So 1 quad face in Blender equals 2 triangle faces written to the mesh buffer.

Here's an iwalktest screen shot of your terrain separated into thirds:
Image

To separate in Blender - select the vertices that you want to separate and press the PKEY. Note that Blender retains the original UV texture and coordinates after the separation.

And finally - it took iwalktest about 3 minutes on my machine (AMD 64 4000+, 2.54GHz) to load the .irrmesh files for your scene. So, it's not locked up - just taking a long time to load all the vertex and face info via the xml reader.
Quillraven
Posts: 62
Joined: Fri Aug 22, 2008 7:22 am

Post by Quillraven »

thx 4 the help!

i could export the terrain now but however the textures are still grey as if i would export with .obj.

any important things i have to do, to export with the correct materials/textures?

in irredit i got this:
Image

and when i would select a texture, the terrain gets colored in the texture's "maincolor".
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

Yes, irrb only exports UV mapped images that have been setup in the UV Editor (also referred to as "Game Engine Materials"). It doesn't export Render/Procedural materials.

You can bake Render materials onto a UV mapped image, which is what I did in the screen shot above. Before I split your mesh into thirds (using 2.48a), I:
  • 1. Split the view - 3D on the left, UV/Image Editor on the right.

    2. Top View (7) on the left (Orthographic).

    3. Tab into Edit mode.

    4. Selected all of the vertices.

    5. Unwrap (UKEY) and "Project from View Bounds".

    6. In the UV/Image Editor, create a new image and accept the defaults.

    7. Bake the Procedure Materials onto the newly created UV Image by selecting the menu: "Render | Bake Render Meshes | Texture Only".

    8. Save the generated UV Image to a file.
Note that if you want to also bake lighting/shadows into the UV Image, you would choose "Render | Bake Render Meshes | Full Render" in step 7.
Quillraven
Posts: 62
Joined: Fri Aug 22, 2008 7:22 am

Post by Quillraven »

sry 4 spam:

SUCCESS! ;)

thx pc0de for your help!
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Hi pc0de :D

Any news on irrb 0.3?
I'm definitely looking forward to testing it out both in Linux and Windows.

Oh yes, I forgot...happy new year! ;)

regards,
Alvaro
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

Hey afecelis, happy new year to you!

All that remain are Linux testing and documentation updates. So any day/week now... :)
netpipe
Posts: 669
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

hey

Post by netpipe »

i've been using it under 64 bit linux and all i can say is thanks a zillion hopefully i can contribute to it soon.
deadReaper
Posts: 7
Joined: Fri Jan 23, 2009 2:47 pm

Post by deadReaper »

Hi pc0de, first of all thanks for your great work!
Im Using your Great Exporter now and it works fine.

But the loading tim of .irrmesh is painfull slow so i realy realy want to use your irrbmesh format wich dramatically decreases loading time.
This works fine as long as i use absolute paths. But with absolute paths I cant release my work, becuse I want run it on multiple operating systems.

I am not getting relative path workin with irrbmesh, seems as it doesnt supports it for me. Am I right or am I making something wrong?
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

Sorry deadReaper for missing your post... The problem you're having has been fixed in irrb 0.3. In fact, starting with 0.3, absolute mesh/texture paths are no longer supported for the reason you stated.

Note that the .irrbmesh format is still experimental, but 0.3 contains version info that will allow the writer and reader to work in the future with older versions.

I'll be posting 0.3 tomorrow night - really... :roll:
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

0.3 is up. Details are located on the 1st page of this thread.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Yessssssssssssssssssssssssssssssssssss!!!! Thanks Pc0de! :D
Any improvements on the Linux side of the force? ;)

Checking and testing immediately!

regards,
Alvaro
EDITED: wow! the new examples look extremely useful! thnx! :D
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

:), you're welcome.

Nothing special on the Linux side vs Windows and the utils are still only available as 32 bit apps.

Prolly the most significant addition is the ability to customize scene node attributes as well as Irrlicht's material attributes at the face/ mesh buffer level. In other words, all of the material/layer attributes (Lighting, ZWriteEnable, ZBuffer, AntiAliasing, BilinearFilter, etc.) may be overridden and saved along with the .blend file. The details are documented in the User Guide under the chapter titled "ID Properties".

It's not necessary to understand it out of the gate, but good to know it's there if you need it.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Thanks again, Pc0de :D
The documentation is also very nice. It'll take a while to read and test.

One last question, is Irrklang still an obligatory dependency in Linux?

regards,
Alvaro

ps. I'll try what I can in Linux64, but I still hope you get a native 64bit version of Irrb someday ;)
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

afecelis wrote:One last question, is Irrklang still an obligatory dependency in Linux?
I removed that dependency in 0.3 because irrb still isn't exporting sound nodes.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

That's great. Right now I'm working on windows 32 before trying stuff out in Linux.

Reading the lightmapping tutorial I see you still mention using the "F" key to enter UV mapping mode and select faces to unwrap them; remember that this method is now deprecated and everything is done while being in edit mode which makes things easier (one step less) ;) .
Another thing to update/correct is that to join the 3 meshes you don't use the "J" key but "CTRL+J" ;)

You also mention that once Irredit's 1.4 ligtmapper and features get some bugs fixed using blender to lightmap will be pointless. Now that Irredit 1.5 is out do you consider the lightmapping part should be done there? On the personal side, I like using blender for the lightmapping part, it gives you total control of your scene in a single application ;)

Another possibility would be to write an exporter for Giles. Now that it is free, you could take advantage of its advanced ligthmapping features:
http://www.frecle.net/index.php?show=ho ... =frecle015

Gile's format specs:
http://www.frecle.net/download/glsspecs.htm

Another way I'm working with blender is exporting to b3d with Gandaldf's b3d exporter:
http://www.gandaldf.com/
Then importing the b3d into Giles and lightmap it ;)

However, I don't get the advanced features you get with Irrb and direct file output to .irr and mesh formats, so it would be nice if at least you could give those tools a quick glimpse ;) to see if they somehow could offer something to your pipeline.

regards, I now keep on going with more tests.

Alvaro
Post Reply