irrb 0.4 (Blender Exporter)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

Postby pc0de » Wed Feb 11, 2009 10:01 pm

afecelis wrote:Reading the lightmapping tutorial...
Good catches. I'll be fixing and updating the tutorials over the next couple of days.

afecelis wrote: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?
"Pointless" may have been a little strong... At the time I wrote that I felt irrEdit did a much better job visually. I need to re-review/test the latest version of irrEdit. As a side note - I did find a way to improve the quality of the shadows that are baked by Blender. For each light that casts shadows, increase the "Samples" located in the light properties "Shadow and Spot" tab.

afecelis wrote:Another possibility would be to write an exporter for Giles...
Yes, that thought had crossed my mind. To be honest though, don't hold your breath because for me personally that would find its way near the bottom of my todo list ;)

afecelis wrote:I now keep on going with more tests.
Thanks, I appreciate you taking the time.
Last edited by pc0de on Thu Feb 12, 2009 6:37 am, edited 1 time in total.
pc0de
 
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Postby afecelis » Wed Feb 11, 2009 10:39 pm

Very cool! Thanks for checking my post. :)

Another thing to simplify stuff, when you do the "Lightmap Pack" step, select "New Image" from the options and set the lightmap size directly there, this way you don't need to create a new image in the UV/Image editor but instead it gets created automatically in this step , so all you gotta do is save the image after the texture baking process. ;)
I'm going thru the tut again cause there are still a couple of things that I think could be improved for better user understanding ;) I'll let you know of any other stuff I find.

I tried pumping the samples of the light up to 10 but I still get very "squared and with jaggies" lightmaps, even blurring them in Gimp doesn't help much. What sample values are you using for your lights?

best regards,
Alvaro

EDITED: and one last thing, after exporting and viewing the mesh in iwalktest, it seems to only be picking up the diffuse texture info but not the lightmap, even though I've renamed the new UV texture layer to "Lightmap", any ideas? (check screenie, plz): ;)
Image
afecelis
Admin
 
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia

Postby pc0de » Thu Feb 12, 2009 7:17 am

Good tip on generating the image during the Lightmap UVPack step. Do you know how many times I've looked at that option without ever seeing it? :oops:

Here are the results I receive when I bake a lightmap using a sample of 1: (click for a larger view)
Image

and 16 samples:
Image
Did you remember to re-save the lightmap image after re-baking at the higher sample level?

Regarding the problem with your lightmap not appearing - Change the UV layer name from "Lightmap" to "lightmap". The irrb material type look up is case-sensitive - lightmap, lightmap_m2, lightmap_m4, etc. I should prolly make it case-insensitive.
pc0de
 
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Postby deadReaper » Thu Feb 12, 2009 6:42 pm

Really big thanks from me and the whole BlendOut team, this will bring a nice speed up for us.

Ill try it right now. :D

//Edit: Ok now I have some problems with your new "CIrrbMeshFileLoader.h"
and "CIrrBMeshFileLoader.cpp"

The first problem I already have had with the older version is that I had to remove the include of "os.h" from "CIrrBMeshFileLoader.cpp" Line 8.
"os.h" is part of the irrlicht 1.5 source but not contained in the include directory.

Next problem is within line 35 from "CIrrBMeshFileLoader.h":
Code: Select all
   virtual bool isALoadableFileExtension(const core::string<c16>& filename) const;

c16 seems not been defined. Due to the fact I couldn't find core::string<c16> in irrlicht's API, I changed it to c8 as it was in the older version.

This is the same for line 39.

Next Problem in line 41:

Code: Select all
return core::hasFileExtension ( filename, "irrbmesh");

Here I get the error that core has no element called hasFileExtension, again i have nothing found in the API.

Im Using Ubuntu 8.10, Codeblocks and Irrlicht 1.5.
deadReaper
 
Posts: 7
Joined: Fri Jan 23, 2009 2:47 pm

Postby pc0de » Fri Feb 13, 2009 7:39 am

Hello deadReaper, I'll be looking forward to seeing what you and the BlendOut folks come up with.

Regarding your issues with the experimental ;), binary mesh reader - I compiled the reader/writer against Irrlicht revision 2200 of the trunk. This revision contains the file system updates which is the source of the problems you see when compiling against 1.5.

I think you have two options:
    1. Build your app against Irrlicht's trunk.

    2. Pull an earlier revision of CIrrBMeshFileLoader.cpp and CIrrbMeshWriter.cpp - r1068. If you do that, you'll also need to build "imeshcvt" because the current imeshcvt is saving the latest SMaterial structure which has also been updated since 1.5.
If you opt for the 2nd, I can send you detailed instructions on what needs to be done.
pc0de
 
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Postby deadReaper » Fri Feb 13, 2009 10:03 am

Hi pc0de, at the moment we are just prototyping for two reasons. First is to find out what Software to use and how to use it.
The second is to have something as a demo to show around ;)

As we are also experimenting I'll give option one a try :)

So if youre really interested in what we do, you can have a look at our sourceforge project.
deadReaper
 
Posts: 7
Joined: Fri Jan 23, 2009 2:47 pm

Postby pc0de » Fri Feb 13, 2009 4:22 pm

Sounds good.

I like what I see so far with ImpulseTest, especially the semi-transparent sections of the track. I'll check it periodically for updates.
pc0de
 
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Postby deadReaper » Fri Feb 13, 2009 7:28 pm

OK now I've got my application running with irrlicht revision 2200.

But Relative path for the .irrbmesh format seems still not working.

I've re-exported my mesh whit irrb0.3.
If I now use the .irrmesh file my texture works fine, but the .irrbmesh is completely white :(

After editing the .irrmesh file to set the path absolute and converting to .irrbmesh by using imeshcvt again it works.

any ideas?
deadReaper
 
Posts: 7
Joined: Fri Jan 23, 2009 2:47 pm

Postby pc0de » Fri Feb 13, 2009 9:02 pm

Please email me your "irrb.log" file - it's located in the same directory the scene file is written to.

irrb.py contains my gmail address.
pc0de
 
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Postby pc0de » Sat Feb 14, 2009 5:29 am

@afecelis
I think I got it - 1st the results: (I hope you don't mind me showing off your work :))
Image
Image
Steps to reproduce:
    1. You were right to have combined all of the meshes into one single mesh for lightmapping. But you need to assign the combined mesh a single Blender material before baking. I used a simple light gray material.
    2. For the "Sun" light, I adjusted the "Shadow and Spot" settings to: "Constant QMC", "Soft Size"=0.9, "Samples"=16.
    3. I created a new lightmap image at 2048x2048.
    4. Full bake.
It took a very long time to bake, but I think the results ended up looking pretty good. Also, I tested saving and resizing the lightmap down to 1024x1024 in GIMP and that looked good as well.
pc0de
 
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Postby pc0de » Sat Feb 14, 2009 5:57 am

@deadReaper
Thanks for the log. It looks like the "gryphon.jpg" has been packed, but it also appears that it was originally opened from the directory it's being saved to. I don't think that should matter but verify that "media/glider/texture/gryphon.jpg" isn't corrupt.

Secondly, I thought I was saving the "iwalktest" & "imeshcvt" environment variables to the log file, I'm not... Please check that "iwalktest" is set to:
Code: Select all
{installed dir}/iwalktest -i "$1" -a "$2"

If it's neither of those, any chance you could send me the .blend file? Thanks.
pc0de
 
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Postby deadReaper » Sat Feb 14, 2009 10:26 am

Ohh sorry it was my fault. I was misusing imescvt. I had forgotten the -a command.
I use imescvt manually because I edit the irrmesh to enable lighting. For some reason the Blender texture face mode isn't working anymore, i guess it should be activated using ID Properties but my blender version has no Property editor.

//Edit: vor now i have activated it in your UserConfig :)
deadReaper
 
Posts: 7
Joined: Fri Jan 23, 2009 2:47 pm

Postby pc0de » Sat Feb 14, 2009 9:55 pm

No problem, glad to hear it. It's also nice to see you found your way down into UserConfig :). Let me know if you need anything else.
pc0de
 
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

Postby afecelis » Sun Feb 15, 2009 2:03 am

woooooooow!!!!! That's looking sweet! :) NP having you show so nice images with such nice lightmaps! ;)

I'll try to to follow your steps, but should I get into any trouble please allow me to bug you some more, heheheeh ;) (which I surely will).
Would it also be possible if you sent me your modded blend file to check how you did things out?

As a side note, I started testing irrb on Linux and so far it's working fine, no problems running a file in Iwalktest, but I'm having problems when trying to load the .irr file in one of my programs to load irr files; it reports it's having problems with paths to find materials and stuff. When trying to load files generated from blender-irrb, which file should I load? the .irr or the irrmesh file?
Can everything be exported directly where I got my .blend file and textures or should we still use the "meshes" and "textures2 folders to export things separately?
Thanks for everything Pc0de, got lots of things to try! ;)

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

Postby afecelis » Sun Feb 15, 2009 2:07 am

Already running into problrms ;)
When you say:
you need to assign the combined mesh a single Blender material before baking. I used a simple light gray material.

How do you do that? I already got a multimaterial with 7 materials in a single mesh. how did you do your new material?

EDITED:mmm, by reading the words I just said above I think I got it. ;) let me try an idea out and I'll be back. ;)
afecelis
Admin
 
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia

PreviousNext

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 1 guest