Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Count node

  1. #1
    Respect The Architect Limbus's Avatar
    Join Date
    Apr 2003
    Location
    Bremen / Germany
    Posts
    1,232

    Count node

    Hi,
    I am looking for a way to add the ouptut values of node to a variable and use that variable value later on.

    I have a distance node that outputs the (doh) distance of an object between frame n and n-1. Now I want to add up those numbers.

    It sounds like Poms Counter Node would do this but it only outputs 0. Maybe it does not work in the displacement node editor.

    Any help on how this could be resolved would be appreciated.

    Cheers, Florian
    3DGrafikvonBehr
    Sys: 2x Mac Pro, 8x 2.8 Ghz, GeForce 8800 GT, 10 GB RAM, Mac OS X 10.5.5 and Vista Business 64

  2. #2
    obfuscated SDK hacker Lightwolf's Avatar
    Join Date
    Feb 2003
    Location
    Stuttgart, Germany
    Posts
    13,585
    How do you want to add them up, and what do you mean by later on?

    Cheers,
    Mike

  3. #3
    Respect The Architect Limbus's Avatar
    Join Date
    Apr 2003
    Location
    Bremen / Germany
    Posts
    1,232
    Quote Originally Posted by Lightwolf View Post
    How do you want to add them up, and what do you mean by later on?
    Hi Mike,
    I basically want the value to increase as long as the null object moves so I can drive the rotation of an object via the Part move node with it.

    If I just use the distance, the object rotates ahead and back but I only want it to rotate ahead. That why I need the number to increase.

    So I basically want a way to calculate the distance traveled by the null.

    Cheers, Florian
    3DGrafikvonBehr
    Sys: 2x Mac Pro, 8x 2.8 Ghz, GeForce 8800 GT, 10 GB RAM, Mac OS X 10.5.5 and Vista Business 64

  4. #4
    obfuscated SDK hacker Lightwolf's Avatar
    Join Date
    Feb 2003
    Location
    Stuttgart, Germany
    Posts
    13,585
    Quote Originally Posted by Limbus View Post
    So I basically want a way to calculate the distance traveled by the null.
    Bingo, gotcha. Hm, I can't think of a simple way.
    You might be able to use relativity to drive another null by the distance travelled of your null, then use the relativity nulls position in your set-up.
    Not pretty, but it ought to work as displacements get evaluated after motions.

    Edit: "might" as in: I think Relativity has a function for that, but I don't remember using it myself.

    Cheers,
    Mike

  5. #5
    Respect The Architect Limbus's Avatar
    Join Date
    Apr 2003
    Location
    Bremen / Germany
    Posts
    1,232
    Sounds like the typical LW hack way of doing things ;-)

    Thanks, I'll check that out. Guess I could just hand animate the rotation instead but thats no fun.

    Cheers, Florian
    3DGrafikvonBehr
    Sys: 2x Mac Pro, 8x 2.8 Ghz, GeForce 8800 GT, 10 GB RAM, Mac OS X 10.5.5 and Vista Business 64

  6. #6
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,884
    You know of course that things like that won't work on renderfarm? Not even when you press F9.. You must use full image sequence F10, to render it correctly, each time..

  7. #7
    I'm not sure, and Dpont might be gone for a while, but maybe Mike, Sensei or somebody else could say if Dpont's "Motion Info" node might help, it has a "Use parent" option. Check out this post: link.

    (Mind you, it's the latest update of the plugin, and Dpont's website is not available right now.)

  8. #8
    obfuscated SDK hacker Lightwolf's Avatar
    Join Date
    Feb 2003
    Location
    Stuttgart, Germany
    Posts
    13,585
    Quote Originally Posted by serge View Post
    I'm not sure, and Dpont might be gone for a while, but maybe Mike, Sensei or somebody else could say if Dpont's "Motion Info" node might help, it has a "Use parent" option. Check out this post: link.

    (Mind you, it's the latest update of the plugin, and Dpont's website is not available right now.)
    Not by the looks of it, it only computes the speed, not the distance travelled.

    Basically (beware, pseudo code!):
    Code:
    speed (per frame) = current position - position at previous frame
    speed (per second) = current position - position one second ago
    Distance travelled would be:
    Code:
    distance = 0
    for every frame from the current to the first
      distance = distance + (current position - position at previous frame)
    Which can be quite slow to compute at later frames in the animation.

    Cheers,
    Mike
    Last edited by Lightwolf; 03-31-2010 at 07:36 AM.

  9. #9
    Or... you can try this...




    Edit: sry, suggestive thread title.
    Last edited by probiner; 03-31-2010 at 08:36 AM.

  10. #10
    Quote Originally Posted by probiner View Post
    Edit: sry, suggestive thread title.
    Ah, now I get it, duh. LOL


    Thanks for the info Mike!

    Reading Limbus's post again, he says:

    "I basically want the value to increase as long as the null object moves ...".

    To get info for whether or not the null object moves is simple: use two of Dpont's Item Info nodes (with time input), of which one has a time delay of 1 frame (time input = -0.0333). Plug the position outputs into a Logic node which says: A is equal to B, if True 0, if False 1.0. Now you have an output of 1.0 if the null object is moving.
    But this is where I get stuck. The object (part) needs to rotate every frame based on this info, but it needs to rotate on top of the rotation of the previous frame.
    Last edited by serge; 03-31-2010 at 09:44 AM.

  11. #11
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,884
    Quote Originally Posted by serge View Post
    To get info for whether or not the null object moves is simple: use two of Dpont's Item Info nodes (with time input), of which one has a time delay of 1 frame (time input = -0.0333).
    Easier is downloading TrueArt's Node Library and using Extended Item Info > Speed input..

  12. #12
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,963
    Quote Originally Posted by Limbus View Post
    ...So I basically want a way to calculate the distance traveled by the null.
    If your Null has keyed motion,
    the Distance output of Motion Info node
    does it, if you don't apply expressions to
    the NULL, there's also an option to store
    this motion, this avoids recalculation for
    each frame.

    Denis.

  13. #13
    Super Member Captain Obvious's Avatar
    Join Date
    Dec 2004
    Location
    London
    Posts
    4,502
    Quote Originally Posted by Sensei View Post
    Easier is downloading TrueArt's Node Library and using Extended Item Info > Speed input..
    And then deleting two thirds of your images and reducing the subdivision level to one, because it only runs in 32-bit mode.
    Are my spline guides showing?

  14. #14
    Quote Originally Posted by Sensei View Post
    Easier is downloading TrueArt's Node Library and using Extended Item Info > Speed input..
    Thanks Sensei.

    Quote Originally Posted by dpont View Post
    If your Null has keyed motion,
    the Distance output of Motion Info node
    does it, if you don't apply expressions to
    the NULL, there's also an option to store
    this motion, this avoids recalculation for
    each frame.

    Denis.
    Thanks Denis!

    Yeah this works. In case of this nodal setup (see attachment), the parts will rotate in pitch direction, based on the distance the null (Motion Info) has covered.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Untitled-1.jpg 
Views:	211 
Size:	39.3 KB 
ID:	83666  

  15. #15
    Respect The Architect Limbus's Avatar
    Join Date
    Apr 2003
    Location
    Bremen / Germany
    Posts
    1,232
    Thanks Denis. I just found this node and it works as advertised.

    Quote Originally Posted by dpont View Post
    If your Null has keyed motion,
    the Distance output of Motion Info node
    does it, if you don't apply expressions to
    the NULL, there's also an option to store
    this motion, this avoids recalculation for
    each frame.
    3DGrafikvonBehr
    Sys: 2x Mac Pro, 8x 2.8 Ghz, GeForce 8800 GT, 10 GB RAM, Mac OS X 10.5.5 and Vista Business 64

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •