IrrAR - Irrlicht and Augmented Reality
Re: IrrAR - Irrlicht and Augmented Reality
IParticleSystemSceneNode is disappear in the irrar
This is the sample from irrar , I want to add a IParticleSystemSceneNode to the object . But it`s not show . I don`t know why , can FreakNigh fix it ?
//////***************************************/
scene::IParticleSystemSceneNode* ps = smgr->addParticleSystemSceneNode(
false);
ps->setParticleSize(core::dimension2d<f32>(
/*20.0f, 10.0f*/ 22.5f,12.5f));
scene::IParticleAffector* paf =ps->createFadeOutParticleAffector();
ps->addAffector(paf);
paf->drop();
ps->setMaterialFlag(video::EMF_LIGHTING, false);
ps->setMaterialTexture(0,driver->getTexture("media/fire.jpg"));
ps->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA);
scene::IParticleEmitter* em = ps->createBoxEmitter(
core::aabbox3d<f32>(-7,0,-7,7,1,7), //box
/*core::vector3df(0.0f,0.03f,0.0f)*/
core::vector3df(0.0f,0.03f,0.0f),//direction
80,//minParticlesPerSecond
100,//maxParticlesPerSecond
video::SColor(0,255,255,255),//minStartColor
video::SColor(0,255,255,255),//maxStartColor
800,//life time min
2000, //life time max
0 //max angle degrees
);
ps->setEmitter(em);
em->drop();
ps->setScale(core::vector3df(
20,
20,
20));
//camera stuff
vector3df camera_pos = vector3df(0,0,0);
vector3df camera_target = vector3df(0,0,1);
ICameraSceneNode* camera = smgr->addCameraSceneNode(0, camera_pos, camera_target);
//AR stuff
IARManager* armgr = new IARManager(device);
//init the camera
armgr->beginCamera("ardata/camera_para.dat","ardata/WDM_camera_flipV.xml");
//node for the lady, attached the the hiro pattern
ISceneNode* hiro_node = armgr->addARSceneNode("ardata/patt.hiro", node);
//node for the fairy, attached the the sample1 pattern
ISceneNode* sample1_node = armgr->addARSceneNode("ardata/patt.sample1", fairy);
//attach a particle to the node more children to our nodes
sample1_node->addChild(ps);
sample1_node->addChild(light_node);
hiro_node->addChild(light_node2);
sample1_node->addChild(light_node3);
hiro_node->addChild(light_node4);
//now fix our camera to display right
armgr->fixCamera(camera);
This is the sample from irrar , I want to add a IParticleSystemSceneNode to the object . But it`s not show . I don`t know why , can FreakNigh fix it ?
//////***************************************/
scene::IParticleSystemSceneNode* ps = smgr->addParticleSystemSceneNode(
false);
ps->setParticleSize(core::dimension2d<f32>(
/*20.0f, 10.0f*/ 22.5f,12.5f));
scene::IParticleAffector* paf =ps->createFadeOutParticleAffector();
ps->addAffector(paf);
paf->drop();
ps->setMaterialFlag(video::EMF_LIGHTING, false);
ps->setMaterialTexture(0,driver->getTexture("media/fire.jpg"));
ps->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA);
scene::IParticleEmitter* em = ps->createBoxEmitter(
core::aabbox3d<f32>(-7,0,-7,7,1,7), //box
/*core::vector3df(0.0f,0.03f,0.0f)*/
core::vector3df(0.0f,0.03f,0.0f),//direction
80,//minParticlesPerSecond
100,//maxParticlesPerSecond
video::SColor(0,255,255,255),//minStartColor
video::SColor(0,255,255,255),//maxStartColor
800,//life time min
2000, //life time max
0 //max angle degrees
);
ps->setEmitter(em);
em->drop();
ps->setScale(core::vector3df(
20,
20,
20));
//camera stuff
vector3df camera_pos = vector3df(0,0,0);
vector3df camera_target = vector3df(0,0,1);
ICameraSceneNode* camera = smgr->addCameraSceneNode(0, camera_pos, camera_target);
//AR stuff
IARManager* armgr = new IARManager(device);
//init the camera
armgr->beginCamera("ardata/camera_para.dat","ardata/WDM_camera_flipV.xml");
//node for the lady, attached the the hiro pattern
ISceneNode* hiro_node = armgr->addARSceneNode("ardata/patt.hiro", node);
//node for the fairy, attached the the sample1 pattern
ISceneNode* sample1_node = armgr->addARSceneNode("ardata/patt.sample1", fairy);
//attach a particle to the node more children to our nodes
sample1_node->addChild(ps);
sample1_node->addChild(light_node);
hiro_node->addChild(light_node2);
sample1_node->addChild(light_node3);
hiro_node->addChild(light_node4);
//now fix our camera to display right
armgr->fixCamera(camera);
I dunno it's kind of been awhile, I've been working mostly on my SDL based game refining it for noob to player conversion since I started my advertising campaign.. The second version of my game will be in irrlicht..
CvIrrCamController - 3D head tracking lib to create window effect with webcam
IrrAR - Attach Irrlicht nodes to real life markers
http://www.nighsoft.com/
Particles "disappears" in Irrar
Hi,
I am also having trouble displaying the particles system in Irrar. I think it has something to do with the projection_matrix. Whenever i comment away the "fixcamera" function i could see the particles but the models' position and orientation will go haywire.
Any help please? Any help will be greatly appreciated!!!
I am also having trouble displaying the particles system in Irrar. I think it has something to do with the projection_matrix. Whenever i comment away the "fixcamera" function i could see the particles but the models' position and orientation will go haywire.
Any help please? Any help will be greatly appreciated!!!
Hi everyone, late happy new year!
FreakNigh, I just retook working with your library and I was trying to get it to work with the latest 1.6-SVN, however I got some compile errors because of changes between Irrlicht's 1.4.1 code used for Irrar and the actual version.
Have you or anyone treid updating it?
Also, can a .irr scene be loaded? Is there a way to assign a node to an irr scene to load it? (like the ones you assign to meshes directly). Loading irr scenes would allow mixing several elements at the same time (animators, particles, meshes, etc) and simplify things a lot.
Anyway, I went back to devc++ with the 1.4.1 irrlicht devpak to get things working, but it would be great to update it to the latest version. I'll try to post the error I got before downgrading.
regards,
Alvaro
FreakNigh, I just retook working with your library and I was trying to get it to work with the latest 1.6-SVN, however I got some compile errors because of changes between Irrlicht's 1.4.1 code used for Irrar and the actual version.
Have you or anyone treid updating it?
Also, can a .irr scene be loaded? Is there a way to assign a node to an irr scene to load it? (like the ones you assign to meshes directly). Loading irr scenes would allow mixing several elements at the same time (animators, particles, meshes, etc) and simplify things a lot.
Anyway, I went back to devc++ with the 1.4.1 irrlicht devpak to get things working, but it would be great to update it to the latest version. I'll try to post the error I got before downgrading.
regards,
Alvaro
Irrar compiles and runs with irrlicht 1.7 with some small changes. Should be easy if you follow the errors. I can't remember what changes i did but i can look at this again if you still having trouble with this afecelis.FreakNigh, I just retook working with your library and I was trying to get it to work with the latest 1.6-SVN, however I got some compile errors because of changes between Irrlicht's 1.4.1 code used for Irrar and the actual version.
Have you or anyone treid updating it?
I think this is actually a problem in rendering billboards in general and yes it is a missing transformation in the projection_matrix.I am also having trouble displaying the particles system in Irrar. I think it has something to do with the projection_matrix. Whenever i comment away the "fixcamera" function i could see the particles but the models' position and orientation will go haywire.
Adding this code:
Code: Select all
for(i = 0; i < 4; i++)
icpara[1][i] = height*icpara[2][i] - icpara[1][i];
Code: Select all
if( arParamDecompMat(cparam, icpara, trans) < 0 )
{
printf("gConvGLcpara: Parameter error!!\n");
exit(0);
}
Replacing this:
Code: Select all
driver->draw2DImage(this->cam_texture, rect<s32>(0,0,scrn_size.Width,scrn_size.Height), rect<s32>(0,0,img_size.Width,img_size.Height));
Code: Select all
driver->draw2DImage(this->cam_texture, rect<s32>(0,0,scrn_size.Width,scrn_size.Height), rect<s32>(0,img_size.Height,img_size.Width,0));
FreakNigh is using addTexture for the camera image and lock()/unlock() to update the texture per frame. I think i saw somewhere in irrlicht forums that addRenderTargetTexture should be used in similar occasions because it is modified for multiple locks/unlocks. I tried that but i can not see any performance improvement. I think that this also has to do with the limited fps of my webcam.
Afecelis are you an architect too? If you are, i can see why you are interested in this project
i have a small problem ^^
Can you help me please ??!
Code: Select all
Compilateur: Default compiler
Building Makefile: "C:\Users\Narugohan\Documents\C++\irrAR-0.3\Makefile.win"
Exécution de make...
make.exe -f "C:\Users\Narugohan\Documents\C++\irrAR-0.3\Makefile.win" all
g++.exe irrAR.o test.o -o "test_irrAR.exe" -L"C:/Dev-Cpp/lib" ARToolKit/lib/libAR.lib ARToolKit/lib/libARMulti.lib ARToolKit/lib/libARvideo.lib irrlicht-1.4.1/irrlicht-1.4.1/lib/Win32-gcc/libIrrlicht.a
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
ARToolKit/lib/libAR.lib(./Release/arGetCode.obj)(.text[_arGetPatt]+0xff):.\arGetCode.c: undefined reference to `_ftol2'
ARToolKit/lib/libAR.lib(./Release/arGetCode.obj)(.text[_arGetPatt]+0x124):.\arGetCode.c: undefined reference to `_ftol2'
ARToolKit/lib/libAR.lib(./Release/arGetCode.obj)(.text[_arGetPatt]+0x149):.\arGetCode.c: undefined reference to `_ftol2'
ARToolKit/lib/libAR.lib(./Release/arGetCode.obj)(.text[_arGetPatt]+0x16e):.\arGetCode.c: undefined reference to `_ftol2'
ARToolKit/lib/libAR.lib(./Release/arGetCode.obj)(.text[_arGetPatt]+0x367):.\arGetCode.c: undefined reference to `_ftol2'
ARToolKit/lib/libAR.lib(./Release/arGetCode.obj)(.text[_arGetPatt]+0x38d):.\arGetCode.c: more undefined references to `_ftol2' follow
collect2: ld returned 1 exit status
make.exe: *** [test_irrAR.exe] Error 1
Exécution terminée
You need to be more specific to get help.narugohan wrote:I managed to compile with MSVC. Everything works, but, when the webcam sees the pattern, she modifies the background, but when she doesn't see, she doesn't modifies.
One idea ?
What exactly do you mean by "modifies the background"?
Are you using irrlicht 1.4.1?
Have you made any changes in the IrrAR code?
You use opengl or d3d?
I'm using irrlicht 1.6, OpenGL. I haven't made a change the irrAR code.
I see webcam images change when the program detect a pattern, else, she doesn't change.
PS : i am making a video for that you see
http://www.youtube.com/watch?v=GnNYCSlx ... tube_gdata
I see webcam images change when the program detect a pattern, else, she doesn't change.
PS : i am making a video for that you see
http://www.youtube.com/watch?v=GnNYCSlx ... tube_gdata
Try this one:
Download the Artoolkit devpack for Dev-C++ from here:
http://pegasus.cc.ucf.edu/~mi872775/fil ... 2.1.DevPak
Install the devpack
Use a clean version of IrrAR (with no changes at all)
Open the IrrAR Dev-C++ project file
Change only what is necessary to make the project compile
Download the Artoolkit devpack for Dev-C++ from here:
http://pegasus.cc.ucf.edu/~mi872775/fil ... 2.1.DevPak
Install the devpack
Use a clean version of IrrAR (with no changes at all)
Open the IrrAR Dev-C++ project file
Change only what is necessary to make the project compile