Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] Daily Builds => Topic started by: fabio81 on 2023-04-06, 13:06:48

Title: Problem Scatter Edge Trimming
Post by: fabio81 on 2023-04-06, 13:06:48
Hello guys,

can anyone tell me why not all the branches are cut or some? the setting is just like the other shaders, ie in the alpha channel there is the appropriate shader.
Thank you
Title: Re: Problem Scatter Edge Trimming
Post by: Beanzvision on 2023-04-06, 13:48:03
Looks like it might have something to do with the pivot handle of your object at a guess.
(https://forum.corona-renderer.com/index.php?action=dlattach;topic=39787.0;attach=181606;image)

For more details on the edge trimming shader, please feel free to visit this article:
https://support.chaos.com/hc/en-us/articles/5244883674897-How-to-use-Chaos-Scatter-with-Corona-for-Cinema-4D-Advanced-Features#h_01GG6J1CWE8HJ5S0N5XV647AF9
Title: Re: Problem Scatter Edge Trimming
Post by: TomG on 2023-04-06, 13:49:30
Edge trimming doesn't cut off the geometry - it looks at where the pivot point is, and if it is inside the edge boundary, the instance is rendered - even if the geometry then "sticks out" beyond the edge. This is to stop things like flowers cut in half, rocks cut in half, etc.  It is possible to do such a hard cut, you could use a Corona slicer for instance, or Corona Distance Maps into opacity, but it's not the aim of the Edge Trimming.
Title: Re: Problem Scatter Edge Trimming
Post by: fabio81 on 2023-04-06, 14:39:51
it is perfectly centred
Title: Re: Problem Scatter Edge Trimming
Post by: TomG on 2023-04-06, 15:03:29
It's not a question of whether the pivot is centered in the original geometry - it's a question of whether the pivot in the scattered instance lies inside the edge trimming area. If it does, the instance is rendered, even if the geometry in that instance will "stick out" past the edge trimming area. This is working as expected. Edge trimming does NOT cut any branches or any geometry, it simply decides whether an instance gets rendered based on whether the pivot point of the instance is inside the area. To cut geometry, you need to use the Corona Slicer, or a Distance Map in the opacity slot of a material, etc.
Title: Re: Problem Scatter Edge Trimming
Post by: fabio81 on 2023-04-06, 15:09:20
ok, actually it goes off the edge.. I'll try it with Corona Slincer
Thanks :D
Title: Re: Problem Scatter Edge Trimming
Post by: TomG on 2023-04-06, 15:10:26
You're welcome! You can use Slicer alone, or the combo of edge trimming and slicer (and looks like the leaves are ok, so slicer would just need to apply to the branches, in case that makes things easier to set up). Let us know how you get on!
Title: Re: Problem Scatter Edge Trimming
Post by: fabio81 on 2023-04-06, 15:26:05
i tried to apply my slincer tool only to the branches, to do this i had to ungroup the geometry so i could put it in the slincer material slot but in this case the scatter also works badly. In any case, the slincer does not cut my branches
Title: Re: Problem Scatter Edge Trimming
Post by: TomG on 2023-04-06, 15:28:12
Hard to tell without knowing scene set up - may be best to send the scene in via ticket https://corona-renderer.com/link/contact-support
Title: Re: Problem Scatter Edge Trimming
Post by: leo3d on 2023-04-06, 15:44:56
are you plug the opacity of bark shader to edge trimming ?
i see only leaf with edge trimming
Title: Re: Problem Scatter Edge Trimming
Post by: fabio81 on 2023-04-06, 15:49:44
Hard to tell without knowing scene set up - may be best to send the scene in via ticket https://corona-renderer.com/link/contact-support

ok i sent the scene
thanks
Title: Re: Problem Scatter Edge Trimming
Post by: fabio81 on 2023-04-06, 15:54:12
are you plug the opacity of bark shader to edge trimming ?
i see only leaf with edge trimming

like this?
Title: Re: Problem Scatter Edge Trimming
Post by: Beanzvision on 2023-04-06, 16:15:33
Hi Fabio,

When sharing a scene, can you please include the texture files as well? Please use the ''save project with assets'' option from Cinema to ensure everything is linked to the scene. Thanks.
Title: Re: Problem Scatter Edge Trimming
Post by: fabio81 on 2023-04-06, 16:20:29
Hi benjamin,

sorry I was in a hurry, I thought that for testing purposes it was enough that it worked even without textures
Title: Re: Problem Scatter Edge Trimming
Post by: Beanzvision on 2023-04-06, 16:22:14
Even without your textures, If I plug even a noise shader into the edge/opacity slot, I'm getting a fairly clean line. No slicer material used.

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=39787.0;attach=181619;image)
Title: Re: Problem Scatter Edge Trimming
Post by: fabio81 on 2023-04-06, 16:27:18
can you try with my geometry too? the one in red
Title: Re: Problem Scatter Edge Trimming
Post by: Beanzvision on 2023-04-06, 16:34:53
can you try with my geometry too? the one in red
Your geometry has no backing on it, can you try to make it ''solid'' and try again?

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=39787.0;attach=181623;image)
Title: Re: Problem Scatter Edge Trimming
Post by: fabio81 on 2023-04-06, 16:37:20
another thing Benjamin,

does it work for you even if you join the geometries like this? because with separate branches the scatter tool randomly scatters both branches and leaves. So it would be appropriate to leave them merged like this
Title: Re: Problem Scatter Edge Trimming
Post by: fabio81 on 2023-04-06, 16:40:13
can you try with my geometry too? the one in red
Your geometry has no backing on it, can you try to make it ''solid'' and try again?

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=39787.0;attach=181623;image)


nothing, it doesn't work for me

Title: Re: Problem Scatter Edge Trimming
Post by: Beanzvision on 2023-04-06, 16:43:45
It's working here if I change the mode from include to exclude. I hope that helps.

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=39787.0;attach=181639;image)
Title: Re: Problem Scatter Edge Trimming
Post by: fabio81 on 2023-04-06, 16:45:20
can you send me the scene?

thanks
Title: Re: Problem Scatter Edge Trimming
Post by: Beanzvision on 2023-04-06, 16:50:00
can you send me the scene?

thanks
Sure, check your email. I was sent.
Title: Re: Problem Scatter Edge Trimming
Post by: fabio81 on 2023-04-06, 17:34:27
perfect!

thanks :)

Title: Re: Problem Scatter Edge Trimming
Post by: Beanzvision on 2023-04-06, 19:29:03
perfect!

thanks :)

You're welcome, looks good! :)