irrb 0.4 (Blender Exporter)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
dejai
Posts: 522
Joined: Sat Apr 21, 2007 9:00 am

Post by dejai »

Thank you for providing such a quality exporter for the Irrlicht community. This has the potential to greatly assist media in many future Irrlicht developments.
Programming Blog: http://www.uberwolf.com
floppyfreak
Posts: 117
Joined: Sat Apr 19, 2008 10:14 am

Post by floppyfreak »

I use this great tool to make a little project that lets you fly through a scene in a flight simulator like the old descent games, that means you can fly in all directions and turn round all axes.
The only problem I have is the filepaths. I can't find a way to just copy the output of the exporter into another directory. What I always have to do is to rename filenames in the irr and the irrmesh files. Do I have a misunderstanding?
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

I don't think so... I've received similar complaints which likely means the documentation on this topic should prolly be re-worked.

Let's see if I can clear it up a bit:

As you are already aware, each irrb scene (.irr) file contains a reference to a mesh (.irrmesh) file for each mesh node. This tag looks something like this:

Code: Select all

<string name="Mesh" value="c:\test\meshes\cow.irrmesh" />
The "trick" is to have irrb automatically create the correct value for your needs.

You can control how irrb creates the value using the "Mesh Path" input variable located in the exporters interface.

There are currently three options available for setting Mesh Path:
  • File Name Only - $filename
    Full Path - $fullpath or blank
    Relative Path - (user entered value)
File Name Only.
If you enter "$filename" into Mesh Path, only the mesh file name will be written to the tag value:

Code: Select all

<string name="Mesh" value="cow.irrmesh" />
In order for the scene loader to find meshes that have used this option, each mesh must either exist in the directory the application runs from or it must be located in a folder that has been defined using IFileSystem.addFolderFileArchive(...) by your application. If you're using iwalktest, you can add Folder archives to "iwalktest.cfg" (see <filesystems>).

Full Path.
If you enter "$fullpath" into Mesh Path (or leave it blank), the full path will be written to the tag value:

Code: Select all

<string name="Mesh" value="c:\test\meshes\cow.irrmesh" />
This is convenient when you're using iwalktest for viewing scenes.

Relative Path.
If Mesh Path is NOT set to $filename, $fullpath, or blank, then irrb uses what you enter into Mesh Path as a prefix for the tag value. For example, if "data/meshes/" is entered into Mesh Path, the following tag value would be generated:

Code: Select all

<string name="Mesh" value="data/meshes/cow.irrmesh" />
The scene loader will then expect "data/meshes/cow.irrmesh" to exist off of your application directory or a directory that has been defined by your application via IFileSystem.addFolderFileArchive(...).

Note that this same logic is also used for generating texture path values located in .irrmesh files.

It may also be helpful to show how I've been using the exporter:

I have a "base" folder setup that contains all of my scenes: "c:\irrbScenes\".

When I start a new scene, i create a folder underneath the base:
"c:\irrbScenes\irrbCinema\".

And then another directory underneath that to store meshes in:
"c:\irrbScenes\irrbCinema\meshes\"

In the exporter's interface I set "Mesh Directory" to:
"c:\irrbScenes\irrbCinema\meshes\"
This tells irrb where to store all of the generated .irrbmesh files.

When I'm initially viewing/testing my Blender work in iwalktest, I leave Mesh Path set to blank. That way the full mesh path is written to the tag value and the scene loader always finds the mesh files.

If I ever get to the point where I need to distribute the scene and mesh files with an actual application... :roll:, I would set Mesh Directory to a relative path that makes sense to my application and then set it up so the install copies the scene and mesh files to the appropriate locations relative to the application.

Let me know if you still have questions. I'd also be interested in suggestions that would help make this topic less confusing.
floppyfreak
Posts: 117
Joined: Sat Apr 19, 2008 10:14 am

Post by floppyfreak »

works good now. The keyhint is to give the example with the "$filename" to be put into the mesh path and texture path fields. Perhaps it'd help those like me, who do not read manuals carefully enough, to give a checkbox like "Don't include pathname into .irr file" and "don't include pathname into irrmesh file".
Another thing not concerning your work is, that I just found out, my prog stil doesn't work with it, because the level loader of irrlicht (when I say eg irrSceneMgr->loadScene(puf); ) doesn't search the .irrmesh files in the directory the .irr is located. Most likely I will have to write flexible settings of the working path of irrlicht. Well, a few more lines...
My project is in on
http://www.odf-forum.de/forum/viewtopic ... 41bd7d4b72
Its an early alpha, when it is more, I'l let you know.
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

Yes, checkboxes crossed my mind when i was writing up the previous post.

It doesn't seem unreasonable to me to patch the scene loader to look for .irrmesh files in the same directory as the .irr file, or even relative to it.

Maybe one of the devs could weigh in and say why this may or may not be a good idea.
floppyfreak
Posts: 117
Joined: Sat Apr 19, 2008 10:14 am

Post by floppyfreak »

In my experience irrb always uses just one set of uv data in the output even if I have defined more in blender. If I understand the concept of irr::video::E_VERTEX_TYPE EVT_2TCOORDS correctly, there is the option in irrlicht to use a second set. How can I do that with irrb? If not, will it be in future versions? any alternative?
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

Awesome work :) Thanks

I have two suggestions though!

1) an option to combine all meshes into one mesh on exporting
2) export directory(ies) set to the current (.blend's) directory by default

(at the moment I still use the .b3d exporter because it has these features...)

Edit: actually it seems 2) can be done just by putting a . in the path :)
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

floppyfreak wrote:How can I do that with irrb?
irrb should be generating the second set of UV coords. Please have a look at this tutorial: Light Mapping - it explains how to use two sets of UV coordinates. Let me know if you still have questions or problems.
xDan wrote:1) an option to combine all meshes into one mesh on exporting
I'll have look at adding this capability.
jotatsu
Posts: 28
Joined: Sun Mar 18, 2007 1:11 am
Location: Colombia
Contact:

Post by jotatsu »

great project keep going ^_^, im testing imma give some feedback later
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

It feels so good to see this project grown.

This is a great addition to the Irrlicht Community - Great Work!
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

wow, this is a nice tool. i'll give it a try and let you know about it later.

hoping i can contribute to the project in some other way.

good luck.
Image
floppyfreak
Posts: 117
Joined: Sat Apr 19, 2008 10:14 am

Post by floppyfreak »

pc0de wrote:
floppyfreak wrote:How can I do that with irrb?
irrb should be generating the second set of UV coords. Please have a look at this tutorial: Light Mapping - it explains how to use two sets of UV coordinates. Let me know if you still have questions or problems.
Works as it should :)
and I really, really love the results :!:
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

This is amazing!
Triple kudos pc0de.

reading and testing right away.

regards,

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

Post by pc0de »

Thanks for the encouragement fellas - it's nice to see someone else using it.

Yes, please let me know if you find any problems as I'm preparing for a bug fix release (0.3) within the next 2-3 weeks.

After that I will be focusing on adding animation info to .irrmesh, which leads me to several questions... But, I think I'll start another thread for that when the time comes.
spock
Posts: 16
Joined: Tue Aug 01, 2006 4:53 am

Post by spock »

can the exporter be called by another script instead of using the gui? if not, this could be a useful feature i think.
Post Reply