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 »

@kryton9 - You're welcome. It's always those "little" things that often give me the most trouble. :)

@afecelix - Glad to see you got it :D - love that level btw. Regarding your question about irrEdit: Make sure you're not exporting the mesh as binary (.irrbmesh). irrEdit isn't .irrbmesh aware. Maybe I should look at creating a plugin, if that's possible...

After I finish updating the tutorials I plan to spend sometime playing with irrb->irrEdit.

edit => lmao - I just clicked on http://www.yonkis.com/mediaflash/unmillon.htm. I'm not sure how to interpret the ad at the bottom. :lol:
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

LOL! ;) It also makes me crack up every time I see it.

About the .irr file, I'm not enabling the binary mesh option, check the options I use to export:
Image

But Irredit won't open it, and trying to load it in one of my test apps crashes because of texture paths not found error. :(

May it be because I'm exporting everything into the same folder? In the previous you recommended exporting textures to a separate folder. Don't know what's wrong, but you're very close to rounding up the perfect creation tool! A million thanks again? ;)

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

Post by pc0de »

The paths to meshes and textures are going to be relative to either the application directory (your test app or irrEdit) or any directories that have been added programmatically via IFileSystem->addFolderFileArchive().

For your test app, you would need to either run within the "f:\Exer\irrb\test\" directory or add a call to IFileSystem->addFolderFileArchive("f:/Exer/irrb/test/").

I think irrEdit allows you to set a "working" directory in the general config/preferences. If it's still an option, set it to "f:\Exer\irrb\test\" and then open the scene file.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

It doesn't work either :(

Have you tried loading an exported .irr file in irredit?
cheers,

Alvaro :D
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

I tried everything from the start, and nope, it didn't work.

I tried to open the generated .irr file and all I get is a black empty space in irredit, however, if I start a new scene, erase the default cube and skybox and try to add the generated .irrmesh as a mesh, the log says it's loading the scene with textures and everything, but when it loads it is a totally white mesh:
Image
Yet, if I try to load the same mesh with the same lightmaps generated in blender but as a b3d file it loads fine:
Image

there must be something not being read fine by irredit or not exported properly in blender-irrb.

Can you please try loading your generated scene in irredit?

thanks Pc0de.

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

Post by pc0de »

Hmm, it loaded fine in irrEdit 1.5 for me:
Image
My irrb settings:
Relative Base=c:\scenes\
Scene Directory=c:\scenes\
Mesh Directory=c:\scenes\
Image Directory=c:\scenes\

The .blend file and images you sent are located in "c:\temp\temple\".

I set my irrEdit "working" directory (Tools|Options|Working Directory) to "c:\scenes". Restarted irrEdit and then opened "c:\scenes\Scene.irr".

*edit* I wonder why your mesh node is named "mesh" and mine is named "temple"? I read your post again and see that you tested loading just the mesh...

Are your textures located in "data/maps/irrb/"? What was the irrEdit "Working Directory" set to when you loaded the mesh?
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

you were right! (again). I hadn't set the working directory properly in Irredit. I just checked it and corrected it and now the .irr loads straight away!
Very nice! :D

Will resaving as .irr in irredit overwrite any of the original settings exported from blender with Irrb?

This keeps getting better and better! me likes! ;)

on to more testing.

regards,
Alvaro
gandolfix
Posts: 6
Joined: Wed Feb 25, 2009 8:08 pm

texture transition

Post by gandolfix »

Thanks for reply.

But I could not export a material with texture transition from Blender.
I can only export a simple UV texture and Lightmap.

I get the Quillraven file, I tried to export, but the mesh is too large.

Someone have a example, or a mini tutorial how I can do this like in image??


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

Post by pc0de »

afecelis wrote:Will resaving as .irr in irredit overwrite any of the original settings exported from blender with Irrb?
I haven't had any problems with smaller test scenes.

@gandolfix - Check out this link on Using Texture Stencils.
gandolfix
Posts: 6
Joined: Wed Feb 25, 2009 8:08 pm

Work fine in Blender, but dont export correctly

Post by gandolfix »

I do like in the tutorial, and look, in blender work ok!!
Image

But when I export, look the result:
Image

How I can export a texture transition with irrb??
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

I suspect that lighting may be enabled in the Irrlicht material generated by irrb. Please try this:
  • In Object Mode, deselect all of the objects.
    In the irrb interface click the button named "Create irrb Props".
    Re-Export
This will create default Blender/Irrlicht ID Properties for all of your procedural materials (lighting disabled).

If that doesn't work, be sure that you saved/re-packed the baked UV texture after it has been baked.

And finally, if neither of those things work:
  • Open your .blend file.
    Click on the menu item: File|External Data|Pack into .blend file.
    Save it to another file name.
    Zip it up and post it somewhere so I can download it.
gandolfix
Posts: 6
Joined: Wed Feb 25, 2009 8:08 pm

texture transition

Post by gandolfix »

Hi, pc0de, thaks for reply.

I try what you say, and work ok, see the images.
In belnder Render:
Image

And in walk test:
Image

To small worlds it ok. But... if I create UV texture with bake, I create only 1 texture, then if I have a big world, I cant use only 1 texture, cos in the game, the texture resolution will be bad.

May be I need to do it manually in game code. loading a texture, after the stencil, and another texture. Someone know how I can do that??
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

nice! that's looking great!
I didn't know texture blending was possible! Irrb surprises me by the minute! ;)

I shall try it out myself following thou posted "stencils" tutorial ;)

regards,
Alvaro
Image
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Pc0de, a quick question, or issue I just noticed.
I read somewhere that for realtime engines geometry should be created or converted to tris instead of quads, since that optimizes mesh rendering, so I checked the temple mesh and indeed it was all quads so I switched to face mode, selected all faces and hit "CTRL+T" to convert all quads to triangles, and then I retried all the baking process as exposed here.
However, in the step to unwrap the lightmap UVpack, blender hangs and freezes whereas with the model in quads the lightmap UVpack gets created very quickly, almost Instantly.

I know it's a blender issue (Not Irrb-Irrlicht related), but do you know why this might be happening? Is it indeed better to have our meshes as tris for rendering with Irrlicht?

regards,

Alvaro
Image
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

afecelis wrote:I know it's a blender issue (Not Irrb-Irrlicht related), but do you know why this might be happening? Is it indeed better to have our meshes as tris for rendering with Irrlicht?
Irrlicht only loads triangles at the moment, so I guess that irrb will do the triangulation if you don't. The problem with automatic triangulation (either by irrb, or if you use another format then by the loader) is that you won't have any control over how something is triangulated.

For example the bottom of a cylinder would usually be auto-triangulated something like this-

Image

but if you do it manually you can do this which looks better with lighting-
Image
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply