Murphy's Irrlicht Mesh file format

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

Post by afecelis »

lol!!!! Vermeer: even in a hurry and panting you can't help it huh?
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

well, uploaded finally the samples...mainly obj , but also some x...as the route, I agree should be OBJ....

i sent you a PM by the forum, check your PMs, as I have passed an url that i prefer not to be spidered by bots and all sorts of things....there I have put you the link :)


The most easy and powerful for free, clearly is Lithunwrap.... (available at Bal's link at tools sticky)

But all the other do well the task, too. (with obj, the stuff is clear...keep all in same folder, allways :))

And they are a bunch(working fully, to all needed features):

Milkshape, 3d Exploration 1.5 , Lithunwrap, Blender (with JMS script for 2.36, works also in 2.35) , Ultimate Unwrap(I know, this is not free, but as ms3d, many ppl have it) ...

Anim8or, crossroads, and Gmax, did also output the obj, but not the mtl, so are not included.


For x format: Lithunwrap, 3dexploration, and metasequoia, but i see no point in digging on this, as seems clearly OBJ is a better option...
Finally making games again!
http://www.konekogames.com
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

The thing I worry about with OBJ is gile[s] support. What does gile[s] output? A single X, right?

It seems like gile[s] support is one of the really important ones.

Got the files. Thanks. :)


I've just written an OBJ loader for the other project I'm working on, but I'll be able to reuse it later for the MIM converter...
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

Ok, great...

Hmm...yep, Giles is the way I see it the best lightmapper at that price.

Indeed, is what i use for now. :) later on maybe I'll use the photons , gi rendering of XSI(with an obj+obj loading, it really doesn't matter the tool used fo me)

The problem you mention is not a problem. there are zillions of way to convert a single x + texture in channel1 to an OBJ+ texture in channel1.

Indeed, some examples of workflows: Lithunwrap(the best for free), Ultimate Unwrap, 3d Exploration1.5, etc...

here would work even the ones not making the material stuff, like Crossroads3D free converter... you convert the x file to OBJ .You could then for example open the OBJ with no texture (uvs are allways preserved even in those packages) in any package, asign a texture, and save as OBJ again. really a matter of seconds. that in the case of those not wanting to use Lith Unwrap, ie: use crossroads to convert x-->obj, use then blender or whatever, to save the obj with a texture attached. But by all means I recommend Lithunwrap. Milkshape, 3d Exploration, max, etc, are great too.Easy and lightining fast for this, "two mouse clicks".. Linux users have several ways to convert x to OBJ with material, if I am not wrong, one is K3d. That supposing they don't want to use Wine to load any of these tools.

Anyway, if u make X suppor(x+x)t, well, you're widening the posibilities...

But...probably better if is dx 8.1 version, as the 8.1, allows, it seems, to load in engines files greater than 65,000 tris, once 32 bit buffer or soemthing, is added in the engine. Something I think is in the proccess in Irrlicht.

Actually, the ideal format to support Gile[s], could be B3D.

B3D is already supported also in Max. And very few more. But having the obj+obj, the universal matter would be already covered.

B3D does ACTUALLY save both UV channels. Indeed, perhaps, probably, Gile[s] may be using the multitexturing feature of the format: it has not the only 2 uv channels limit that u have in dx 8.0 x files.

Indeed, B3D would avoid other problem I find with Gile[s]

is probably my lack of knowlegde of Gile[s] (gotta do a search in forums as in manual (I have used it without looking the manual, that's no good...))

But the fact is... i find that Giles makes an automatic mapping in the second uv channel, for lightmap. Does not take the coords I made for it. true, this is a huge advantage for the average user, as we see very few tools make uvs in the second channel, and none for free.

So, giles i think what does with B3d files, is...it exports the UV it had already in b3d channel 1, and the generated for lightmap internally, in channel 2.

That's a personal issue for me, as I'd like to be able to make a second uv channel as I want it in Ultimate Unwrap, and force Giles use it actually. But this is totally unrelated to the conversion matters, sorry.

So, I see that if you want to give support to Gile[s] (something that I really like :) ) you have 3 options :

I'm seeing it now...HEY. Wait...OBJ export...I am a registered customer...perhaps is the latest update made....but the fact is...I DO have OBJ export....:)

Humm...I tell u how's the ouput. I think it fits perfectly our needs...lol, is doing exactly what we need...

here's not showing the textures, as is the only export of the ones I am testing for now on giles, that does not ask u "collect textures" , so, simply I was dumb enough to not export to the usual folder where i have th etextures...

But the mtl file is generated, with the texture name correctly put.


hmm...can be othe rproblem..guessing now, as seems I know what happens and is not a problem, I'll tell later.

It does happens only in the Brad's tools: Lithunwrap, and his much improved and comercial Ultimate Unwrap...Cause it opens PERFECTLY in 3d Exploration 1.5 converter.With texture attached and all.

Oh, and the scene.obj, has exactly the uv coords that the user made initially outside giles.It is just the author is not considering -perhaps- the possibility that some users can generate both channels, so he's making it work for the masses. Hmm...or maybe I just don't know yet how to force Giles to use my own 2nd channel.
It's the same, the giles generated ones tend to be great for the purpose and same me work, so what the hell...It also makes it more compapitible with available systems.

But, one thing is clear:

-It generates 2 OBJ files. The whatever_scene_name.obj + Lightmap.obj. Doing exactly what we need in one shot. It output the texture names of the materials applied, i sjust that lithunwrap and Ultimate unwrap are surely finding some silly syntax problem in the ascii mtl file. Or in the OBJ file, I'll guess what.

HAHA (big, crazy laugh..)
FOUND IT!!!!!!!!!!!!!!!!!!!! I catched it...the mtl files were same syntax..was getting crazy (it catched me during some minutes, lol) ...is the...NAME....Default Lightmap. hehe...it was also getting me crazy it did not change the name...when I changed the name...u gotta go to lightmap setting window and "save lightmap"... put a name with no blank spaces... ...lol....LM.tga worked freakingly well... :)

Hmm..ok. I will upload now the file, the giles 2 OBJs plus textures, to one of those temporary sites, and paste the link here for u to dig it if u want.


Conclussion: YEP. You have 100x100 support of giles, already, if u continue with the OBJ + OBJ support. fred has think in every thing :)

If u want to make it match this tool very well, is why i am going to uopload the obj samples. :)


Ok, and B3d export is the solution for power users....But those actually if wanna convert to Irrlicht...must actually HAVE Ultimate Unwrap...and no way, even...i tell u...too often UU tends to load B3d files with unwelded vertices...thing that never happens with OBJ.

The b3d file comes with the 2 uv channels, imports into Ultimate Unwrap as composite material (the one for lightmaps) , each texture in its channels, channels ok, all perfect. ready to go, but as I say, too often b3d import into UU, is doing some ugly things in unwelding vertices. Tru, u can weld it but..in OBJ there's no need.

And saves u coding time if u do the OBJ+obj only ;)

Is really curious that Giles is having the same idea I proposed...i can tell u I didn't even suspect there was a trace even of OBJ export... Gues I update when recieved the mai, without knowing what was added...or just I have spent only 3 days with, lol...the more I see it, the more I like it...


the x export generates two x files, but no showing in UU, and now is not the name...no clue no, and don't care, go for the OBJ+OBJ :)
Last edited by vermeer on Sat Jan 22, 2005 11:27 am, edited 1 time in total.
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

http://uploads.savefile.com/redir/94947.zip

(the other file was to big to use this temporary files server...For this one, you know: click on that link above with left mouse button, and in the page that appears, seek for a link that says "Download/show the hosted file" and left click again...Right click and "save as".Any problem mention me, and I'll send them th other way to u, via PM message )

There....the OBJ+OBJ samples exported from Gile[s]

They work perfect. Only thing to know for the user, the artist, is previous to export in Gile[s] , "save lightmap" in "lighting methods" window, as another name that does not include empty " " , like Default Lightmap.tga , as it will produce problems in loading the texture in Ultimate Unwrap.

I have finally included also the X files (there were no errors in them: just that...the tga lightmap I generated, is too dark..in giles is seen ok, but remember this way of export is not composite multiply or 2X blending mode, is standard traditional texture in chanel1...so, the tga is seen too dark. If u have too dark monitor like me, can end up thinking is black for wrong normals or something...Feel free then, as is for tests only, to modify the tga lightmap, for example changing image brightness or gamma in Adob photoshop, Irfanview, Gimp or what u may use.)

Thanks a lot for all the great effort. I think the OBJ+OBJ ---> 2 uv channelled (probably mor echannels in the future of irrlicht with MIM) MIM, is the way to go, the final solution for this long being problem in Irrlicht :)

once we have it working in irrlicht, I may do some tuts for the free tools, and some for the comercial ones I have (IE, as u may have seen, the XSI 4 obj export is ...perfect ;) )

For example, I'll surely put a link in sticky to a thread I may create explaining things for the persons having Ultimate Unwrap: it's really quick an easy to get a multiUv *.u3d file from OBJ+OBJ, just a matter of knowing the program export of *.BUV files, allows the sharing of any UV info of any uv file, with any uv channel set.(u can imput two standard files, and output a lightmapped to channel object, really easily) Simply perfect. :)

Even more: In max, it's really simple to do so. Sure you can do this with maya and LW , too. Heck, is just an OBJ with uvs export XD and of course, to know you have to save a bitmap file for the lightmap, hehe :)

i'd really like to know how it's going...I very happy you decided togo for the OBJ+OBj route...I think is the most universal solution, and makes it available for any user and platform.

I'll study the possibility of explaining workflows with the available free lightmappers to generate the TGA (ie , the high quality one: FSRAD. :) )
One starts to think in ways to go, and ends up with easy workflows for everybody. :)
Finally making games again!
http://www.konekogames.com
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

Ah, good news about gile[s] outputting OBJ+OBJ.

"Hmm..ok. I will upload now the file, the giles 2 OBJs plus textures, to one of those temporary sites, and paste the link here for u to dig it if u want."

Yeah, that'd be excellent. I suspect it's more of the same, but it'd be nice to make certain it'll work with OBJ2MIM.


As for B3D... that might be something I'll look into later. At the moment, I'm not overwhelmingly compelled to support it. However, if/when MIM gets support for animation, B3D support will become much more interesting (as will X, for that matter).


I added MTL (material file) support to the OBJ loader I wrote for my other project, so I think writing OBJ2MIM should just be a matter of writing the logic and some gruntwork when I get to it.
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

Ah, you posted while I was posting.

Thanks for the files.

As for the lightmap looking too dark... Irrlicht has a couple different materials for lightmaps, which are used for brightening, as you may know (EMT_LIGHTMAP_M2, EMT_LIGHTMAP_M4). The current MIM tools only output EMT_LIGHTMAP, but changing that is as simple as doing a find/replace in the MIM files. And if it's necessary, I'll make it selectable in the MIM converters.

My MIM converters actually aren't that good (in terms of flexibility, anyway). I'm just getting the ball rolling. I may extend or rewrite them in the future if there's need. Or maybe someone else will rewrite them -- as I mentioned, I think they're often going to be somewhat easier to write and work with than Irrlicht loaders.
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

"Ah, good news about gile[s] outputting OBJ+OBJ."

:)

"As for B3D... that might be something I'll look into later. At the moment, I'm not overwhelmingly compelled to support it. However, if/when MIM gets support for animation, B3D support will become much more interesting (as will X, for that matter)."

I don't like one thing in Gile[s] exports...most files put "made by" comment..i don't like my full name spreading everywhere, nor the key he has to relate users in his database...I know is a good measure for him, but i don't like that...So I'll sticl with ascii exports of Giles(obj+mtl, and asci x, or ase) As in those I can strip that info. B3d is binary file, instead...At the end, best things are not the best...B3d file is more powerful, but barely supported, even non supported by free tools. So obj wins absolutely.

"I added MTL (material file) support to the OBJ loader I wrote for my other project, so I think writing OBJ2MIM should just be a matter of writing the logic and some gruntwork when I get to it."

Absolutely great! :)

"Thanks for the files."

Thanks for your effort for the Irrlicht comunity :)

"As for the lightmap looking too dark... Irrlicht has a couple different materials for lightmaps, which are used for brightening, as you may know (EMT_LIGHTMAP_M2, EMT_LIGHTMAP_M4). The current MIM tools only output EMT_LIGHTMAP, but changing that is as simple as doing a find/replace in the MIM files. And if it's necessary, I'll make it selectable in the MIM converters."

In Ultimate Unwrap, I see I have several modes of lightmapping...seems it's Multiply 1x, multiply 2x and multiply 4x...I suppose is really related with that what u mention, and the graphical difference is..same lightmaps makes it all brighter or darker depending on the multiply mode used. The lightmap modes what make is overlay over the texture, do like a soft merge, like when you work with layers in photoshop...(em...yep, in multiply layer mode..maybe is not a coincidence, though I expect it not to be exactly the same)

In Ultimate Unwrap the composite material, blending slot, is not multiply the only option... there's also "add" and "replace" , which sounds me more a matter for multitexturing, maybe...than lightmaps.Perhaps ADD is for adding extra light, really, dunno. (we used to do this in my last job with vertex colors, but I know some do with shaders, etc, etc.)

I don't know anything on how Irrlicht loads this (apart from what you have just said) as I don't do programming...

"My MIM converters actually aren't that good (in terms of flexibility, anyway). I'm just getting the ball rolling. I may extend or rewrite them in the future if there's need. Or maybe someone else will rewrite them -- as I mentioned, I think they're often going to be somewhat easier to write and work with than Irrlicht loaders."


Yup, I see MIM as the great solution for lightmaps and levels(I'd love if it'd grow later, but my main concern now(one step at a time) with irrlicht is a universal and free workflow for levels and lightmaps, and one who allows full graphic quality. This one is it.). Now is gonna be pretty easy for many of us to ouput samples and nice levels for irrlicht :) The flexibility is already huge if you allow OBJ+OBJ +the texture and lightmap tgas. :)

Thank you!
Finally making games again!
http://www.konekogames.com
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

Image

Here we are again. This was done by converting two OBJ files coming from gile[s] to MIM using OBJ2MIM (one of them being for the texture, the other for the lightmap).

Actually, I opened the textured version of the OBJ in Blender and reset the texture coordinates, saved it and used that along with the original gile[s] lightmap OBJ. I was hoping this would work without problems, but wasn't getting my hopes up... but it did. :) The only little glitch was that Blender messed up the MTL file and I had to fix it (I can't remember if I just used the old one or if I fixed Blender's one).

I had an unrelated and sort of strange problem along the way, though. On first try, the lightmap looked totally messed up. Since I know the Irrlicht TGA loader has had issues with not vertically flipping textures correctly, I tried flipping the lightmap texture myself in Photoshop. Fixed. So I put an option in OBJ2MIM to flip texture coordinates.

OBJ2MIM can convert one OBJ to MIM, or can convert two OBJs using the second one for a second texture. At present, the second texture (if present) is assumed to be a lightmap (i.e. the MIM contains an EMT_LIGHTMAP material type), but you could fix that with a text editor or ask me to improve OBJ2MIM. :)

OBJ2MIM can also convert material properties like color from the OBJ into MIM. This is probably more interesting for non lightmapped OBJs.

OBJ2MIM also has some convenience features for annoying texture and material path problems. You can change the texture path (i.e. by making it "Textures\" so that all textures are assumed to be in a textures directory), or remove it by specifying an empty texture path. For MTL files, you can tell OBJ2MIM to ignore the path and assume it's in the same directory as the OBJ, which is good for programs that output absolute paths.


So this brings us to the following as far as converting textured+lightmapped meshes to MIM for viewing in Irrlicht:
CSM2MIM: Cartography Shop (CShop) CSM files
DMF2MIM: DeleD map files (DMF)
OBJ2MIM: A pair of OBJ files as exported by gile[s] (and probably other packages)


I guess I should try OBJ2MIM with multiple textures just to make sure it works. It should, but you never know... :)
Last edited by Murphy on Wed Feb 02, 2005 12:56 pm, edited 2 times in total.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

woooooooooooohooooooooooooooooooooooooooo!!!!


afecelis jumps of happiness all arround his cave !!!!!
:D :D :D :D :D :D :D
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

FANTASTIC, man.

OBJ2MIM not only allows using Gile[s] .As what you do is export OBJ+mtl, and there are already even free converters(I provided a list, and tested all in the list, but there are more free ones) that output obj+mtl, we can perfectly use ANY highend package, or lightmapper. No matter if u use windsoft comercial lightmapper, Giles, Max, Max+brazil, vray, final render, Lightwave (great renderer) , Maya, XSI, the great Cinema4d rendering......Just name a software...ANY package will allow a bake lightmap to texture, and export the TGA, these days...and u can tell how universal is a tgA:...totally. :)


GREAT!

Huge congrats...

I'm searching for a free solution of powerful bake to texture...for now there is for free... slimshady, my favourite in ease of use, Lumetools,deled, and some others...But I'll probably provide a better way, and may even research in Blender's complex script. :)

Anyway, OBJ2 mim is the more open solution


THANKS!!
Finally making games again!
http://www.konekogames.com
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

Got a download available?
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

vermeer wrote:OBJ2MIM not only allows using Gile[s] .As what you do is export OBJ+mtl, and there are already even free converters(I provided a list, and tested all in the list, but there are more free ones) that output obj+mtl, we can perfectly use ANY highend package, or lightmapper. No matter if u use windsoft comercial lightmapper, Giles, Max, Max+brazil, vray, final render, Lightwave (great renderer) , Maya, XSI, the great Cinema4d rendering......Just name a software...ANY package will allow a bake lightmap to texture, and export the TGA, these days...and u can tell how universal is a tgA:...totally. :)
Well, I know it works with gile[s] and some other packages, but there's the possibility of incompatibilites with other packages generating the OBJs. One possibility is subtle differences in the OBJs that I don't account for. Another is probably more dependent on the workflow. The two OBJ meshes must be EXACTLY the same in terms of vertex count and position. While I could do some rearranging if they differ -- I don't. This works fine as far as I've tested, but there's always the possibility of problems.
I'm searching for a free solution of powerful bake to texture...for now there is for free... slimshady, my favourite in ease of use, Lumetools,deled, and some others...But I'll probably provide a better way, and may even research in Blender's complex script.
I'm considering developing a reasonable free workflow for FSRad. My thinking is: Blender (with special exporter) -> FSRad (modified version of Lord Trancos' modification) -> OCT2MIM
MikeR wrote:Got a download available?
Currently, I have the loader built into Irrlicht. I should probably make it external first.

Now that there's interest in downloading it, I'll try to get a release within a couple days.
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

That'll be great for a lot of us. :) Thanks. This project is looking quite exciting.
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

"Well, I know it works with gile[s] and some other packages, but there's the possibility of incompatibilites with other packages generating the OBJs. One possibility is subtle differences in the OBJs that I don't account for. Another is probably more dependent on the workflow. The two OBJ meshes must be EXACTLY the same in terms of vertex count and position. While I could do some rearranging if they differ -- I don't. This works fine as far as I've tested, but there's always the possibility of problems."

Well, I already counted with that....I mean, even if the OBJ writting is not exactly identical, there's allways problem free to open an obj from any of these packages into Lithunwrap, 3d exploration, Ultimate Uwnrap, Milkshape, Even Blender, that I am sure you found (except blender, maybe) quite easy workflows for what is just open, asign a texture, and save ;)

Even though, OBJ, if user knows no modification must be made in mesh (this is quite common knowledge, even I supposed it had to be so) no changes are usually put into oBJ. It's probably the one more similar in all the exports. Seriously, I am not expecting much problems in that. And if they were, i can tell you, Milkhsape will open/save/asign without hassle, I tested with loads of packages. And Lithunwrap is freeware (yep, still is, and will be), we even provide a download link (of course saying th ecomercial version is way better, and imho the best uv mapping tool out there www.unwrap3d.com (that one also allows animation conversions, and its *.x save was reported to work directly without need of mview))

To change the vertex count will need to actually do some strong operation on mesh, and I have to remember a tool that changes the order while saving OBJ with no operation o n mesh...I think I haven't found any...Anyway, as is same mesh, just saved twice with same material....No porblem...Once is texted that Lith or Blender does a nice export -as I expect- for MIM, they open one obj from th ehighend package, save there twice but with different texture...Order can't change as is same file :)


"I'm considering developing a reasonable free workflow for FSRad. My thinking is: Blender (with special exporter) -> FSRad (modified version of Lord Trancos' modification) -> OCT2MIM"

beware...I have been using it..and happened to me like with unmodified version..I am an experienced artist, and can't find the way with it, which is really, really rare....So, i am afraid it wont be friendly for newbees with it...I yet to output a tga (actually a .raw that seems that irfanview can open...) which has some greys and some quality as a lightmap.... I kow I'm missing something, there.If I find the way and once knowing a trick, is easy way, I may say then an opposite thing to this, but till now, I dunno if we can recommend it... remember I'm thinking on artists....
I was digging for free tools able to render to texture, who knows if I may find one.
of course, will continue trying fsrad mod, now that you say you may do a direct converter :) (great! :) ) I just woul dlike to avoid you extra work if the tool is not very friendly, but I will give it tomorrow another hard try.

Instead, found the free slimshady the easiest, but it does not takes in consideration curved surfaces, like Trancos old Lume tools.. So, in theory, FsRad shoul dbe the way (for the totally free and totally universal workflow) but i yet to output a bitmap (*.raw, it seems, Irfan seems to be able to open and convert to tga) that has a minimum uality...! I was using the sample scene included by Trancos.

Well, tommorrow will dig for some tut on the net with Fsrad, it actually should be the more powerful solution for totally free path...
I'll keep you updated here of my discoveriigs, here.

Good work! :) :)
Finally making games again!
http://www.konekogames.com
Post Reply