catchyid Posted August 22, 2016 Share Posted August 22, 2016 (edited) Hi, In crowd simulation, I want to be able to emit agents from a hidden spot gradually, let's say ants coming out of a hole in a wall, so that they come out gradually, e.g. 10 agents come out then after couple seconds another group of agents come out. I've tried to change the Birth->Impulse Activation in POP source but that did not work - basically all subsequent agents did not stick to terrain and started wandering in 3D space. I guess the other option is to emit ALL at once and start moving them out of that hole gradually (maybe each t second, just transit to "crawl" state). Is there any other way or better way to do that? Thanks, Edited August 22, 2016 by catchyid Quote Link to comment Share on other sites More sharing options...
Atom Posted August 22, 2016 Share Posted August 22, 2016 (edited) By default Impulse Activation in the PopSource of the CrowdSim is set to $FF==1 which results in agents being emitted into the scene only on frame 1. You can use a modulus expression on the Impulse Activation to make the agents appear every so many frames. The number of agents that will appear will be the number of agents specified in the CrowdSource node. if($F % 24,0,1) Edited August 22, 2016 by Atom 1 Quote Link to comment Share on other sites More sharing options...
Atom Posted August 22, 2016 Share Posted August 22, 2016 If you are just interested a bug swarm style animation you may want to check out Sohey's Insect file, it is particle based (not Crowd) and allows bugs to climb over terrain and obstacles. Quote Link to comment Share on other sites More sharing options...
catchyid Posted August 23, 2016 Author Share Posted August 23, 2016 Thanks Atom I've tested your idea, i.e. emit every so many frames, but for some unknown reasons the agents don't follow the terrain correctly when I do that! In my crowdsolver, I (1) check Terrain-->Enable Terrain Project, and (2) set SOP path to my terrain, SO when I have one emission, i.e. $F==1, then agents stick and modify their up vector to follow the terrain, HOWEVER, when I have multiple emissions, i.e. if ($F %24, 0, 1), then agents penetrate the terrain and their up vectors won't be aligned with Terrain normals...Just to let you know, the terrain is just a grid + mountain, and I change the mountain height with time, e.g. sin($FF)*5 It might be a bug, or maybe I am doing something wrong! Anyways, I don't think it's a show stopper, I will just emit all agents at once then switch them from "idle" to "move" state gradually... Also, THANKS for pointing to me Sohey's file, I am still learning Houdini and it looks like a good example to learn from Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.