I want my wind to react to where the particle are. So if they're below P.y 0 then it pushes them up and visa versa. I've got Vop Sop to work but not the code.
My Vex is:
if P.y = < 0 {
wind.y = 1
}
else
{wind.y = -1
};
and my Pop Vop looks like this:
Is it just a personal preference to use code or nodes? And what would be the best way to approach this?
Also would you generally use a Vop Sop to effect a Pop Wind or is the Vop Sop a replacement?
Thanks
Reactive particle wind
5764 9 1- Simon Russell
- Member
- 164 posts
- Joined: Feb. 2014
- Offline
- PradeepBarua
- Member
- 443 posts
- Joined: Sept. 2012
- Offline
- PradeepBarua
- Member
- 443 posts
- Joined: Sept. 2012
- Offline
- PradeepBarua
- Member
- 443 posts
- Joined: Sept. 2012
- Offline
- PradeepBarua
- Member
- 443 posts
- Joined: Sept. 2012
- Offline
PradeepBarua
Almost all popdops have field called Use VEXpressions.
Instead of writing it in new popwrangle write it in popwind itself.
Just turn on Use VEXpressions.
here is code:
if(@P.y < 0)
wind = {0, 1, 0};
else
wind = {0, -1, 0};
- PradeepBarua
- Member
- 443 posts
- Joined: Sept. 2012
- Offline
efficient way to write if use want to use slider:
if(@P.y < 0)
wind += {0, 1, 0};
else
wind += {0, -1, 0};
this way you can control wind force by Wind Velocity parameter. It will get added to existing value.
if(@P.y < 0)
wind += {0, 1, 0};
else
wind += {0, -1, 0};
this way you can control wind force by Wind Velocity parameter. It will get added to existing value.
- Simon Russell
- Member
- 164 posts
- Joined: Feb. 2014
- Offline
- tamte
- Member
- 8532 posts
- Joined: July 2007
- Offline
if you use POP Wind and set Wind Velocity to 0,1,0
(or the y magnitude instead of 1)
then the simplest VEXpression you can do is probably
wind.y *= @P.y>0?-1:1;
also be careful when doing your own VOPs/Wrangles, @force is not behaving like wind, there is Add Wind Force VOP to mix wind forces, but anyway in many cases it's much easier to just tweak POP Wind
(or the y magnitude instead of 1)
then the simplest VEXpression you can do is probably
wind.y *= @P.y>0?-1:1;
also be careful when doing your own VOPs/Wrangles, @force is not behaving like wind, there is Add Wind Force VOP to mix wind forces, but anyway in many cases it's much easier to just tweak POP Wind
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Simon Russell
- Member
- 164 posts
- Joined: Feb. 2014
- Offline
- PradeepBarua
- Member
- 443 posts
- Joined: Sept. 2012
- Offline
-
- Quick Links