Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 Does spark work with Irrlicht 1.8?

Go down 
3 posters
Go to page : Previous  1, 2, 3, 4, 5, 6  Next
AuthorMessage
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeThu Feb 06, 2014 4:22 am

Hey I figured it out, I was looking more closely at the example and after the node system is created it's dropped
Code:
system->drop();

so before this line is where any movement of any kind should be done so I move the node then call to update it's position and everything works fine. Thanks once more.
Back to top Go down
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeThu Feb 06, 2014 5:36 am

I'm having trouble attaching to a node.

Code:
core::vector3df Head_Position = node->getJointNode("bip01_head")->getAbsolutePosition();
node->getJointNode("bip01_head")->addChild(system);

No matter how I try to do these the system node will not link to any node??

I think it has to do with this line

scene::CSPKParticleSystemNode* system = new scene::CSPKParticleSystemNode(smgr->getRootSceneNode(), smgr);

Any suggestion?
Back to top Go down
Darktib
Committer
Darktib


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeThu Feb 06, 2014 5:47 am

1/ Glad you sorted your position problem !

2/ Normally it should reparent with add_child, but I'm not sure, at least you can set the parent when you create the system. I will investigate this.
Back to top Go down
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeThu Feb 06, 2014 5:59 am

Yeah you can set the system node position manually by passing the float's, but If you try to pass a node or joints position it seems to have no effect so you can't have the system node follow anything. I've even tried to parent the system to a dummy node and then pass all my transformations to the dummy node and not the system node itself and that had no effect either.

Hope you can find a fix. Other than that it's a great library lots of neat little features.
Back to top Go down
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeThu Feb 06, 2014 7:36 am

Hey noticed in spark 1.5 you can set a sprite sheet texture parameter to 0.0,4.0 meaning 4 individual sprites. But in spark 2 I don't see the method
Code:
****->setParam(PARAM_TEXTURE_INDEX,0.0f,4.0f);
. How do you set this in spark2?
Back to top Go down
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeFri Feb 07, 2014 4:40 am

Hey Darktib I got all my previous issues in the above post worked out ^^ just wondering if you found a fix for attaching to a node yet?
Back to top Go down
Darktib
Committer
Darktib


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeFri Feb 07, 2014 5:46 am

1/ Still not found the time the deeply investigate. That will probably wait this week-end.
2/ Texture index is "texture atlas" now, you set it the same way than the particles color (for example)

Glad you figured out your issues !
Back to top Go down
granyte




Messages : 53
Date d'inscription : 2012-06-23

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeSat Feb 08, 2014 6:51 pm

and for removing it to i'm having issues removing particle scene nodes from the scene


also an other issue is removing an emitter scene node without removing the whole particle scene node
Back to top Go down
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeSun Feb 09, 2014 2:23 am

Let me know if any of you guys fix the issue of assiging a parent node or a constant poition
Back to top Go down
Darktib
Committer
Darktib


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeSun Feb 09, 2014 4:52 pm

I'm getting closer to the bugs, but to fix it faster I need:

1/ @The_Glitch: the code in which you create the CSPKIrrSceneNode (to be honest, post as much code as you can Wink)
2/ @granyte: the code in which you create the nodes and the code in which you remove them (same comment as for The_Glitch).
Also, please note that as a workaround you can simply disable an emitter (the node is still here, but the emitter won't emit particles until you re-enable it).

Thanks !
Back to top Go down
granyte




Messages : 53
Date d'inscription : 2012-06-23

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeSun Feb 09, 2014 8:47 pm

Ill post code tomorrow

Sadly i cannot only disable the emiters as they are created and destroyed with the projectiles in my game.
Back to top Go down
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeSun Feb 09, 2014 11:37 pm

I'll post mine. Mines mostly the spark Irrlicht examples. I'm using them to get a hang of spark library.


http://www.mediafire.com/view/t867e185fr47e3y/SPKTestIrrlicht_Controllers.cpp


Heres a link to the main cpp so you see everything I do. It's a real small file.
Back to top Go down
Darktib
Committer
Darktib


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeMon Feb 10, 2014 6:33 am

Thanks for the code, is it possible to post the media files ? (especially the 3d model)
Back to top Go down
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeMon Feb 10, 2014 6:55 am

I can later not @ my pc. The model shouldnt change the results as my irrlicht node dont have the poisitioning issue.
Back to top Go down
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeMon Feb 10, 2014 7:11 am

Hey for faster results use the dwarf model that comes with irrlicht & try to attach the particle node to lets say his hand by passing the skin mesh get bone node and it shouldnt work and show the resulting issue.
Back to top Go down
Darktib
Committer
Darktib


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeMon Feb 10, 2014 7:57 am

Ok, will do for the moment.
Back to top Go down
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeMon Feb 10, 2014 8:04 am

Alright both models are .x format, so you should have the same outcome
Back to top Go down
granyte




Messages : 53
Date d'inscription : 2012-06-23

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeTue Feb 11, 2014 1:41 pm

singlularity array
Code:

       core::array<CSPKParticleSystemNode*> Singularity;


how they are created
Code:
SPK::Ref<SPK::System> sys = CreateGalaxy(parent->Enginefw);
       irr::scene::CSPKParticleSystemNode* BH =new irr::scene::CSPKParticleSystemNode(sys, parent, parent->getSceneManager(),false,ID_IsNotPickable);

   Singularity.push_back(toadd);


how they are destroyed
Code:
for (int i = 0; i < Singularity.size(); i++)
   {

      Singularity[i]->remove();
   Singularity[i]->drop();

   }
Singularity.clear()

ill post the code for the emitter objects later
Back to top Go down
Darktib
Committer
Darktib


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeTue Feb 11, 2014 6:38 pm

Normally deleting a CSPKParticleSceneNode should remove the spark system AND the irrlicht node, meaning that you don't see it anymore after that.

However, CSPKObjectNode is a different beast, it is just a convenience node for manipulating SPARK objects, it does not create nor destroy them. So, deleting a CSPKObjectNode<Emitter> will not remove the emitter (just the Irrlicht node).
To fully remove an emitter, you should destroy any CSPKObjectNode associated with it, and then remove the emitter from any groups it is in (so the refcount mechanism will delete it).
Back to top Go down
Darktib
Committer
Darktib


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeTue Feb 11, 2014 6:41 pm

@The_Glitch: Had little time to investigate the link to limb code.

But from my tests, it links correctly to the right parent (and the position is computed considering that). However, there was an offset between the parent and the system, I will see why. Tell me if that was your problem or not.
Back to top Go down
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeWed Feb 12, 2014 5:49 am

Well for me If I try to attach to lets say head bone node through skin mesh method. The particle node is way above he's head a big offset. But I also noticed while the character is animating in place the particle node doesn't move at all so I figured it wasn't working.
Back to top Go down
Darktib
Committer
Darktib


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeWed Feb 12, 2014 6:06 am

I will test it further (at least for the offset). Maybe the head bone was not moving ? I tried left and right hands of the dwarf.
Back to top Go down
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeWed Feb 12, 2014 6:10 am

Well let me ask this how are you attaching your particle node. In the stock spark example the particle node is system. So assuming that could you post yours maybe I'm doing something different.
Back to top Go down
Darktib
Committer
Darktib


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeWed Feb 12, 2014 6:13 am

I just used the code you posted, and changed the name of the 3d models and the name of the joint.
Back to top Go down
The_Glitch




Messages : 69
Date d'inscription : 2014-01-17

Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitimeWed Feb 12, 2014 6:14 am

hmmm let me assign mine to his hand or foot. be right back
Back to top Go down
Sponsored content





Does spark work with Irrlicht 1.8? - Page 4 Empty
PostSubject: Re: Does spark work with Irrlicht 1.8?   Does spark work with Irrlicht 1.8? - Page 4 Icon_minitime

Back to top Go down
 
Does spark work with Irrlicht 1.8?
Back to top 
Page 4 of 6Go to page : Previous  1, 2, 3, 4, 5, 6  Next
 Similar topics
-
» DIRECTION_ALIGNED doesn't work in Irrlicht
» IRRSystem scale doesn't work?
» irrlicht and iPhone
» SPARK Demo Irrlicht - Unresolved externals
» One issue on explosion demo of SPARK using Irrlicht as a renderer?

Permissions in this forum:You cannot reply to topics in this forum
 :: English Forum :: Questions (en)-
Jump to: