OCT+Parallax mapping MOD
OCT+Parallax mapping MOD
Ok here is a "test drive" of a level created using the OCT Tools workflow, the level is lightmapped via fsrad and is created in blender
(I dont now why not many people use this workflow even though its 100% free and provides radiosity(unlike deled))
More importantly it shows my new level paralax mapper: normal parallax mapping in irrlicht works on non lightmapped single textured meshes, it also required generation of normal and parallax maps.
My Mod generates all the textures on the fly from the diffuse textures, it doesnt modify any mesh loaders so it can be used with bsp deled etc...
it is a mod therefore you would apply the material in the same way, no callbacks to setup etc...
have fun with it, but more importantly comment on artefacts or anything that looks bad befre i provide the final patch.
there is a green static light and a yellow camera light.
omaremad.gdlib.net/octpara.zip
The fps is low because the whole level is rendered, as of now i cant get octree working on tangent meshes.
(I dont now why not many people use this workflow even though its 100% free and provides radiosity(unlike deled))
More importantly it shows my new level paralax mapper: normal parallax mapping in irrlicht works on non lightmapped single textured meshes, it also required generation of normal and parallax maps.
My Mod generates all the textures on the fly from the diffuse textures, it doesnt modify any mesh loaders so it can be used with bsp deled etc...
it is a mod therefore you would apply the material in the same way, no callbacks to setup etc...
have fun with it, but more importantly comment on artefacts or anything that looks bad befre i provide the final patch.
there is a green static light and a yellow camera light.
omaremad.gdlib.net/octpara.zip
The fps is low because the whole level is rendered, as of now i cant get octree working on tangent meshes.
Re: OCT+Parallax mapping MOD
omaremad,omaremad wrote:Ok here is a "test drive" of a level created using the OCT Tools workflow, the level is lightmapped via fsrad and is created in blender
(I dont now why not many people use this workflow even though its 100% free and provides radiosity(unlike deled))
I've tried to use it, because I want to make most of my modelling with Blender, but this workflow is driving me crazy.
When I export my scene with OCT exporter and pass it trough FSRad nothing happens.
Can you help me with this? I don't now if my OCTTools are not updated or if the problem is with FSRad. Can you post a link to both FSRad and OCT exporter for Blender 2.42?
Do you know any step-by-step tutorial with this workflow?
Thanks a lot.
Last edited by Zar on Wed Sep 06, 2006 12:56 am, edited 1 time in total.
afecelis,
Here is the problem:
My test mesh was already created in Blender and successfuly loaded into Irrlicht as obj file, including UV maps.
First of all, I have added a spotlight to the scene in Blender (I read that only spotlight works) aiming a small part of my mesh.
Then I exported it using oct exporter. The resulting file has 519Kb, but I think is normal, because when I export as obj the resulting file has 368Kb.
Then I load the file into FSRad e run it. It start to run, but stop on this screen:
When I try to load the output.oct into FSRad Viwer, the mesh is completely black.
When I try to load into Irrlicht, the mesh don't show up and the log says that the corresponding texture could not be loaded (but it is loaded when I use the same mesh as obj)
Could you help me with Blender/FSRad workflow? I really want to be able to use lighmaps with blender, but I'm stuck with this.
Here is the problem:
My test mesh was already created in Blender and successfuly loaded into Irrlicht as obj file, including UV maps.
First of all, I have added a spotlight to the scene in Blender (I read that only spotlight works) aiming a small part of my mesh.
Then I exported it using oct exporter. The resulting file has 519Kb, but I think is normal, because when I export as obj the resulting file has 368Kb.
Then I load the file into FSRad e run it. It start to run, but stop on this screen:
Some files are created in the original oct file directory - the output.oct, a completely back lightmap_0.tga and a 0 - 128x128.rawIterations: 0
Initial (abs/esc) energy: [processing lights]
Energy remaining: 0
Convergence target: N/A (direct light only)
Energy shot this pass: 0.00
Form Factor calculation method: Point Light Estimation
Input file: tower.oct
Adaptative subdivision treshold: 15 (1.#IO% there)
Total patches: 4576 (cur 4x4, max 128x128)
Total elements: 12267
When I try to load the output.oct into FSRad Viwer, the mesh is completely black.
When I try to load into Irrlicht, the mesh don't show up and the log says that the corresponding texture could not be loaded (but it is loaded when I use the same mesh as obj)
Could you help me with Blender/FSRad workflow? I really want to be able to use lighmaps with blender, but I'm stuck with this.
Hi Zar, did you check this thread?
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=14441
It's where Omaremad posted his UV mapping script and where my interest in Oct returned. Check it and let me know if you find anything useful there, meanwhile I'll experiment myself with a level and tell you if I had any success. Believe me I'd also love to get blender+OctTools to work fine with Irrlicht!
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=14441
It's where Omaremad posted his UV mapping script and where my interest in Oct returned. Check it and let me know if you find anything useful there, meanwhile I'll experiment myself with a level and tell you if I had any success. Believe me I'd also love to get blender+OctTools to work fine with Irrlicht!
afecelis wrote:Hi Zar, did you check this thread?
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=14441
It's where Omaremad posted his UV mapping script and where my interest in Oct returned. Check it and let me know if you find anything useful there, meanwhile I'll experiment myself with a level and tell you if I had any success.
Hi afecelis,
yep, I already use automapuv and followed omaremad mini tutorial.
I've solved the problem with the texture not being loaded. Don't know why, but when I export as oct instead of obj, the file try to load the texture from the project root directory instead of my textures path. But even with a succesful loaded texture, the mesh don't show up when using oct.
I've been reading all your posts about Blender and I'm loving it. Blender is a little bit scary in the beginning (too many features and controls), but when you get used to it you realize that the interface is very productive. I don't want to use any other programBelieve me I'd also love to get blender+OctTools to work fine with Irrlicht!
I have "successfully" loaded my exported oct file into omaremad example (octpara.zip), but with messed UV map and lights.
So, it seems that I have 2 problems:
1) my Irrlicht.dll is not loading the oct file
2) my exported oct file mess with UVmap
I tried to compile the engine again, using COCTLoader.h e COCTLoader.cpp from the svn update, but had the same problem.
Tried the irrlicht.dll from 1.1 release and another with directX suport, but had the same problem.
To load the oct file can I use "IAnimatedMesh" or there is any special code?
I'm trying to update OCTTools, but www.constantthought.com page is blank. Does someone now where I can get these files?
So, it seems that I have 2 problems:
1) my Irrlicht.dll is not loading the oct file
2) my exported oct file mess with UVmap
I tried to compile the engine again, using COCTLoader.h e COCTLoader.cpp from the svn update, but had the same problem.
Tried the irrlicht.dll from 1.1 release and another with directX suport, but had the same problem.
To load the oct file can I use "IAnimatedMesh" or there is any special code?
I'm trying to update OCTTools, but www.constantthought.com page is blank. Does someone now where I can get these files?
Did any one like the new parallax mapper? Switch over to bump maping in the demo and it shows how the old parallax maper would have behaved when using lightmapped meshes with multiple tetures.
anyway irrlicht comes with murphy's loader built in so no need for compiling, and besides the dll i provided is custom made since i had to modify the built in asm shaders and some other stuff in the vertex types, opengl driver.
ouch murphy's site is down. lucky i have the tools in backup, any way you get fsrad from fluid studios(google it)
and the exporter script for blender is mirrored here:
omaremad.gdlib.net/oct_export.py
right click save since formatting is important in python
oct should pack the lightmaps in one file but maybe you chose the raw option for debugging?
Only point lights work so maybe you had no lights(0 energy in your pasted output = no valid lights)
maybe i should make a video tut, but it ill be 640*480 bc im using an ancient fraps(cant get the opensource ptogram one to work with blender)
anyway irrlicht comes with murphy's loader built in so no need for compiling, and besides the dll i provided is custom made since i had to modify the built in asm shaders and some other stuff in the vertex types, opengl driver.
ouch murphy's site is down. lucky i have the tools in backup, any way you get fsrad from fluid studios(google it)
and the exporter script for blender is mirrored here:
omaremad.gdlib.net/oct_export.py
right click save since formatting is important in python
oct should pack the lightmaps in one file but maybe you chose the raw option for debugging?
Only point lights work so maybe you had no lights(0 energy in your pasted output = no valid lights)
maybe i should make a video tut, but it ill be 640*480 bc im using an ancient fraps(cant get the opensource ptogram one to work with blender)
I was using spot lights instead of lamp lights. One problem solved. Thanks a lot. Sometimes is hard to be a noobomaremad wrote:oct should pack the lightmaps in one file but maybe you chose the raw option for debugging?
Only point lights work so maybe you had no lights(0 energy in your pasted output = no valid lights)
I can't figure out why I still can't get my mesh displayed with the built in loader.omaremad wrote:anyway irrlicht comes with murphy's loader built in so no need for compiling, and besides the dll i provided is custom made since i had to modify the built in asm shaders and some other stuff in the vertex types, opengl driver.
Here is my scene node:
Code: Select all
IAnimatedMesh* example = 0;
example = smgr->getMesh("./media/meshes/output.oct");
ISceneNode* examplenode = 0;
examplenode = smgr->addAnimatedMeshSceneNode(example);
examplenode->setScale(vector3df(80,90,80));
examplenode->setPosition(core::vector3df(0,74,330));
examplenode->setRotation(core::vector3df(270,270,0));
examplenode->setMaterialFlag(video::EMF_LIGHTING,true);
examplenode->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
examplenode->setMaterialFlag(EMF_FOG_ENABLE,true); //enables fog
Thanks a lot. It seems that my file versions were OK.ouch murphy's site is down. lucky i have the tools in backup, any way you get fsrad from fluid studios(google it)
and the exporter script for blender is mirrored here:
omaremad.gdlib.net/oct_export.py
That would be great! The resolution of your tutorial dosn't matter. Trust me. I think a lot of people would love to have something to start, even with low res.maybe i should make a video tut, but it ill be 640*480 bc im using an ancient fraps(cant get the opensource ptogram one to work with blender)
afecelis,
I've found a link to your OCTTools_1.0.1 (a little bit old version)
So, I replaced the COCTLoader files and compiled a new test version of Irrlicht.dll.
Then I used the example provided in the readme.txt like below, but I can't compile my project with this code.
Is this right?
I've found a link to your OCTTools_1.0.1 (a little bit old version)
So, I replaced the COCTLoader files and compiled a new test version of Irrlicht.dll.
Then I used the example provided in the readme.txt like below, but I can't compile my project with this code.
Code: Select all
irr::scene::COCTLoader OCTLoader = irr::scene::COCTLoader(driver);
smgr->addExternalMeshLoader(&OCTLoader);
scene::IAnimatedMesh* mesh = smgr->getMesh(meshName);
smgr->addOctTreeSceneNode(mesh);
// Do this next part if you want dynamic lights
io::IReadFile* file = device->getFileSystem()->createAndOpenFile(meshName);
OCTLoader.OCTLoadLights(file, smgr);
file->drop();
Hi Zar,
I'm not sure if that's the latest version, and I just visited Murphy's OCT site but the it seems to be down. Let me check if I have a newer version.
About loadin the oct file, it should be loaded as ani IAnimatedMesh. The problem, and you already mentioned it, is that it only finds the oct file and the textures when placed at the same fodler as the executable's. Omaremad had a fix to make it find the Oct file+textures in subfolders but I never got it to work.
This code should work:
hope it helps. I'll see if I find another verison of oct.
@Omaremad: I love your parallax mapping mod! Looks great. Did you post any code to use it?
I'm not sure if that's the latest version, and I just visited Murphy's OCT site but the it seems to be down. Let me check if I have a newer version.
About loadin the oct file, it should be loaded as ani IAnimatedMesh. The problem, and you already mentioned it, is that it only finds the oct file and the textures when placed at the same fodler as the executable's. Omaremad had a fix to make it find the Oct file+textures in subfolders but I never got it to work.
This code should work:
Code: Select all
//load oct scene
IAnimatedMesh* octMesh = smgr->getMesh("level.oct");
ISceneNode* octnode = smgr->addOctTreeSceneNode(octMesh->getMesh(0));
octnode->setScale(core::vector3df(3,3,3));
octnode->setPosition(core::vector3df(0,0,0));
octnode->setMaterialFlag(EMF_LIGHTING, false);
@Omaremad: I love your parallax mapping mod! Looks great. Did you post any code to use it?
Last edited by afecelis on Thu Sep 07, 2006 1:24 am, edited 2 times in total.
Zar, just found version 1.02 which seems to be the latest. I'm also including the Oct viewer. You can grab it here:
http://afecelis.gdlib.net/Irrlicht/Oct_1.02.zip
http://afecelis.gdlib.net/Irrlicht/Oct_1.02.zip