Crowd on Sherical Terrain problem

   1518   3   0
User Avatar
Member
6 posts
Joined: March 2017
Offline
Hi,

I've created a crowd sim that's using a sphere object as the terrain. My goal is to have all agents walking around the outside surface of the sphere. The agents are setup with foot locking etc.

I have it setup and almost working, but the problem I have encountered is that all agents created below the equator of the sphere are walking on the inside surface. Looking at the normals for the terrain / sphere SOP, this correlates with those whose N.y value is negative.

In the CrowdSource, my Up attribute is set to 0,1,0

I have Enable Terrain Projection set in the Terrain tab of the crowd solver and the SOP path directed to the OUT null of the terrain sphere.

If I flip the normals on the terrain SOP nothing happens, even though the crowdsolver ‘Adjust Up Vector’ is ‘Set to Terrain Normal.’ If I flip the ‘Reference Up’ value to -1 I get the behaviour I was expecting by altering and therefore correcting negative N.y values.

Can anyone advise on how to overcome this issue?

Thx.

M
User Avatar
Member
2529 posts
Joined: June 2008
Offline
The example file that SideFX posted a few years back still works with H18. Take a look at the setup.
Edited by Enivob - June 23, 2020 09:00:56

Attachments:
sphere_walker.gif (537.0 KB)
ap_crowd_walks_on_sphere_follow_terrain_062320.hiplc (555.5 KB)

Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
6 posts
Joined: March 2017
Offline
Many thanks Enivob,

It seems that I have my crowd solver setup as the example file, but there are a several differences between the setups. In mine there's a crowdsource SOP that scatters the agents around the terrain. This seems to duplicate the up vector option that exists in the crowd solver. Disabling one and the other in turn it was clear they were achieving the same thing.

I have tried to use a single agent directly in the crowdsource node of the crowd_sim DOP but I'm getting a different error now - the character is distorting and scaling dramatically.

Interestingly when I set the sphere terrain to triangulate, I could get 50% of the agents on the outside surface of the sphere and the other 50% walking on the grid.

I have a few things to try now, I need to eliminate my character asset as a possible source of error.\

m

EDIT: tried replicating the example and my own with the mocapbiped that comes with Houdini and been unsuccessful with both approaches.
Edited by mondog - June 23, 2020 12:42:08
User Avatar
Member
6 posts
Joined: March 2017
Offline
So I've partially solved this thanks to Enivob's file.

In that example the crowd has only two characters and the crowd network is much more stripped down and different from using the shelf tools (which is how I'm doing it)

In the example, there's a line in the Agent SOP. Its output goes to the Agent node input and this provides some initial positioning data for the agents. This is effectively another way to distribute agents around the terrain, I tried it with other objects and it increased the number of agents per points. Crucially the Agent doesn't need to be on the terrain, just somewhere above it.

Since the line has two points and points directly upwards, the upper point sits proud of the sphere surface allowing the agents to be projected down.

What I found is that if the lower point sits above the sphere centroid, only one agent is created - the top one, but if it sits below the centroid, a second agent will be created at the bottom, but inside the sphere.

The part-solution I have now, is that by limiting the crowd to the upper half of the sphere, using a Crowdsource SOP node and letting them run for a while, I can get full coverage on the outside of the sphere, with all the initial state randomness etc., that this node provides. It's not perfect but I think I'll be able to do what I need with it.

Thanks Enivob!
M
Edited by mondog - June 25, 2020 14:18:22
  • Quick Links