Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Tue Mar 19, 2024 10:13 am

All times are UTC




Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Tue Jun 17, 2008 3:38 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
this and other similar offset commands need extend. When is created offset on ode sphere, offset point is rotated too, and this isn't good always. One more argument is needed - LOCAL_OFFSET or WORLD_OFFSET or APPLY_OFFSET_AFTER_TRANSFORMATION or APPLY_OFFSET_BEFORE_TRANSFORMATION.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 17, 2008 5:52 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Can you detail more precisely ?

How do you add on offset to an ode sphere ? Why ?

Have a nice day
Ouille


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 17, 2008 6:34 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
He wants to add a particle system to a wheel in the contact point (or in a point in the surface of the wheel)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 17, 2008 6:35 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
For example i need add particle emitter to a bottom of the wheels. ( for dust emitting), because wheel is as sphere the particle emitor is rotated too, nice effect but not for me :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 17, 2008 7:06 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
Second problem: when is particle assigned to ODE with one from this commands:

raydium_ode_element_particle (int elem, char *filename)
raydium_ode_element_particle_name (char *elem, char *filename)
raydium_ode_element_particle_offset (int elem, char *filename, dReal * offset)
raydium_ode_element_particle_offset_name (char *elem, char *filename, dReal * offset)
raydium_ode_element_particle_offset_name_3f (char *elem, char *filename, dReal ox, dReal oy, dReal oz)
raydium_ode_element_particle_point (int elem, char *filename)
raydium_ode_element_particle_point_name (char *elem, char *filename)

is impossible get back particle ID for changes on a fly with standart particle commands.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 17, 2008 7:07 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Ok.

Why don't you attach particule emitter to the body of the car with an offset corresponding to the wheel bottom.

Is it a solution ?


Have a nice day

Ouille.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 17, 2008 7:14 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
answer is very easy, because body has only one position => same offset for all sides

wheels are independed between per se and

Question isn't why i need this, main problem is that is a development and creativity limitation.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 17, 2008 7:22 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,


About particule id:

You can use:
Code:
raydium_particle_generator_find


and
Code:
raydium_particle_generator_load
return particule id.

at least it is what i find in the source code.

Have you source sample with problem ?

About offset:
I'm not a very active particule user,

I'll try to have a look at this.
But i must admit i don't really understand your answer sorry.

I make some test and try to answer deeply.


Have a nice day.

Ouille


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 17, 2008 7:46 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
Page:

https://sourceforge.net/projects/raykartracing/

SVN

https://raykartracing.svn.sourceforge.net/svnroot/raykartracing


Code:
raydium_particle_generator_find


yes this is OK but ode_particle dont use particle ID :) only string !!! and then when is assigned for example same prt file like this:

raydium_ode_element_particle_name(CAR.wheel_A.name,"dust.prt");
raydium_ode_element_particle_name(CAR.wheel_B.name,"dust.prt");
raydium_ode_element_particle_name(CAR.wheel_C.name,"dust.prt");
raydium_ode_element_particle_name(CAR.wheel_D.name,"dust.prt");

how many IDs are returned when i use raydium_particle_generator_find("dust.prt") ;)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 17, 2008 8:39 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Particule generator name is derived from element name.

So in rkr_kart.c line 284:
Code:
    CAR.wheel_A.particle_id = raydium_particle_generator_find(CAR.wheel_A.name);
    CAR.wheel_B.particle_id = raydium_particle_generator_find(CAR.wheel_B.name);
    CAR.wheel_C.particle_id = raydium_particle_generator_find(CAR.wheel_C.name);
    CAR.wheel_D.particle_id = raydium_particle_generator_find(CAR.wheel_D.name);


Return good id to work with particule.

At this stage you can work with each generator.

As an element can only handle one particule generator, forget my first proposal (add particule to body).

I'll try to look at code to add a local_offset, but i don't know if it will be possible without breaking lot's of things.

Have a nice day
Ouille


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 17, 2008 9:05 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
ouille wrote:
Hello,

Particule generator name is derived from element name.

So in rkr_kart.c line 284:
Code:
    CAR.wheel_A.particle_id = raydium_particle_generator_find(CAR.wheel_A.name);
    CAR.wheel_B.particle_id = raydium_particle_generator_find(CAR.wheel_B.name);
    CAR.wheel_C.particle_id = raydium_particle_generator_find(CAR.wheel_C.name);
    CAR.wheel_D.particle_id = raydium_particle_generator_find(CAR.wheel_D.name);


Return good id to work with particule.

At this stage you can work with each generator.

As an element can only handle one particule generator, forget my first proposal (add particule to body).

I'll try to look at code to add a local_offset, but i don't know if it will be possible without breaking lot's of things.

Have a nice day
Ouille



THX .. for now is good way for my.


Top
 Profile  
 
 Post subject: LOCAL OFFSET
PostPosted: Wed Jun 18, 2008 9:08 am 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

LOCAL_OFFSET will be very hard to implement.

Particule generateur are updated (ode.c line 3532) according to element position and rotation.

But there is only one kind of rotation that need to be neglicted. I think it's quite impossible in the reference of the wheel. It's only possible in the reference of the car.

I see three solutions: modify raydium to allow more particle emitter for one object.

Add dummy object to the car just for particle emitting.

Move particle emitter at each frame (perhaps getting information from contact points between wheels and ground).


Have a nice day
Ouille


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 18, 2008 9:38 am 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
OK:

Quote:
Add dummy object to the car just for particle emitting.


.. this is good, but only on corps or suspensors.

last ? how to add dummy node without ODE interraction?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 18, 2008 9:44 am 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Quote:
how to add dummy node without ODE interraction?


It's not really easy in fact.

You can add an object with small mass to the body of your car. You can also filter collisions (as for the "balancier").

Dummy object not really exist with ode.

Particule emitting on contact point seems the better way IMHO.

Have a nice day
Ouille


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 18, 2008 9:46 am 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
thx.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group