Magic Particles 3D Usage

All information about Magic Particles: news, question, comments, etc.

Magic Particles 3D Usage

Postby JSanderson » Wed Apr 03, 2013 11:53 pm

Hey all.

We're having a problem using 3D emitters. When placing a 3D emitter, the position and rotation and scale seem to be incorrect. If we spawn a 2D emitter instead, giving it the same position, the 2D emitter shows up as expected.

Is there anything special that needs to be done to make 3D particles work correctly? We are using the 3D version of the library and have 2D particles working correctly in other places.

Help would be much appreciated.
JSanderson
 
Posts: 3
Joined: Wed Apr 03, 2013 7:11 am

Re: Magic Particles 3D Usage

Postby Odin_KG » Thu Apr 04, 2013 2:08 am

Hey

Perhaps you need to call Magic_SetViewMatrix for 3D. This function transfers the camera position to API.
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: Magic Particles 3D Usage

Postby JSanderson » Thu Apr 04, 2013 3:43 am

Magic_SetViewMatrix is definitely being called. The same render path is taken through our code to render, all we do is change the emitter requested from the API. In the beginning of our render call, it always calls Magic_SetViewMatrix.

Do 2D particles not use the view matrix? If they do use the view matrix, then it would suggest that the view matrix is correct because a 2D emitter instead of a 3D emitter renders where I expect it to render.
JSanderson
 
Posts: 3
Joined: Wed Apr 03, 2013 7:11 am

Re: Magic Particles 3D Usage

Postby Odin_KG » Thu Apr 04, 2013 5:53 am

Do 2D particles not use the view matrix?

2D particles use the view matrix not always. It depends on the orientation of the surface of 2d particles. But you can check this situation easily if you do not call Magic_SetViewMatrix.
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: Magic Particles 3D Usage

Postby JSanderson » Thu Apr 04, 2013 11:38 pm

If I do not call SetViewMatrix, the no particles draw on-screen - not even the 2D ones.

Are there any other ways that 3D particles work differently to 2D particles?
JSanderson
 
Posts: 3
Joined: Wed Apr 03, 2013 7:11 am

Re: Magic Particles 3D Usage

Postby Odin_KG » Fri Apr 05, 2013 1:40 am

Are there any other ways that 3D particles work differently to 2D particles?

It seems to me NO.

You may compare your code with the wrapper code: http://astralax.com/wrapper
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: Magic Particles 3D Usage

Postby jasmine78888 » Fri Jun 28, 2013 11:49 am

it is really nice post i like this info i appreciate this post keep it up......... :lol:
jasmine78888
 
Posts: 1
Joined: Fri Jun 28, 2013 11:46 am


Return to Magic Particles

Who is online

Users browsing this forum: No registered users and 6 guests

cron