PDA

View Full Version : Particles to objects



ideart
11-16-2017, 08:04 AM
Hello, I am stepping out of my comfort zone in LW and what I would like to ask is if it is possible to convert particles from emitters or flocking to individual nulls so I can send their motion data to After Effects.

Sensei
11-16-2017, 08:36 AM
Just a thought:
Make Null item,
go to Motion Options,
add Node Editor modifier.
Use DPont Particle Info,
use my Extended Item Info node to extract clone index,
plug to DPoint node,
extract position,
plug to Motion.
Clone it as many as you need.

prometheus
11-16-2017, 09:45 AM
Just a thought:
Make Null item,
go to Motion Options,
add Node Editor modifier.
Use DPont Particle Info,
use my Extended Item Info node to extract clone index,
plug to DPoint node,
extract position,
plug to Motion.
Clone it as many as you need.
Additionally. .without regards of which method is the best.
You can use the old fx linking..
I think it may be hidden fro the menus..so you may have to edit menus and search for fx link .
When running it..select a null..then specify/Match amount to that of the particles.
I did that to be able to break stuff based on particles..but using null as bullet kinematic force.

MonroePoteet
11-16-2017, 09:53 AM
There appear to be a couple of plug-ins available in the LW assets directory by searching on Particles, but the ones I tried seem to be 32-bit only, or don't work on LW 2015.3:

https://www.lightwave3d.com/assets/plugins/contains/particles/

The node based conversion works OK, but has a couple of drawbacks: first, if the Particles have a non-zero lifetime and vanish, the Null is reassigned to which ever Particle is closest next, and it starts jumping around as each particle vanishes. Probably adding a Logic node to dismiss any X position that's returned as zero (0) would prevent each Null from jumping around chaotically, but outside the lifespan of its associated particle it would be positioned at it's original keyframed / array-generated position.

The second drawback is that my experimental scene for a Particle Emitter (attached) only had 723 non-vanishing particles, and if I cloned 722 Nulls with the Nodal Motion setup, Layout became quite sluggish (maybe even hung) with all the node management / calculations.

The sample scenes attached (one for a Particle Emitter with 50 of the 723 Nulls, the other for a Flock) use DPKit's Item Info and Particle Info nodes, available here:

http://dpont.pagesperso-orange.fr/plugins/nodes/Additionnal_Nodes_2.html

Remember to support Denis financially if you can!

I used a simplified method from what Sensei described for determining which particle would be used for each Null's position. I positioned the initial Null at (1,0,0), set up the Nodal Motion for that null to use its X position as the index into the DP Particle Info node, and then used Array in Layout to clone the Null at 1 meter offsets. So, the cloned X position of each Null is the index into the particle system. The node setup is:

138589

If the number of particles in the target scene is quite large such that Layout becomes sluggish or hangs, the Nulls may have to be cloned and captured in phases by adding a "Base Particle Offset" scalar to be added to the Particle Index created from the X position above, and capturing the motion for (say) 50 or 100 Nulls each pass.

mTp

MonroePoteet
11-16-2017, 09:57 AM
Oh, yeah! FX_Linker! It's still available in the Utilities=>Additional pulldown, and works great. Took about 30 seconds to set up.

Sad how FX has fallen by the wayside, IMO. Nice call, prometheus.

mTp

P.S. doesn't work for Flocks, though

prometheus
11-16-2017, 10:28 AM
P.S. doesn't work for Flocks, though

correct, sadly, simple solution may be to save the flocking to a pfx file, itīs in the main properties panel of flocking (save pfx) then add a standard emitter and in the emitters edit tab..just load the saved pfx file, after that you can clone kinematic nulls for breaking stuff based on a flocking behavior or pushing with the help of bullet dynamics.


heres my old fx linking of nulls with bullet kinematics and linking to particles for breaking with bullet, a bit sad though that the particles themself canīt be used as force, as they can in modo, and this bullet stuff was recorded almost 3,5 years
Ago


https://www.youtube.com/watch?v=PSd5iN3ZWG0


If you do not have to many particles to trace and clone nulls to, then you can simply go to the particles edit tab, and
command list/make path, that will make a null based on the position of the selected single particle ..keyframe tracked.

jeric_synergy
11-16-2017, 10:35 AM
P.S. doesn't work for Flocks, though
Doesn't the flocking system have a more direct way of attaching objects to flocking agents?

prometheus
11-16-2017, 10:51 AM
Doesn't the flocking system have a more direct way of attaching objects to flocking agents?
Nodes...
various ways, in the motion options of the object to clone, nodal motion and flocking item motion and some more stuff.
Unless you are just instancing, but then you loose dynamics.

prometheus
11-16-2017, 11:14 AM
Doesn't the flocking system have a more direct way of attaching objects to flocking agents?

And back again, perhaps the most direct way is to simply go to your object to be cloned, "m" for motion options and add flocking item motion, after that you simply go to clone the object and it will automaticly assign a dedicated agent index, so the object snaps to flocking particles directly, and you can specify object clones directly in the clonenumber of clones options, so that shall work, you can use both instances or simply a clone of the object, which is needed if you need bullet dynamics, but make sure you have added the flocking item motion before cloning.

So for the thread request, that may actually be the simplest way, cloning a null which has a flocking item motion modifer in the motion options.

ideart
11-16-2017, 11:32 AM
Thank you all for your suggestions. I have some tests to make base on them.
Also I happily realize that this forum has still many helpful users.

prometheus
11-16-2017, 11:50 AM
and for following up senseis node suggestions, heres a direct link to the nodes...
http://www2.trueart.pl/?URIType=Directory&URI=Products/Plug-Ins/TrueArt%20Node%20Library

prometheus
11-16-2017, 12:05 PM
Just a thought:
Make Null item,
go to Motion Options,
add Node Editor modifier.
Use DPont Particle Info,
use my Extended Item Info node to extract clone index,
plug to DPoint node,
extract position,
plug to Motion.
Clone it as many as you need.

I donīt tthink node editor modifier is correct is it, didnīt you mean nodal motion?

Sensei
11-16-2017, 04:12 PM
I donīt tthink node editor modifier is correct is it, didnīt you mean nodal motion?

Yes. Sounds the same for me.. :)
Open Motion Options, Add Modifier, Nodal Motion, and you can make change in Node Editor.

ideart
11-17-2017, 01:48 AM
Flocking Item Motion served me great and produced the results I was after.
Thank you all for the help.

prometheus
11-17-2017, 10:29 AM
Flocking Item Motion served me great and produced the results I was after.
Thank you all for the help.

Great!

jeric_synergy
11-17-2017, 04:09 PM
Flocking Item Motion served me great and produced the results I was after.
Thank you all for the help.

Wait, you mean the nodal motion controls within the Flocking UI, or something else? Please elaborate.

ideart
11-19-2017, 04:22 AM
I have followed the solution of prometheus.
After calculating the flocking I added a null object and from Motion Options I added the "Flocking - Item Motion" modifier. Then I cloned the null manually.

prometheus
11-19-2017, 05:34 AM
Just add flocking item motion, in the nulls motion options drop down modifier list, then clone the null , when specified how many clones... enter the same amount of clones as to that of the flocking agents, it will automaticly clone each null with a unique index to correspont with each flocking agent index, thatīs it.