Jump to content

Need some advice on Spawner regarding Self collision


OrdemDevOps
Go to solution Solved by Peter,

Recommended Posts

Hi, I need some advice on the self-collision in Gaia's spawner.

Brief: Game objects are repeatedly spawned almost at the same position,

even when the self-collision check is applied.

 

Figures 1 & 2: I consider the object named "tree_1",

which includes several children transforms,

each of which is on layer "PW_Object_Medium" for additional objects.

 

Figure 1. Inspector for "tree_1" prefab

2.thumb.jpg.06c40dd2b5a64f5a9e1bf230cde52cef.jpg

 

Figure 2. The "tree_1" prefab

1.thumb.jpg.93c36f8c5c0e9c5f919d1d12ce6aae28.jpg

 

 

 

Figure 3. Visualisation of Spawning Mask (self-explanatory)

3.thumb.jpg.513a092d0b8b2a36626b2adb752cb28a.jpg

 

In Figure 4, I have the location increment of one to check possible locations frequently,

but I use the bounds radius of 15 because the tree occupies the such area.

I use the boundary check quality 100%, then turn the self collision-check on.

 

In the mask settings at the end of Figure 4, even for this single desktop prefab,

I added a collision mask to see if it makes any difference;

I am still confused with the purpose of the collision mask at this position, though.

 

Figure 4. Spawner Setting

4.thumb.jpg.cb2cf0b21194ea27b3101373d477d522.jpg

 

Weirdly, I can never avoid self-collisions. What am I doing wrong?

Additional information: each of the children transforms inside the prefab (LOD objects)

include Mesh Filter, Mesh Renderer, and Mesh Collider, except for the billboard.

 

Figure 5. There are 16 number of "tree_1" spawned with so many occlusions.

5.thumb.jpg.726339c008b5cda022a92a0c66b1b6df.jpg

 

Thanks in advance.

Link to comment
Share on other sites

@OrdemDevOps The issue is that in the resource settings "Min and max instances" is set to 2 and 3, meaning that during the spawn it will put down 2-3 instances of the object at once. Those instances will be spread around within the "min max offset" coordinates. This setting is meant for e.g. creating clusters of rocks where it is less dramatic if they clip into each other.
If you want to avoid self-collision set the min max instances to 1, with the bounds radius check that you have enabled self collisions should be avoided.

Link to comment
Share on other sites

27 minutes ago, Peter said:

@OrdemDevOps The issue is that in the resource settings "Min and max instances" is set to 2 and 3, meaning that during the spawn it will put down 2-3 instances of the object at once. Those instances will be spread around within the "min max offset" coordinates. This setting is meant for e.g. creating clusters of rocks where it is less dramatic if they clip into each other.
If you want to avoid self-collision set the min max instances to 1, with the bounds radius check that you have enabled self collisions should be avoided.

Thanks for the advice, @Peter.

In GeNa, it can form organic clusters with a throw distance, and such clusters can scatter over an area. Is this not quite a suitable task for Gaia and better with GeNa?

Link to comment
Share on other sites

  • Solution
7 hours ago, OrdemDevOps said:

In GeNa, it can form organic clusters with a throw distance, and such clusters can scatter over an area. Is this not quite a suitable task for Gaia and better with GeNa?

I would say this can be done with Gaia, try to increase the number of instances a bit, and also the min and max x and z offset:

image.png

You can do more with GeNa though, for example gravity based spawning, or running sub-spawners, etc.

  • Like 1
Link to comment
Share on other sites

1 hour ago, Peter said:

I would say this can be done with GeNa, try to increase the number of instances a bit, and also the min and max x and z offset:

image.png

You can do more with GeNa though, for example gravity based spawning, or running sub-spawners, etc.

I guess "GeNa" in your latest comment is a mistake, and you meant "Gaia".

 

I remember that I learned what you just showed somewhere at some point. My mistake was giving improper min-max range in x and z axes. I learned it by heart this time.

 

Thanks for being patient in repeatedly giving advice for newbie.

Now I can go ahead with Gaia for this task!

  • Like 1
Link to comment
Share on other sites

1 hour ago, OrdemDevOps said:

I guess "GeNa" in your latest comment is a mistake, and you meant "Gaia".

yes, with the first GeNa I meant Gaia, I edited the post.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...