Continue to increment point numbers after particles die
4521 10 1- borbs727
- Member
- 29 posts
- Joined: Aug. 2014
- Offline
Hello! I've followed this tutorial [youtube.com] to create a particle simulation with instanced geometry using a copy sop. This is working well up until particles start to die. When a particle dies its point number is released and reused by another particle - causing most of the particles in the simulation to be reassigned a new number - which in turn causes some crazy jittering.
A little more detail in case my first part doesn't make sense: Each particle has the same lifespan, so my point number range is constantly 1-94. Currently, when the first particle dies, the next particle born is point number 94. Is there a way to allow the point numbers to increment continuously on the particle simulation? So when the first particle dies, the next particle born will be point number 95, then 96, 97, etc… Thanks!
A little more detail in case my first part doesn't make sense: Each particle has the same lifespan, so my point number range is constantly 1-94. Currently, when the first particle dies, the next particle born is point number 94. Is there a way to allow the point numbers to increment continuously on the particle simulation? So when the first particle dies, the next particle born will be point number 95, then 96, 97, etc… Thanks!
Edited by borbs727 - March 1, 2017 11:56:08
- Alex P Twigg
- Member
- 8 posts
- Joined: Jan. 2016
- Offline
So what you might be looking for is point ID. These aren't re-used in a particle sim. If you set the ID of the copied geo to that of the particles (you can do this on the copy sop) and change motion blur of the object to Geometry Velocity Blur this should sort you out.
The motion blur is set in the Sampling tab of the Rendering tab of the geo node you are working in.
The motion blur is set in the Sampling tab of the Rendering tab of the geo node you are working in.
- borbs727
- Member
- 29 posts
- Joined: Aug. 2014
- Offline
Hi Alex,
Thanks for the info! After doing some digging in the copy sop docs and trying out your suggestion it's still not working. This is my first time really wrapping my head around the copy sop, but I think I'm starting to get the hang of it. I've set “id” to primitive in the copy sop's attribute tab. I can see it's working in the geometry spreadsheet, but the cubes are still changing colors beginning at frame 25. I've attached an example hip.
Thanks for the info! After doing some digging in the copy sop docs and trying out your suggestion it's still not working. This is my first time really wrapping my head around the copy sop, but I think I'm starting to get the hang of it. I've set “id” to primitive in the copy sop's attribute tab. I can see it's working in the geometry spreadsheet, but the cubes are still changing colors beginning at frame 25. I've attached an example hip.
Edited by borbs727 - March 1, 2017 15:50:30
- jlait
- Staff
- 6239 posts
- Joined: July 2005
- Online
- borbs727
- Member
- 29 posts
- Joined: Aug. 2014
- Offline
jlait
Change the VEXpression in /obj/source_particles/point1 to
rand(@id)
Hi jlait,
Thanks for the tip! While that does fix the color issue, I just put the color there to illustrate that the geometry was jumping. I want to make sure that the geo is copied to the particles by ID, not point number (I'm not quite sure how to go about doing that).
If you turn on the primitive number visibility you'll see that the geo is following the particles fine until frame 25, then they start to change every frame as the particles start to die.
Edited by borbs727 - March 1, 2017 17:51:45
- friedasparagus
- Member
- 402 posts
- Joined: June 2014
- Offline
- Alex P Twigg
- Member
- 8 posts
- Joined: Jan. 2016
- Offline
- borbs727
- Member
- 29 posts
- Joined: Aug. 2014
- Offline
Actually, I was fooled! Turning reap off fixes the jitter, but once I start deleting partiles/geo using @dead>1 the physical geo still jumps around to the changing point numbers. The colors remain tied to the ID which made me think the issues was resolved. When I went back and took a look at the prim numbers they started to change once particles were removed.
Edited by borbs727 - March 2, 2017 13:40:50
- borbs727
- Member
- 29 posts
- Joined: Aug. 2014
- Offline
Alex Twigg2
As far as I know you can't copy using anything other than the point number. What is it that you want to happen to the geo when the particle dies? Do you want it to die as well or do you want it to hang around?
When the particles die I'd like the copied geo to die with it. I've attached a new example file below that better illustrates the jumping/jitter I've been talking about. I've also attached some visuals too if that helps.
EXAMPLE
I did a small scale test with a burst of 4 particles. Lets say I start off with 3 particles moving through space (see attached image). Each numbered shape corresponds to copied geo. The number is the point number.
The left side is what I'm getting, the right side is what I want to happen.
Notice on frame 3, when particle 0 should be dead, particle 3 is actually the particle that is killed (along with the copied geo on it). The geo copied to particle 0 and should have died, but instead it jumps to the new particle 0.
Edited by borbs727 - March 2, 2017 14:53:06
- Andy_23
- Member
- 918 posts
- Joined: March 2014
- Offline
- borbs727
- Member
- 29 posts
- Joined: Aug. 2014
- Offline
-
- Quick Links