Particle max speed and Cd attribute material base color

   441   2   0
User Avatar
Member
10 posts
Joined: Feb. 2024
Offline
Hi everyone! I would like to ask for help with two things. One of them is, in my opinion, a simpler issue, but I cannot solve it myself, neither from tutorials nor from videos. The essence of it is that each particle will become a drone in reality. It's important that they don't collide. This is solved with a popnet to maintain the distance between them. There might be some unnecessary elements that are not important for the transformation, but I worked from a tutorial so I don't know what I can delete from it. The simpler task is that when I export it to FBX, it should carry the material to Blender. There's an initial shape that transforms into 2-3 different forms currently, each with a different color. It switches between forms with a switch node, but for some reason, the switch node doesn't change the color during the popnet animation. It's as if it's not updating. I want to write this color into the Basecolor of a material, the current color. I tried writing Cd.r Cd.g Cd.b attributes instead of RGB colors, but nothing happened. Maybe I formatted it incorrectly, but when exporting, I got the color in Blender as it was set before the attributes. In simple terms, I want the Cd attribute to be the material's base color, and it should change according to the input from the switch node. The other task, which is more complicated, is to limit the speed of the particles to 4m/sec vertically, 3m/sec horizontally, and 2m/sec descending. It's okay if I need to interfere with the transformation; the important thing for me is for them to take on the positions I specified and to maintain distance from each other with collisions, as they do now. Thank you if anyone can help with either of these!

Attachments:
nodes.jpg (252.7 KB)
speed and color help.hiplc (1.6 MB)

User Avatar
Member
394 posts
Joined: Nov. 2016
Offline
For your velocity, in a pop wrangle, this should work.

vector hvel = v@v * {1, 0, 1};
float vvel = v@v.y;

v@v = normalize(hvel) * min(length(hvel), 3) + clamp(vvel, -2, 4) * {0, 1, 0};
Edited by Tanto - April 5, 2024 16:21:20
User Avatar
Member
10 posts
Joined: Feb. 2024
Offline
Tanto
For your velocity, in a pop wrangle, this should work.

vector hvel = v@v * {1, 0, 1};
float vvel = v@v.y;

v@v = normalize(hvel) * min(length(hvel), 3) + clamp(vvel, -2, 4) * {0, 1, 0};
I'm testing it now, but so far it seems to be working. I entered it inside the PopNet. Thank you very much! Now I just need to come up with something for writing the Cd color into the material base color
  • Quick Links