Showing posts with label copy stamp. Show all posts
Showing posts with label copy stamp. Show all posts

Friday, 21 February 2020

time shifting copy stamps

Needed to time offset an alembic which was being copy-to-points.
The methodology is the same as a previously posted thing, but the copy-to-points node needs to be situated inside the For Each loop



if you squint, you'll see there's an attribrandomize node. I've made an integer attribute called TimeOffset and ..randomised it..
In the timeshift node, I make a spare input and point it to ../PT, which holds said TimeOffset values

The value for the timeshift is : $FF+point(-1, 0, "timeOffset", 0)

so, we take the current frame and add the individual time offset value to it.

Shweet.

Thursday, 18 April 2019

Copying different objects to points

Sometimes you need to copy a bunch of different objects to points. Eg. You have 5 variations of wood splinters and you're emitting them from a snapping plank.
Instead of using the slower copy stamp with random point values, you can use a ForEach loop and a Switch node..and of course a point wrangle.

Connect the objects to the Switch node. In a point wrangle, give each point an (random) integer value (eg "instanceID") ranging from 0 to the number of objects you have.
Make a ForEach network and connect the Point wrangle into the top. Create a null node directly after the start of the Foreach Begin. This will be a "temporary holder" node. It will carry the instanceID value to the Switch node. I've called it PT
The clever bit happens in the Switch node. In the parameter window, click on the cog wheel and add a Spare Input. This will create a new dialog box called Spare Input 0. Type in:

../PT

This will point the spare input to our temporary null & its instanceID value.
In the Select Input dialog box, type

point(-1, 0, "instanceID", 0)

here we are telling the Switch node to get a point attribute from input -1 (which is the spare dialog....which is pointing to the PT temporary null..). The attribute in question is instanceID.. NICE.
A purple arrow going from PT to Switch should have appeared now. This represents that link we've just made.

All that is left to do is to create a Copy To Points node & put the Switch output into the objects input & plug PT into the points input. Finally plug the output of all of that into the Foreach End.

Thursday, 9 November 2017

alternative to copy stamping

Copy Stamping is a bit slow, here's another way of copying things using point attributes.
EG - a bunch of points comprising of cubes, spheres and donuts.


  1. get a bunch of points!
  2. give them an id attribute eg 1,2,3,4..which will represent cube,sphere,donut. The attribute randomise node is quite good for this. There is a setting called Discrete Values which you can tweak with weighting. Eg. 20% value 1, 40%value 2, 40% value 3. Lets call the attribute ID
  3. Create a For-Each-Loop network. Set the mode to "points". By default it is set to process "pieces". Uncheck the use "name" bit. This is to do with the fracturing rigid body workflow.
  4. Connect the cube, sphere and donut to a switch node. In the index box type: point("../foreach1/",0,"ID",0)    this references the current point being processed by the foreach loop and reads it's corresponding ID value.
  5. Inside the foreach loop add a "copy to points" node. Connect the switch node to this.
  6. This should all work now!