Gile[s] Lightmapper Ogre export plugin

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
User avatar
walaber
OGRE Expert User
OGRE Expert User
Posts: 829
Joined: Sat Oct 02, 2004 2:20 pm
Location: California, USA

Post by walaber »

okay, that didn't take as long as I'd imagined! here's release 3 of the exporter! this version adds:

:arrow: option to copy all textures from scene into destination directory
:arrow: option to automatically add alpha channels to "mask" textures, like those used in the sample scenes, and by Tree[d].

here is a screenshot showing several scenes, as rendered in ogre. all of these scenes were not altered in any way, I simply loaded the original scene in Gile[s], and renamed the materials so there were no conflicting names, and pressed export. then I loaded them in an Ogre viewer application, without making any changes to the materials or textures.

Image

download link is the same as above... still approx 1MB :D
Go Go Gadget OGRE!!
Image
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2

Post by Kencho »

Walaber, are you a girl? If so, I love you. If not, I think you've done a GREAT work and this will save me when I come into implementation of some ideas :)

Thanks ;)
Image
User avatar
IFASS
Gnome
Posts: 387
Joined: Tue Jan 04, 2005 12:07 pm
Location: Netherlands

Post by IFASS »

Hi walaber, great work you've done here :)

I was wondering, is it much work to also export a .scene file along with the .mesh and .material files?
Image
User avatar
walaber
OGRE Expert User
OGRE Expert User
Posts: 829
Joined: Sat Oct 02, 2004 2:20 pm
Location: California, USA

Post by walaber »

IFASS - would be cool, but would also require quite a bit of adjusting and changing the exporter. however Gile[s] would be an ideal program for exporting .scene files I think.
Go Go Gadget OGRE!!
Image
User avatar
psyclonist
OGRE Expert User
OGRE Expert User
Posts: 286
Joined: Fri Nov 01, 2002 3:54 pm
Location: Berlin & Nuremberg, Germany
x 1

Post by psyclonist »

walaber wrote:IFASS - would be cool, but would also require quite a bit of adjusting and changing the exporter. however Gile[s] would be an ideal program for exporting .scene files I think.
That'd be an interesting feature. I came to like the "baking" effect it has right now, but .scene export would definitely be interesting :)

For what it's worth, the workflow I'm aiming for is like this:
- model meshes in favorite modelling package
- edit scene in storm (add static entities, add dynamic objects, lights etc)
- export and create lightmaps with gile[s]
- update scene in storm (load materials + mesh, temporarily disable previously static entities but keep everything else active)

The "export to gile[s]" part is the one which still needs works. Do you have plans in this regard? Maybe I can contribute a .scene -> gile[s] code path?

-psy
User avatar
walaber
OGRE Expert User
OGRE Expert User
Posts: 829
Joined: Sat Oct 02, 2004 2:20 pm
Location: California, USA

Post by walaber »

what's storm? (sorry, I've don absolutely no research into the ".scene" world) :$
Go Go Gadget OGRE!!
Image
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

storm is the (I hope) up-and-coming world editor from the Yake folks. :wink:

Psyclonist haven't posted any screenies yet (hint!) :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
IFASS
Gnome
Posts: 387
Joined: Tue Jan 04, 2005 12:07 pm
Location: Netherlands

Post by IFASS »

well, i think it would be very nice if the .scene export is possible. If so, it would be great ofcourse.
Image
User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 4

Post by Falagard »

I already have a .scene exporter for giles.

Here's the source, modified from Walaber's:

Instead of exporting one big mesh, it breaks it up into individual meshes, and creates a .scene file for the scene. It doesn't honor the hierarchies currently, putting everthing under a root scene node instead, and everything is in world space.

This may be the version that was created for Ogre 0.15, or it may be the updated 1.0 version (I fixed the minor issues that was preventing it from compiling and running) but I haven't tried compiling to find out. Just noticed you were discussing it and thought it might be useful.

http://www.larabie.net/ogre/gilesexporter.rar
The "export to gile[s]" part is the one which still needs works. Do you have plans in this regard? Maybe I can contribute a .scene -> gile[s] code path?
Funny you should mention that, since that's my same workflow. This is obviously only the exporter from giles back to Ogre, not an importer from .scene into giles.

As you mentioned in the other thread relating to the MapEditor, we definitely should work together to create an importer for giles which knows how to import Ogre meshes directly, then an exporter for .scene (and the MapEditor format, .objects ;-) ). It's too bad that Giles doesn't have automation or any type of API because I'm going to need to automate the lightmapping process, which will mean crazy artificial WM messages sent to the Giles UI to set up and run the lightmapping process. Ah, well, I've done it before for something else, but it's painful.

Clay
User avatar
psyclonist
OGRE Expert User
OGRE Expert User
Posts: 286
Joined: Fri Nov 01, 2002 3:54 pm
Location: Berlin & Nuremberg, Germany
x 1

Post by psyclonist »

Falagard wrote:As you mentioned in the other thread relating to the MapEditor, we definitely should work together to create an importer for giles which knows how to import Ogre meshes directly, then an exporter for .scene (and the MapEditor format, .objects ;-) ).
Sounds good. I'd be very interested in the .objects format (name seems a little bit too generic but hey! who cares...). It could be beneficial to work in the same direction.

Btw, can you provide me/us with a glance at your editor's API?
Falagard wrote:It's too bad that Giles doesn't have automation or any type of API because I'm going to need to automate the lightmapping process, which will mean crazy artificial WM messages sent to the Giles UI to set up and run the lightmapping process. Ah, well, I've done it before for something else, but it's painful.
Alternatively, let's ask the author for a 'batch mode'. A combination of command line flags and a simple config file (ini style) could be enough.

-psy
User avatar
IFASS
Gnome
Posts: 387
Joined: Tue Jan 04, 2005 12:07 pm
Location: Netherlands

Post by IFASS »

I think it would be nice if a plugin could do the following:

Export:
- .material
- .mesh
- .scene

Import:
- .mesh (ogre format + materials ?)
- .scene (see psy's comment \/ )

(i don't even know if it's possible, importing a .scene file.)
From here, it could be expanded, but especially the exporting .scene thing would be very useful :)
Last edited by IFASS on Mon May 23, 2005 7:40 pm, edited 1 time in total.
Image
User avatar
psyclonist
OGRE Expert User
OGRE Expert User
Posts: 286
Joined: Fri Nov 01, 2002 3:54 pm
Location: Berlin & Nuremberg, Germany
x 1

Post by psyclonist »

.scene import should be trivial to add once .mesh import is working.

-psy
User avatar
IFASS
Gnome
Posts: 387
Joined: Tue Jan 04, 2005 12:07 pm
Location: Netherlands

Post by IFASS »

double post :/
Last edited by IFASS on Mon May 23, 2005 7:40 pm, edited 1 time in total.
Image
User avatar
DarkSeraph
Halfling
Posts: 85
Joined: Thu Apr 28, 2005 5:42 pm

Post by DarkSeraph »

walaber wrote: Image
All I can say is... WOW, especially at the middle one. That's very nice, very well done. Can't wait to see how this project turns out.
User avatar
IFASS
Gnome
Posts: 387
Joined: Tue Jan 04, 2005 12:07 pm
Location: Netherlands

Post by IFASS »

any updates walaber?
Image
User avatar
walaber
OGRE Expert User
OGRE Expert User
Posts: 829
Joined: Sat Oct 02, 2004 2:20 pm
Location: California, USA

Post by walaber »

well.... no. I'm pretty happy with the exporter myself. if someone wants to make a .scene exporter (I think at least 1 user has made one for personal use)., I'd be glad to help in any way. of course you could base it on the code for this plugin from CVS if you want as well...
Go Go Gadget OGRE!!
Image
horux
Gnoblar
Posts: 13
Joined: Fri Sep 17, 2004 12:38 pm

Post by horux »

I've installed the exporter on Gile[s] 1.3 but it doesn't work!

I've changed dll but, obviously, only works with 1.0 (included)... that's because I supose it's well installed!

Does I need 1.35a version????

I've compiled SCENE EXPORTER too, and happens the same (with 0.15 dll, of course)...

WHAT'S HAPPEN?!?!?!
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

It does indeed work with Gile[s] 1.3 - just copy the plugin itself and the plugin.dll. :wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
IFASS
Gnome
Posts: 387
Joined: Tue Jan 04, 2005 12:07 pm
Location: Netherlands

Post by IFASS »

horux wrote:I've installed the exporter on Gile[s] 1.3 but it doesn't work!

I've changed dll but, obviously, only works with 1.0 (included)... that's because I supose it's well installed!

Does I need 1.35a version????

I've compiled SCENE EXPORTER too, and happens the same (with 0.15 dll, of course)...

WHAT'S HAPPEN?!?!?!
where did you get that .scene exporter?
Image
horux
Gnoblar
Posts: 13
Joined: Fri Sep 17, 2004 12:38 pm

Post by horux »

That's what I did... copy the gile[s] plugin on my gile[s] program files :(

About .scene exporter... or .mesh... I don't know, because it doesn't work for me too :D

http://www.larabie.net/ogre/gilesexporter.rar


Try it!
User avatar
IFASS
Gnome
Posts: 387
Joined: Tue Jan 04, 2005 12:07 pm
Location: Netherlands

Post by IFASS »

horux wrote:That's what I did... copy the gile[s] plugin on my gile[s] program files :(

About .scene exporter... or .mesh... I don't know, because it doesn't work for me too :D

http://www.larabie.net/ogre/gilesexporter.rar


Try it!
Nah, the exporter itselves works ok, it even works with 1.0.0 (you need the pluginmanager.dll from the newest release though).

But i thought you got a seperate .scene exporter?
Image
User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 4

Post by Falagard »

That download above is not Walaber's original exporter, it's an updated version that exports .scene files. It exports separate .mesh files per object from giles, and spits out a .scene file with the mesh position/orientation in the .scene, instead of one big .mesh file like Walaber's original exporter.

As I stated in my original post, the code above may require some tweaks to compile against 1.0

Clay
User avatar
IFASS
Gnome
Posts: 387
Joined: Tue Jan 04, 2005 12:07 pm
Location: Netherlands

Post by IFASS »

did someone already compiled it?
Image
Hangman
Gnoblar
Posts: 17
Joined: Tue Jun 14, 2005 4:32 pm
Location: Salerno (Italy)

Post by Hangman »

Hi guys

I have a problem with walaber's gile[s] exporter ...
If I export a scene and try to load it on ogre, the program closes itself automatically! What can it be? Thanks in advance and sorry for my bad english!

Edit: I tried to load it in a ogre mesh viewer but it still doesn't work!
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

You should hand-edit the material file produced by the plugin, as there are some small errors in it.
For specifics you will have to browse through the previous pages of this thread.

Also: make sure that you did put the lightmap image, the material and the mesh into appropriate Ogre media folders. :wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.