irrb 0.4 (Blender Exporter)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Ok, creating a separate new texture helped a lot as many of the missing shadow from the towers are showing up (I also added a couple of colored lights to test):
Image
However I still get a squared/patchy lightmap :(
How did you get your so smooth and constant Pc0de?
May I ask which "pack quality" setting you're using when you unwrap your lightmap? And finally, what other lighting values did you use to get a better lit level? Did you increase light power? Mine looks dark, is there a way to improve this? (did you use AO?)

regards,

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

Post by pc0de »

Hey Alvaro, it looks like the diffuse texture is being baked along with the shadows which is why you need the single material (or no material?) for light mapping. Try selecting the mesh in object mode and assign a New material. Can't test on the computer I'm writing this on...

Other than the light mods I already mentioned, I used your original UV Unwrap and settings(no AO). Are you baking to an image that is 2048x2048?

I'd like to send you the modified .blend file, but I won't have access to it until Mrs. pc0de and I get back from exploring on 2/16...
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Thanks for replying Pc0de :D
Won't creating a new material the way you mention (selecting the mesh) create a second multimaterial (with the same materials as the original mesh) and not a blank material?

What I tried was, creating a cube and assigning a new material to it (simple white diffuse) and then select the mesh and assign this new material to it, but then it replaces the active material slot of the multi material with the white one, leading to rendering errors, so before adding the white material, I go to F9 mode, add a new material to the multi one (which clones the last material in the list) so that when I assign the white material it replaces this last one created instead and not one of the important materials ;)
But this lead me to the results I'm showing, and indeed I used a 2048x2048 LM. :(

But don't worry, enjoy you holiday, have fun and sun! :D I can wait and run some other tests meanwhile, and become " a pain in the neck" when you return :D

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

Post by pc0de »

k, back in the land of cold weather and better than average unscrupulous politics... :roll:

Alvaro, let's back up a bit - When you do a full bake, you're going to get both the procedural materials (if assigned) and the lightmap baked together. In your .blend file, you have UV textures that have been mapped/assigned by the UV Editor in the 1st UV layer, and also the same textures assigned via procedural materials using indexes. So when you bake to the second UV layer, you're effectively "doubling" your diffuse layer along with the lightmap (diffuse textures end up in both Irrlicht material layers). As I see it there are two options:

(1) Using an Irrlicht "solid" material (single material layer) - In this case you wouldn't do any mapping in the UV editor. Instead:
  • 1. Set up procedural materials/indexes and assign to the appropriate faces.
    2. Create a single UV layer.
    3. UV Unwrap - lightmap.
    4. Full bake.
(2) Using an Irrlicht "lightmap" / "lightmap_mX" material (two material layers):
  • 1. All of the diffuse textures are assigned in the UV Editor to the 1st UV layer.
    2. The mesh has a single, light gray/white procedural material assigned (lightmap baking also works without any procedural materials assigned).
    3. UV Unwarp to 2nd UV layer - lightmap.
    4. Full bake.
I should also mention that there is a "Shadow" only option in the "Bake" panel (F10). Using this option doesn't take into account ambient light settings.

Let me know if that helps and I'll update the tutorials with the additional info.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

hehehe, great! Nice to have you back! :D

And what happened with option #3? Simply adding an empty material to the mesh and doing the baking process normally? Is it discarded or is it included among the 2 options you're suggesting? Remember I'm not that much of a technical guy but a "let's'-try-this-and-screw-things-up-a-bit" dude, lol ;)

Anyway, having you back is more than enough to run some additional tests and report any issues to you. Let me digest your info a bit more while my single-core brain processes it. ;)

regards, and welcome back!

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

Post by pc0de »

Thanks.
afecelis wrote:And what happened with option #3?
It's there in 2.2 - I've been using a single material so I can adjust the "darkness" of the generated lightmap. I believe if you set the diffuse (Col) to all white (255,255,255), it's the same as not assigning any procedural materials.
afecelis wrote:... not that much of a technical guy but a "let's'-try-this-and-screw-things-up-a-bit" dude, lol ;)
We're cut from the same cloth :)

Keep me posted.
gandolfix
Posts: 6
Joined: Wed Feb 25, 2009 8:08 pm

multi textures

Post by gandolfix »

Hello!!

Im using irrb to export from Blender to irrlicht. It is a very nice tool.
But I have a question about textures. If someone can help me, thanks in advance.

Look at the picture:
Image

Im intersted in doing a terrain mesh and use multi texture, but the texture need change gradually (I dont know if its the best way to say that).

In Blender have a way to do this, with multi texture materials and stencil, but I cant export it. I can export only UV textures. Have a way to use stencil with UV texture, or if someone have another idea to do this with blender.

Thanks in advance
Att. André Gandolfi
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

hey gandolfix, you need to bake the Blender materials to one or more UV textures (texture only bake).

Quillraven has a setup similar to what you're looking for (multi-texture Blender Material with stencil). Check pages 4&5 of this thread - there's also a download link to his .blend file on page 4.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Pc0de, 2 quick questions:
1. When you assign the new material to the "joined-multimaterial" mesh, do you first create a temporary mesh, like a cube, to assign it the auxiliary empty material to it, and then select the mesh with the multi-UV mapped materials and assign it? Or do you simply select the multimaterial mesh and select the "add new" option from the material dropdown list? (in which case, it clones the actual material in the list).

2. If you're assigning a white material, created on a temporary mesh, to the multi-material mesh, do you get the active material replaced by white as on my next screenshot?
Image

With this material replacement, I seem to be getting better results, the 2 layers seem not be merging into a single one but I still get a patchy grass, and the material replaced by white seems to be left out of the lightmap calculation :( (yet it's reading the diffuse map UV info).
Image

Man! I gotta find a way to achieve your results! they look great! ;)

On to more testing.

regards,

Alvaro
kryton9
Posts: 20
Joined: Sun Feb 22, 2009 7:26 pm

Help with IRRB and getting IWalkTest to run

Post by kryton9 »

First, thanks for such a great tool. I have been working a few days trying to figure out what I am doing wrong. I tried every type of Environment settings that I could think of, also directory structures.

From the tutorials and documentation... when you see the IWalkTest run button, it means the environment variables are setup ok.

In the screenshot you will see all my relevant information for trouble shooting.

I can't get IWALKTEST to run even though all the files are created in the appropriate directoties when I check them out.

Any help will really be appreciated. This is an incredible tool and I would love to get it working!
ImagePlease click the thumbnail, you can then zoom(magnifyer icon) into full size once you are at webshots. Thanks.
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Post by pc0de »

@afecelis. Here's what I did:
  • 1. In the "Link and Materials" (F9) panel, I added a new index/material. This copies the active material (and attributes) - "floor" -> "floor.001".
    2. In edit mode, select all of the vertices/faces.
    3. Assign "floor.001" in the "Link and Materials" panel to all of the faces.
    4. In the material editor (F5), I renamed "floor.001" -> "lmwhite".
    5. I disabled the texture "tex.006" on the "lmwhite" material.
At this point all of the faces have the "lmwhite" material assigned to them. Using your existing lightmap UV unwrap, I assigned a new image (2048x2048) and then did a full bake.

Here's a link to my updated version of irrb_temple2.zip. I packed the generated lightmap in the .blend file itself so you'll need to save it out if you want to test with it. Let me know if you still have questions.

@kryton9. Thanks for the good info in the picture. Your environment variables look fine but your "c:\irrbutils\" directory is missing the "data\" sub-directory. iwalktest looks for its config, font, and texture info underneath the data directory.

When you unzip the win32 irrbUtils, be sure to include all of the sub-directories. Let me know if you still have problems after adding the data directory.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Very nice, thanks a lot for the info and the modified file. It clarifies many things up, there's only 1 part I don't understand:
5. I disabled the texture "tex.006" on the "lmwhite" material.
What do you mean by the "tex.006" texture, and why did you disable it?
EDITED: I found the tex.006 that you talk about in the texture buttons. Did you just delete to the datablock or is there another option to disable it?
EDITED2: NM, I found the bullet button to enable/disable the texture in F5 ;)

Best thing to do was check with your file side-by side :D

testing now to see the difference, excellent and detailed tutorial, thank you!
regards,
Alvaro
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

This is awesome! beautiful! I got no words to express my excitement! ... Pc0de I love you! :D (in the good sense of the expression of course ,lol).
Image

This is a huge step in making blender the only 3d creation environment you'll ever require! :D
Now only animation is missing. But maybe gandaldf's b3d exporter supports animation? I'm checking it out!
You deserve a million thanks Pc0de!
http://www.yonkis.com/mediaflash/unmillon.htm

I'll study all this a bit more, and If I get some spare time I'll try to capture a couple of VTs that might come in handy for your documentation ;)

warmest regards,

Alvaro
kryton9
Posts: 20
Joined: Sun Feb 22, 2009 7:26 pm

THANKS!

Post by kryton9 »

pc0de, thank you so very much! I am so glad I asked for help. I knew I was doing something stupid.

This is such a very important tool, it adds a whole new dimension to irrlicht and really gives it a powerful edge compared to so many other engines if you ask me.

Can't wait to put it to good use this weekend, thanks so much.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Pc0de, one quick question. If I try to load the generated .irr files in Irredit nothing gets loaded. I got everything (textures, lightmaps, meshes, etc) stuffed into a single folder, but yet nothing shows up in Irredit.

Is there a special way of exporting form blender to make the .irr Irredit-compatible?

regards,
Alvaro
Post Reply