underdog 0 Posted April 29 hi all, i have to put torches to my crowd agents hands then i want to put a light to them as they walking. what would be the possible approach for this purpose? thanks. Share this post Link to post Share on other sites
underdog 0 Posted May 4 so i guess my question didnt make any sense to you guys. maybe i should ask as, how can i parent a point light to an animated point? i hope it makes sense. Share this post Link to post Share on other sites
Atom 1,453 Posted May 4 (edited) I don't think parenting a light is going to be effective in a crowd situation. Maybe if your agent count is low, less than twenty? The Rivet can be used for that. What you might want to consider is making a group out of certain primitives on the agent mesh, then generate a single mesh from all the agents, delete all the primitives except that group. Use the result as a meshlight, if your render system supports that. Another approach might be to use that same group, but apply an emissive material instead of a true light. That can lead to noisy final images or long render times, though. Edited May 5 by Atom Share this post Link to post Share on other sites
doc 14 Posted May 4 have a look at this post: https://www.sidefx.com/forum/topic/57112/ it's possible to get the position of an agent's bone with vex. Then I believe you can use the instance lop to instance your lights into place. 1 Share this post Link to post Share on other sites
doc 14 Posted May 5 an even easier way would be to use an agent unpack set to "joints". The points will have orient attributes and you can use that to position your lights. In the attached example I've added put a tube in my agents hand using as copy to points, it should give you some ideas. agent_unpack_joints_v1.hip Share this post Link to post Share on other sites
Atom 1,453 Posted May 5 (edited) Here is an extension to Doc's scene to include multiple agents with the end of the torch turned into a meshlight. The active radius is set to 2 to demonstrate the area affected by each portion of the single mesh light. Disable this checkbox for a more global illumination type effect. Here is an image with active radius disabled. ap_agent_unpack_joints_v1.hiplc Edited May 5 by Atom Share this post Link to post Share on other sites
mestela 752 Posted May 5 Or lops? I wager its all a bit bleeding edge, so you'd wanna test a lot before pushing into production, but this is all the kinda stuff lops is meant to be good at. lops_crowd_lights.hip 1 Share this post Link to post Share on other sites
Atom 1,453 Posted May 6 (edited) Thanks for that alternate setup. It does look like LOPs can't instance more than ten lights, however. When I set the agent count to 72 the transforms for the light icon are instanced, but the rendering of the illumination quits after ten. Maybe there is an override max count somewhere? Edited May 6 by Atom Share this post Link to post Share on other sites
doc 14 Posted May 7 (edited) hmmm... I just gave it a try. seems to be working with my example, 50 lights. Although there does seem to be a limit to what can be displayed in opengl lops_crowd_lights_doc_v2.hip Edited May 7 by doc 1 Share this post Link to post Share on other sites
Atom 1,453 Posted May 7 (edited) Ah, it's the quality under the Display options. The default normal lighting seems to be fixed at 10 and ignores max count. Edited May 7 by Atom Share this post Link to post Share on other sites