Introduction to Maya - Rendering in Arnold
This course will look at the fundamentals of rendering in Arnold. We'll go through the different light types available, cameras, shaders, Arnold's render settings and finally how to split an image into render passes (AOV's), before we then reassemble it i
# 1 10-06-2004 , 11:58 AM
Markuz's Avatar
Registered User
Join Date: Sep 2002
Location: Germany
Posts: 135

Galaxy Collision simulation

Hi!

https://www.realitydiluted.com/mirror.../galaxies.html

Upon this article (not really a tutorial) I want to create a galaxy collision simulation with the maya particles and force fields, but I have no idea how to create particles in form so that they look like a spiral galaxy (see article pictures)? The particle have to be one particle object, so creating them individually with a mel script won't work, right?

Maybe I should first create a thousands-particle object and then position them by an expression with poses them randomly on a spiral path and then add a random-3d-correction?? Any idea how to do that?

Any Idea how I could create a galaxy with 3 spiraling arms of particles?

Thanks for any help and advice!,

Markuz user added image

# 2 10-06-2004 , 02:32 PM
Markuz's Avatar
Registered User
Join Date: Sep 2002
Location: Germany
Posts: 135
Hi!

Ok, hab jetzt die Partikel schön als Galaxie angeordnet. Habe dazu einfach einen Emitter und ein Vortex Field genommen um anschließend nach 1000 Frames einen neuen Initial State zu definieren .... Hätt' ich auch vorher drauf kommen könnenuser added image

Naja, jetzt schlag ich mich gerade mit ner expression um:

vector $pos = Galaxy1_StarsS.position;
float $Dx = (abs(Galaxy1_Nuclei1.translateX) - abs($pos.x));
float $Dz = (abs(Galaxy1_Nuclei1.translateZ) - abs($pos.z));
float $r2 = $Dz*$Dz + $Dx*$Dx;
float $r = sqrt($r2)/10;
Galaxy1_StarsS.velocity = Galaxy1_StarsS.velocity + <<0,0,$r>>;

Galaxy1_Nuclei1 ist dabei mein Newton Field, und eigendlich sollte nun die Geschwindigkeit eines jeden einzelnen Partikels linear abhängig sein vom Abstand dieses Gravitationszentrums (mein Newton Field eben)... Aber leider weiß i´ch nicht, wie ich mit mel oder sonst wie diese Geschwindigkeit tangential ansetzen kann? Die letzte Zeile des scripts ist daher falsch, hier fliegen alle Partikel einfach nach rechts...

Wie also kann man diese proportionale Geschwindigkeit tangential an den gedachten Kreis um die Position meines Feldes mit dem Radius $r ansetzen?

MFG

Markuz


Last edited by Markuz; 10-06-2004 at 03:13 PM.
# 3 10-06-2004 , 02:35 PM
Markuz's Avatar
Registered User
Join Date: Sep 2002
Location: Germany
Posts: 135
Hi!

Ok, ich habe es jetzt über die Steigung, dann über Tan den Winkel, dann über sin bzw. cos die X- und Z-Geschwindigkeitskomponente berechnet... funzt allerdings noch immer nichtuser added image

Hab ich etwas bei meinen Berechnungen falsch gemacht? (siehe skizze)

https://markus1986.tripod.com/GalaxyProb.JPG

vector $pos = Galaxy1_StarsS.position;
float $Dx = (abs(Galaxy1_Nuclei1.translateX) - abs($pos.x));
float $Dz = (abs(Galaxy1_Nuclei1.translateZ) - abs($pos.z));
float $r2 = $Dz*$Dz + $Dx*$Dx;
float $r = sqrt($r2);

float $rmx = $r*$r - $pos.x*$pos.x;
float $Steigung = (-1)*$pos.x/(sqrt($rmx));
float $alpha = atan($Steigung);
int $k = 1;
float $Vx = cos($alpha)*$k*$r;
float $Vz = sin($alpha)*$k*$r;


Galaxy1_StarsS.velocity = Galaxy1_StarsS.velocity + <<$Vx,0,$Vz>>;

MFG und Danke für jede Hilfe!

Markuz


Last edited by Markuz; 10-06-2004 at 04:31 PM.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads