underdog Posted April 29, 2022 Share Posted April 29, 2022 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. Quote Link to comment Share on other sites More sharing options...
underdog Posted May 4, 2022 Author Share Posted May 4, 2022 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. Quote Link to comment Share on other sites More sharing options...
flcc Posted May 4, 2022 Share Posted May 4, 2022 May be some clue here : Quote Link to comment Share on other sites More sharing options...
Atom Posted May 4, 2022 Share Posted May 4, 2022 (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, 2022 by Atom Quote Link to comment Share on other sites More sharing options...
doc Posted May 4, 2022 Share Posted May 4, 2022 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 Quote Link to comment Share on other sites More sharing options...
doc Posted May 5, 2022 Share Posted May 5, 2022 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 Quote Link to comment Share on other sites More sharing options...
Atom Posted May 5, 2022 Share Posted May 5, 2022 (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, 2022 by Atom Quote Link to comment Share on other sites More sharing options...
mestela Posted May 5, 2022 Share Posted May 5, 2022 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 Quote Link to comment Share on other sites More sharing options...
Atom Posted May 6, 2022 Share Posted May 6, 2022 (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, 2022 by Atom Quote Link to comment Share on other sites More sharing options...
doc Posted May 7, 2022 Share Posted May 7, 2022 (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, 2022 by doc 1 Quote Link to comment Share on other sites More sharing options...
Atom Posted May 7, 2022 Share Posted May 7, 2022 (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, 2022 by Atom 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.