Jump to content

Agents up vector


Recommended Posts

Hi,

 

I have a "spider" agent that I want to crawl against a sphere like shape, however Houdini always places the agent as if (0,1,0) is the up vector (i.e. like a human walking on a terrain). To fix the problem, I've 

-inserted "normal" node to my sphere to compute its point normals

-inserted "transform" node to my agent to change its initial orientation (copy sop node inside crowd source node aligns agents' z direction to template point normal N), so initially the agents look as if they standing on the sphere (see attached)

However, once I run the simulation, all agents switch back to a "strange" orientation (as if the transform I inserted has no effect)? I though that if I were to fix their initial orientation in the crowd source then it would propagate to the simulation. Also, I've added the sphere as terrain to the simulation hopefully to fix the problem but it did not.

So, to ask a specific question: How to make an agent align its up vector with the terrain normals while moving on the terrain? For human, up vector is always (0,1,0) , but for insects their up vector is always the surface normal...

Any feedback will be appreciated :)

after_simulation.png

after_transform_look_good.png

initial_bad_setup.png

Edited by catchyid
Link to comment
Share on other sites

Thanks cwhite, this fixes the problem :) 

I got another a problem though. Basically, the up vector of an agent is only parallel to terrain normal, however it could be in the opposite direction, see attached plz. As a result, some agents are outside the sphere and some are inside. I've doubled checked that the sphere normals are always pointing outwards...

I've tried to set the up vector in crowdsource to match the sphere normal but that did not work (well, actually am not able to test it as I am having some difficulties copying sphere normals and pasting them to crowdsource up vector, I've posted a question on another thread...). Maybe if I can copy up vector to crowdsource correctly, the problem will get fixed...

 

 

agents_up_vector.png

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...