TP Splash template

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  07 July 2011
TP Splash template

This is a template of TP which add "splash" at collision point.

sample movie

sample scene


Change number of the particles.

Change X Fov of the particles in degree. Y Fov is fixed to 360 degree.

Change initial speed of the particles. Also you can set "s_variation" here.

Change life of the particles in second. Also you can set "l_variation" here.

Change friction (brake) of the particles.
  07 July 2011
Learning a lot from Part 2 and 3 of your COFFEE Node.

  07 July 2011
var nn0= 0;	//global variable, to memorize collision status

//-------------part 1, switch on PStorm, if the status is changed to 1 from 0.
	if(n_in > nn0)	sw_out= TRUE;
	else	sw_out= FALSE;
	nn0= n_in;

//-------------part 2, change particle number, by object speed, at collision.
	n_out= int(abs(vv_in)*pn_in);

//-------------part 3, arrange particle emitter, along with "collide plane".
	var mg= new(Matrix);

	var vx= vnorm(vcross(vector(0,1,0),nv_in));
	var vy= vnorm(vcross(nv_in,vx));
	mg->SetV0(vector(0,0,0));	mg->SetV2(vx);	mg->SetV3(vy);	mg->SetV1(nv_in);
	mg_out= mg;


I will add some more comments on my code. First, I am not professional programmer, so please do not believe my code as "orthodox".

1. Global variable.
If you define variables before "main()" function, it becomes global variable. And the global variable is not re-set (not initialized) at next execution of this COFFEE node. So it can keep old status and you can compare it to new status.

2. "var mg= mg_in;"
You can use also "var mg= new(Matrix);" here.

3. Direction of particle emitter.
Normally +Z is center axis of particle emitter in CINEMA 4D, and it emits particles to the +Z direction. However if I want to get "ring" like particles, there is no way to get it in X-Y plane ("dome" is possible though). It should become in Y-Z plane with "X Fov= 360, Y Fov= 0".

So I placed the particle emitter like that X axis (V1) as center, also Y (V2) and Z(V3) as vertical to it.

4. The TP ignores position (V0) part in matrix, if it is connected to "arrangement" port.

5. "vcross()" is cross products function.
It takes 2 vectors (A,B) as input, then put 1 vector (C) which is perpendicular to both A and B.

6. "vector(0,1,0)" is a vector to world zenith.
It is used as "up vector", and in this case, +Z axis is along the up vector.

Last edited by tofuji : 07 July 2011 at 02:07 PM.
  07 July 2011
Very nice thank you.

Just as an aside, I remember going through your site years ago--always full of helpful tips.
Is there an English version of your website by any chance?
  07 July 2011
Hello Joel, and thanks for your interest on my pages.

Now I am writing many tutorials for CINEMA 4D seminar by MAXON Japan. I will translate it to English, but we need Japanese version first.

However, only for additional sample files, I have already pages written in both languages.

The additional sample files are made mostly "while writing tutorials", "while having seminars" and "as an answer for questions from my students".

By the way, current my purpose to write tutorials is bit different from 10 years ago. At that time, I have made them for my study and fun. That is to say, for myself only. However, now I am making them for my students. So title or content of the tutorials may vary by requests or questions from them. And "useful" is my first priority.

So I have changed my style a bit, and started to post my sample files to 2 forums, here "CG talk (English)" and "Forum in MAXON Japan (Japanese)". This is for research and tuning of my tutorials.

As a result, the page above does not have explanation there. If you need detailed explanation on it, please refer to respective topics linked from the page.


Last edited by tofuji : 07 July 2011 at 05:21 AM.
  07 July 2011
Thank you tofuji!
Your students are lucky to have a teacher with your level of knowledge and experience.
  07 July 2011
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 08:12 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.