CGTalk > Software Specific Forums > Autodesk 3ds max > Particle Flow
To minimize the ads you see on this page create a CGTalk account and log in HERE
reply share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 05-05-2014, 03:30 AM   #1
AlvaroMoreira
Frequenter
 
AlvaroMoreira's Avatar
portfolio
Alvaro Moreira
Brazil
 
Join Date: Apr 2013
Posts: 246
Align Particles by Object Normals

Is there a way to align the particles by an objects normals and keep it aligned while the particles walk around?

I'm trying to make some ants run over a cubes surface. They have to stay aligned by speed space follow while they walk all around the cube. I'm trying some RnD with teapots for now.

I tried with data ops, getting the surface normal and the objects closest point but i have no idea on how to use it properly with the rotation.

The scene can be downloaded here:
http://www.4shared.com/rar/ew4J2pp2ba/ants.html

And thats whats going on:


Thank's in advance

Alvaro
__________________
Alvaro Moreira

Particle-Skull.com
 
Old 05-14-2014, 06:57 PM   #2
Paradyce
Frequenter
 
Paradyce's Avatar
portfolio
Robert Dyce
3D Designer / Post Production generalist
Elara Systems
Sacramento, United States
 
Join Date: Apr 2005
Posts: 168
Me too me too!

Me too!

I too would love some data op instruction on how to control speed / orientation based off of a surface. Something akin to speed by surface + orient to surface but with box 3.

Anyone out on the interwebs willing to provide some insight?

Thanks!
Bob Dyce
 
Old 05-18-2014, 01:12 AM   #3
JohnnyRandom
Configurator
 
JohnnyRandom's Avatar
portfolio
John Rand
still wandering the binary void
salt lake city, USA
 
Join Date: Oct 2003
Posts: 4,998
Aligning to the normal is easy, everything else is a pain this the A.

https://vimeo.com/95621202
Attached Files
File Type: zip max2014_PF_AnimatedAlignToNormal.zip (37.4 KB, 115 views)
__________________
poof ~>Vimeo<~
 
Old 05-18-2014, 01:25 AM   #4
AlvaroMoreira
Frequenter
 
AlvaroMoreira's Avatar
portfolio
Alvaro Moreira
Brazil
 
Join Date: Apr 2013
Posts: 246


Thank's man! I'll check it later
__________________
Alvaro Moreira

Particle-Skull.com
 
Old 05-19-2014, 07:47 PM   #5
Paradyce
Frequenter
 
Paradyce's Avatar
portfolio
Robert Dyce
3D Designer / Post Production generalist
Elara Systems
Sacramento, United States
 
Join Date: Apr 2005
Posts: 168
That is so cool!

I just pulled down the file and was playing with the Box3 op - good stuff. Could you help me understand a couple things you did?

Questions:
1. You are piping 'Objects Timing' into the point position, point normal and object TM - Why / What does this do?

2. It looks like you're aligning the particles initial XYZ rotations to the closest point normal, then from those three, switch (choosing z in this case) to align to single axis? Would/could you just wire of the Z axis, but by hooking up all three axis to a switch you can easily change orientation with the switch?

3. The functions that overwrites M2.T with point position vector - What is this for? Does this pipe particle position back into the transformation matrix?

4. Does adding the Object TM matrix (converted to Quat) with the normal aligned matrix (converted to Quat) allow you to move the chamfer box around/rotate it? It basically just adds whatever movement or rotation into the particles?

Once again, that you so much.
If you're going to Siggraph, beers are on me!

Thanks,
Bob Dyce
 
Old 05-21-2014, 04:16 AM   #6
JohnnyRandom
Configurator
 
JohnnyRandom's Avatar
portfolio
John Rand
still wandering the binary void
salt lake city, USA
 
Join Date: Oct 2003
Posts: 4,998
Quote:
Originally Posted by Paradyce
That is so cool!

I just pulled down the file and was playing with the Box3 op - good stuff. Could you help me understand a couple things you did?


Thanks Glad it is helpful. You give me more credit than I deserve. I use this op all over I it gets things and looses things, LOL I have a dozen different versions of it. This operator isn't scene specific, all the excess in it were for other reasons/issues that I have run into in different circumstances. I will try and explain the best I can.

Quote:
1. You are piping 'Objects Timing' into the point position, point normal and object TM - Why / What does this do?


Timing doesn't really mean much in this case, the Lock and Bond takes care of it. If you turn the Lock and Bond off and disable the mP ops, disconnect the timing and disable the input, you will notice that the teapots will now spin on the set axis. It is simply making sure that the object timing and the particle normal/position timing are all in sync.

Quote:
2. It looks like you're aligning the particles initial XYZ rotations to the closest point normal, then from those three, switch (choosing z in this case) to align to single axis? Would/could you just wire of the Z axis, but by hooking up all three axis to a switch you can easily change orientation with the switch?


Well it currently matches the local particle axis of X, Y, or Z to the point normal and normals are z up in max. The exposed switch is so you can choose the particle object up axis. Maybe I don't exactly understand what you are asking?

Quote:
3. The functions that overwrites M2.T with point position vector - What is this for? Does this pipe particle position back into the transformation matrix?


The point position is redundant, it works without it. A holdover from maxscript maybe, in which you need to write your value to a matrix variable then write that into the particle matrix. EDIT: Ah the Point Position was wired to an Out Position Vector which was keeping on point, from another scene.

Quote:
4. Does adding the Object TM matrix (converted to Quat) with the normal aligned matrix (converted to Quat) allow you to move the chamfer box around/rotate it? It basically just adds whatever movement or rotation into the particles?


That again is from a different setup. I was having troubles aligning the particle to an object that was offset from world center and adding its transform to the particles transform had fixed it.


BTW Khye has some really good tuts on vimeo that deal with rotation, really well done, a very solid approach: LookAt Operator series - https://vimeo.com/70794736
__________________
poof ~>Vimeo<~

Last edited by JohnnyRandom : 05-21-2014 at 04:27 AM.
 
Old 06-06-2014, 05:56 AM   #7
AlvaroMoreira
Frequenter
 
AlvaroMoreira's Avatar
portfolio
Alvaro Moreira
Brazil
 
Join Date: Apr 2013
Posts: 246
Hey John, just got some time to study it today. It's perfect, thank's!

Im not sure about only one thing. The function Align M2.Z to V1, align all the Z components of the Matrix or just the Rotation ones to the vector? What does that vector values really means? It's like roll, pitch and yaw?

I cleaned your system a little bit. If anyone else wants to study it, this one looks a bit simplier.
https://www.dropbox.com/s/y24ho8y1r...ts%20Normal.rar

https://www.dropbox.com/s/8e8rrjeg1...n-to-Normal.jpg

and I ended up with this



Thank's again John, i'm learning a lot with your content.
__________________
Alvaro Moreira

Particle-Skull.com

Last edited by AlvaroMoreira : 06-06-2014 at 06:01 AM.
 
Old 06-06-2014, 06:09 AM   #8
JohnnyRandom
Configurator
 
JohnnyRandom's Avatar
portfolio
John Rand
still wandering the binary void
salt lake city, USA
 
Join Date: Oct 2003
Posts: 4,998
Oh you just removed the options to set the nodes up axis, the other stuff was for aligning still particles to a local offset object, something I was working on but never quite finished.

The Align M2.Z is grabbing the point normal vector from the geometry and aligning the particle to it assuming that Z is the particle up axis.
__________________
poof ~>Vimeo<~
 
Old 06-06-2014, 01:43 PM   #9
AlvaroMoreira
Frequenter
 
AlvaroMoreira's Avatar
portfolio
Alvaro Moreira
Brazil
 
Join Date: Apr 2013
Posts: 246
Ah ok, thank's
__________________
Alvaro Moreira

Particle-Skull.com
 
reply share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 07:02 AM.


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