Murphy's Irrlicht Mesh file format
Where have you been, man? We're on the second official release.afecelis wrote:have the tools and the workflow been officially released?
There's a link to where you can get it (my website) on the main Irrlicht page. http://www.constantthought.com/project/OCTTools
" pero vamos tio!!!!! those screenies look damn nice!!"
ya ves, colega...
And they'r only quick and dirty art, with quick and dirty fsrad settings...What I have learned of most value in the proccess, is to minimize the rendering time while yet having ok quality.. that's an example...I froce a limit of 1000 iterations...Murphy has a deal of huge knowledge on how radiosity and stuff occurs...I am just a gfx playing with the settings, but a partal read of the fsrad help did a lot.Also teaches a bit bout radiosity, but didnt read that part...
The great thing of this is the new workflow (murphy is constantly improving the tools)...I do set my lights in blender...even with one only hand is easy...
i have allways the text editor in the secne so i van touch settings, but that's me as i'm tester now, the final user doesnt needed, unless, like me, likes to touch everything...XD
so, only set the lights (you could have imported an obj, or built in blender). Run the murphy's export script (alt p in text editor, unless u prefer to configure properly as an export file thingie. i prefer text.) .That will output an *.oct file. Is a native file for fsrad. it contains lights info, and uv textures, those asigned via the UV window *.I recommend have all project files, blender blend even, base texture, oct, all in same folder. I set fsrad to output later on also there. usually the blendr oct has different name than the fsrad output oct, of course. oct is a very compact thing...it also contains lightmaps..it just outputs tgas (thanks to murphy again) for your convinience. but the oct file alone is enough. yet though is very important to have the tgas, for many uses.
in fsrad (see, no steps in between) the oct is opened direct from blender (well, u tell which file is, usually allways the same for a project). put the settings, hit the go button...and...bang..thanks to the included murphy's oct loader, you directly load into irrlicht, coloured lights and all...also you can use his oct2obj converter. with no parameter,it exports the texture obj. with lm, the lightmap obj. then u couls obj2mim, which imho as hugely more application with ANY tool different from blender : anyy one with a max, lw, maya, xsi, already has its "render lighting to texture ". so they just output a pair of objs, one with texture applied to channel 1, and the other with lightmap tga applied to the second obj.Just obj2mim will do the rest (it mounts a multiuv file, lightmapped, ready to run in irrlicht
)
not sure if obj2mim path is finished, as now really happy with the oct wrkflow, but for all the other usrs (non-blender) obj2mim will rock equally.
released blender-fsrad-irrlicht Murphy's workflow tools:
http://www.constantthought.com/project/OCTTools
"can't imagine what would come up if your hand was fine!!! Wink"
with my hand ok, and not just worried in testing tech and probs, i mean in a game poroject...well,,,muuuch better
"have the tools and the workflow been officially released? I love the Blender "
yup, link above...
"integration thingie!!!! freedom freedom freedom!!!!! ""
blender was used for preview 3d of spiderman 2: it's good for building an cenery..and...well..most of all..istotally free...I don't feel passional bout it, but heck, it's totally free , even open source.
And now Murphy was as kind as to make possible new fsrad version be loaded with wine in linux!
i think if u could test it in ur linux, afe,u'd do a favor to us..(well, mostly to linux users...
)
Now I understand the real meaning of M's page...www.constantthought.com ...
* [Just general Blender use usage: remember to set "UV" in "map input" in level material, and select face mode instead of the standard object, for seing the uvs in uv window(have em all selected in 3d vew to see them))...select all."load image" in uv window yet. ,and scale if wanna make a dirty tiling like i made, or uv map them as you prefer, or if the obj had already uvs, hey, no need to touch anything in uv window.]
ya ves, colega...
The great thing of this is the new workflow (murphy is constantly improving the tools)...I do set my lights in blender...even with one only hand is easy...
i have allways the text editor in the secne so i van touch settings, but that's me as i'm tester now, the final user doesnt needed, unless, like me, likes to touch everything...XD
so, only set the lights (you could have imported an obj, or built in blender). Run the murphy's export script (alt p in text editor, unless u prefer to configure properly as an export file thingie. i prefer text.) .That will output an *.oct file. Is a native file for fsrad. it contains lights info, and uv textures, those asigned via the UV window *.I recommend have all project files, blender blend even, base texture, oct, all in same folder. I set fsrad to output later on also there. usually the blendr oct has different name than the fsrad output oct, of course. oct is a very compact thing...it also contains lightmaps..it just outputs tgas (thanks to murphy again) for your convinience. but the oct file alone is enough. yet though is very important to have the tgas, for many uses.
in fsrad (see, no steps in between) the oct is opened direct from blender (well, u tell which file is, usually allways the same for a project). put the settings, hit the go button...and...bang..thanks to the included murphy's oct loader, you directly load into irrlicht, coloured lights and all...also you can use his oct2obj converter. with no parameter,it exports the texture obj. with lm, the lightmap obj. then u couls obj2mim, which imho as hugely more application with ANY tool different from blender : anyy one with a max, lw, maya, xsi, already has its "render lighting to texture ". so they just output a pair of objs, one with texture applied to channel 1, and the other with lightmap tga applied to the second obj.Just obj2mim will do the rest (it mounts a multiuv file, lightmapped, ready to run in irrlicht
not sure if obj2mim path is finished, as now really happy with the oct wrkflow, but for all the other usrs (non-blender) obj2mim will rock equally.
released blender-fsrad-irrlicht Murphy's workflow tools:
http://www.constantthought.com/project/OCTTools
"can't imagine what would come up if your hand was fine!!! Wink"
with my hand ok, and not just worried in testing tech and probs, i mean in a game poroject...well,,,muuuch better
"have the tools and the workflow been officially released? I love the Blender "
yup, link above...
"integration thingie!!!! freedom freedom freedom!!!!! ""
blender was used for preview 3d of spiderman 2: it's good for building an cenery..and...well..most of all..istotally free...I don't feel passional bout it, but heck, it's totally free , even open source.
And now Murphy was as kind as to make possible new fsrad version be loaded with wine in linux!
i think if u could test it in ur linux, afe,u'd do a favor to us..(well, mostly to linux users...
Now I understand the real meaning of M's page...www.constantthought.com ...
* [Just general Blender use usage: remember to set "UV" in "map input" in level material, and select face mode instead of the standard object, for seing the uvs in uv window(have em all selected in 3d vew to see them))...select all."load image" in uv window yet. ,and scale if wanna make a dirty tiling like i made, or uv map them as you prefer, or if the obj had already uvs, hey, no need to touch anything in uv window.]
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
heck, i tend to end not being able to explain simple things with simple words...the workflow with blender and fsrad is this :
-import obj in blender, or model in blender.
-export with murphy export plugin.
-open in fsrad. render.
-in code just use the oct loader .
for obj2mim workflow (will be) :
-in your highend expensive package, or midcost one, like giles, render your lightmap (bake to uv bitmap, as usual). Asing that bitmap as an stadard uv texture in standard materai. export as obj. without changing of scnery, just change the uv texture (also in channel uv 1) to set the base texture instead. Export again as obj.
-Use obj2mim
-load mim in irrlicht.
of course in these two last posts of mine ive not mentioned many features, but hey the wrkflow for basic functionality. u can do simply, or u can do more advanced things...see the sconce thing..u can make many type of ptoyector...i yet to try the "pass through gate efect"
-import obj in blender, or model in blender.
-export with murphy export plugin.
-open in fsrad. render.
-in code just use the oct loader .
for obj2mim workflow (will be) :
-in your highend expensive package, or midcost one, like giles, render your lightmap (bake to uv bitmap, as usual). Asing that bitmap as an stadard uv texture in standard materai. export as obj. without changing of scnery, just change the uv texture (also in channel uv 1) to set the base texture instead. Export again as obj.
-Use obj2mim
-load mim in irrlicht.
of course in these two last posts of mine ive not mentioned many features, but hey the wrkflow for basic functionality. u can do simply, or u can do more advanced things...see the sconce thing..u can make many type of ptoyector...i yet to try the "pass through gate efect"
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
WOOOHOOOOO!!!!
MIM TOOLS ALMOST 100% TO BE RELEASED..!!!
It's been a hard fight -mainly for Murphy, of course- but they'r now functional.
man...it's sweet...just grab 2 objs (actually, the same one just asign other texture save it with different name), one with textred, the other with lightmap tga. execute obj2mim. Bang. a 2 uv channel, lightmapped mesh, perfect. even more the artist can choose all the lightmaps modes in irrlitch, equal to those in ultimate unwrap : multiply x1,x2,x4 or Add. I like more the x2, but that goes on personal likings.perhaps each multiply burns a bit the lightmap.
anyway, the screens bellow are from a terribly bad and too undefined shadows, i made it too quck and bad. is the only reason why to some fsrad would look better. nah...indeed, mim way is quite preferrable for those having a comercial tool: max, lw, maya, giles....
it's TOTALLY easy. Just execute the converter
screenies...
multiply 2 _M2 type
http://img102.exs.cx/img102/9286/m25wq.png
http://img102.exs.cx/img102/7871/m2b6zu.png
and we'r still working to *maybe* add some extra very sweet feature...secret yet
imo this is simply great!
here , as u see , no blender involved, nor fsrad. just two objs each with tga asigned (and your tool wher u baked to tga ur lightmap, of course) , and dumb easy commandline converter.
oh, and he made the viewer of blender-fsrad-oct workflow, support perfectly MIM format!! man...its sweete workflow even than in my last company...
so, only complexity is this :
obj2mim -vf2 -t . -f texture.obj -lm lightmap.obj -s 100 output.mim
[ but as allways, switches ar optional, an their not a lot (u hit the name obj2mim and a very short description for each appears) ]
vf2 and vf1 , flip uvs of texture.obj , or lightmap.obj, if u need it.
-t . overrides absolute paths if any in mtl
-f forces overwrite output.mim, if u wish.
-lm specifies that next obj is for lightmap channel
-s 100 scale by a number...something every converter shuld have...
i think there are several more, but for an example
indeed, that's all u need
HUGE kudos to Murphy, has worked a lot and at light speed.
the power it gives the artist is great...
no matter if i use a blender-fsrad-oct workflow, or a mim - highend OR cheap lightmapper workflow...i can test all perfectly as i'd see ingame, with no irrlicht engine installed, and zero irrlicht or coding knowledge (only the irrlicht .dll)
..and the workflow issoooo easy.
I'm hopping he adds a latest feature we're speaking about now, but if he can't or don't feel in the mood, man this is superb already!!!!!

MIM TOOLS ALMOST 100% TO BE RELEASED..!!!
It's been a hard fight -mainly for Murphy, of course- but they'r now functional.
man...it's sweet...just grab 2 objs (actually, the same one just asign other texture save it with different name), one with textred, the other with lightmap tga. execute obj2mim. Bang. a 2 uv channel, lightmapped mesh, perfect. even more the artist can choose all the lightmaps modes in irrlitch, equal to those in ultimate unwrap : multiply x1,x2,x4 or Add. I like more the x2, but that goes on personal likings.perhaps each multiply burns a bit the lightmap.
anyway, the screens bellow are from a terribly bad and too undefined shadows, i made it too quck and bad. is the only reason why to some fsrad would look better. nah...indeed, mim way is quite preferrable for those having a comercial tool: max, lw, maya, giles....
it's TOTALLY easy. Just execute the converter
screenies...
multiply 2 _M2 type
http://img102.exs.cx/img102/9286/m25wq.png
http://img102.exs.cx/img102/7871/m2b6zu.png
and we'r still working to *maybe* add some extra very sweet feature...secret yet
imo this is simply great!
here , as u see , no blender involved, nor fsrad. just two objs each with tga asigned (and your tool wher u baked to tga ur lightmap, of course) , and dumb easy commandline converter.
oh, and he made the viewer of blender-fsrad-oct workflow, support perfectly MIM format!! man...its sweete workflow even than in my last company...
so, only complexity is this :
obj2mim -vf2 -t . -f texture.obj -lm lightmap.obj -s 100 output.mim
[ but as allways, switches ar optional, an their not a lot (u hit the name obj2mim and a very short description for each appears) ]
vf2 and vf1 , flip uvs of texture.obj , or lightmap.obj, if u need it.
-t . overrides absolute paths if any in mtl
-f forces overwrite output.mim, if u wish.
-lm specifies that next obj is for lightmap channel
-s 100 scale by a number...something every converter shuld have...
i think there are several more, but for an example
indeed, that's all u need
HUGE kudos to Murphy, has worked a lot and at light speed.
the power it gives the artist is great...
no matter if i use a blender-fsrad-oct workflow, or a mim - highend OR cheap lightmapper workflow...i can test all perfectly as i'd see ingame, with no irrlicht engine installed, and zero irrlicht or coding knowledge (only the irrlicht .dll)
..and the workflow issoooo easy.
I'm hopping he adds a latest feature we're speaking about now, but if he can't or don't feel in the mood, man this is superb already!!!!!
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
still must do some stuff for in case we can do that extra thing...
frankly, this stuff rocks!
frankly, this stuff rocks!
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
and it's even better than I thought in my last post...
it already had a feature which I didn't know of! lol ....
it already had a feature which I didn't know of! lol ....
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
started playing with OctTools; plz check my code
Hey guys!!
so I finally started playing around with the Oct exporter for blender and the used Murphy's special flavor of Fsrad.
I created my source file following Murphy's specs and it compiled ok. The mesh gets loaded ok but all I'm getting is a black screen. Please check my code guys to see if anything's wrong; if not then my mistake must be in the blender part. So any extra tips would help a lot. If I get it to work then I can help you guys out with further testing of the format and with MIM.
cheers!
so I finally started playing around with the Oct exporter for blender and the used Murphy's special flavor of Fsrad.
I created my source file following Murphy's specs and it compiled ok. The mesh gets loaded ok but all I'm getting is a black screen. Please check my code guys to see if anything's wrong; if not then my mistake must be in the blender part. So any extra tips would help a lot. If I get it to work then I can help you guys out with further testing of the format and with MIM.
cheers!
Code: Select all
//Afecelis-Irrlicht OctTools-Example compiling with MSVC toolkit 2003 + the Relo IDE
//Copyright © 2004 Alvaro F. Celis "afecelis"
//Using Murphy's Oct format and loader
/* The Irrlicht Engine License
Copyright © 2002-2003 Nikolaus Gebhardt
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications,
and to alter it and redistribute it freely, subject to the following restrictions:
1.The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2.Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3.This notice may not be removed or altered from any source distribution.*/
#include <irrlicht.h>
using namespace irr;
#pragma comment(lib, "Irrlicht.lib")
#include "COCTLoader.h"
int main()
{
IrrlichtDevice *device =
createDevice(video::EDT_OPENGL, core::dimension2d<s32>(800, 600),32, false, false, false,0);
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
irr::scene::COCTLoader OCTLoader = irr::scene::COCTLoader(driver);
smgr->addExternalMeshLoader(&OCTLoader);
scene::IAnimatedMesh* mesh = smgr->getMesh("data/output.oct");
smgr->addOctTreeSceneNode(mesh);
scene::ICameraSceneNode* camera = 0;
camera = smgr->addCameraSceneNodeFPS();
camera->setPosition(core::vector3df(150,70,-70));
camera->setFarValue ( 50000.0f ) ;
camera->setFOV(1.1f);
camera->setTarget( core::vector3df(-100,70,0));
camera->setRotation(core::vector3df(20,-50,0));
device->getCursorControl()->setVisible(false);
int lastFPS = -1;
while(device->run())
{
driver->beginScene(true, true, video::SColor(0,0,0,0));
smgr->drawAll();
driver->endScene();
int fps = driver->getFPS();
if (lastFPS != fps)
{
wchar_t tmp[1024];
swprintf(tmp, 1024, L"OCTTools Mesh Loader Example - Irrlicht Engine v.0.7.1 (fps:%d) Triangles:%d",
fps, driver->getPrimitiveCountDrawn());
device->setWindowCaption(tmp);
lastFPS = fps;
}
}
device->drop();
return 0;
}
Re: started playing with OctTools; plz check my code
Hmm... there's nothing wrong with your code. Let's see...afecelis wrote:I created my source file following Murphy's specs and it compiled ok. The mesh gets loaded ok but all I'm getting is a black screen.
First, what do the Irrlicht log messages say? They show proper texture loads and such?
Second, enable the RAW and TGA export in FSRad and take a look at the TGAs. Are they all black? If so, it may just be a matter of being too dark.
It could also be a scale issue. I find it's often helpful to call beginScene with a color besides black when debugging.
If you want to send me your .blend or OCT or whatever, I'll take a look and maybe be able to help faster. Up to you. I'm sure we can get you running.
Not that hard of a fight, really...vermeer wrote:It's been a hard fight -mainly for Murphy, of course- but they'r now functional.
It took a long time to rewrite the MIM loader as a proper external mesh loader, but only because it was really dull so I didn't work on it much.
And then last night Vermeer was helping me test OBJ2MIM and we came up against an internationalization issue again (tool worked fine here in the U.S.A., but wouldn't work places that used a comma as the decimal seperator), which is harder to figure out than it is to fix.
But yeah, it seems like the MIM stuff is ready for a first release. I'm going to jot down a readme and some notes, and that should be version 1...
It looks like I may have a couple additional days before leaving, so I might get a chance to make a little demo of some MIM/OCT features. We'll see.
Here's a new screenshot.

Since the OCT format can store lighting data and my COCTLoader for Irrlicht can turn that data into light scene nodes, you can do "mixed" lighting fairly easily. This screenshot shows Vermeer's map lightmapped with FSRad, with the addition of several cubes (Test scene nodes) which are lit at runtime using dynamic lights -- from the same light data in the OCT that the lightmaps were generated from. All I did was add the cube nodes and presto -- they're lit.
Excuse the poor image quality -- I only let FSRad run for about 30 seconds.
You can do this same sort of thing with MIM, in theory, but the only tool that generates lights in MIMs at the moment is the DeleD map converter.

Since the OCT format can store lighting data and my COCTLoader for Irrlicht can turn that data into light scene nodes, you can do "mixed" lighting fairly easily. This screenshot shows Vermeer's map lightmapped with FSRad, with the addition of several cubes (Test scene nodes) which are lit at runtime using dynamic lights -- from the same light data in the OCT that the lightmaps were generated from. All I did was add the cube nodes and presto -- they're lit.
Excuse the poor image quality -- I only let FSRad run for about 30 seconds.
You can do this same sort of thing with MIM, in theory, but the only tool that generates lights in MIMs at the moment is the DeleD map converter.
ok guys, thnx for the suggestions. So I started off easily: a corner made by 3 boxes, a sphere and a concrete texture, simple huh?
things seem to go ok, I'm able to export to oct, then I run fsrad (with the tga lightmap export options on), I get my new oct created. I then use the loader and things compile ok but.....
1. Geometry shows up misplaced
2. all my models are black (no lightmaps)
http://www.danielpatton.com/afecelis/sc ... _error.jpg
Murphy/Vermeer: here's the project in case you want to check it out:
http://www.danielpatton.com/afecelis/files/OctTest.zip
please check my big mistakes!!!

things seem to go ok, I'm able to export to oct, then I run fsrad (with the tga lightmap export options on), I get my new oct created. I then use the loader and things compile ok but.....
1. Geometry shows up misplaced
2. all my models are black (no lightmaps)
http://www.danielpatton.com/afecelis/sc ... _error.jpg
Murphy/Vermeer: here's the project in case you want to check it out:
http://www.danielpatton.com/afecelis/files/OctTest.zip
please check my big mistakes!!!
My guess is that the problem is that your mesh isn't texture mapped. Thus, the textures are black.
Don't have time to test it myself, at the moment, but try assigning your texture.
It has to be a regular image texture map, not a Blender-specific texturing type. (http://irrlicht.sourceforge.net/phpBB2/ ... php?t=5391)
Edit:
Okay, I did just test it. Assigned a texture and now it looks fine.
Don't have time to test it myself, at the moment, but try assigning your texture.
It has to be a regular image texture map, not a Blender-specific texturing type. (http://irrlicht.sourceforge.net/phpBB2/ ... php?t=5391)
Edit:
Okay, I did just test it. Assigned a texture and now it looks fine.