Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] Bug Reporting => [C4D] Resolved Bugs => Topic started by: blomen on 2022-03-09, 16:08:55

Title: Distance Shader with Chaos Scatter
Post by: blomen on 2022-03-09, 16:08:55
Hi there,

I'm having trouble using the distance shader with Chaos Scatter in the latest daily build of Corona 8. The "Distance from object" part of the shader doesn't seem to work.


Thanks!
Title: Re: Distance Shader with Chaos Scatter
Post by: TomG on 2022-03-09, 17:00:34
Not sure what you want to do with the Distance shader here - Chaos Scatter actually has its own inbuilt include/exclude by splines for example, so you can do that directly without the need for the Distance shader any more (Corona Scatter would have needed the Distance shader for this). Can you explain what result your are looking for?
Title: Re: Distance Shader with Chaos Scatter
Post by: blomen on 2022-03-09, 17:09:28
Hi Tom, thanks for your reply.

I'm trying to get a gradual decrease in the size of grass around a path. The exclude by spline function lacks the control which the distance shader allows - unless I'm doing it wrong (very possible).
Title: Re: Distance Shader with Chaos Scatter
Post by: TomG on 2022-03-09, 20:42:18
The near and far parameters for the spline controls should let you set a gradual fade, and should let you control scatter density and size.

However, if you want to control via Distance, can you share where you plugged that in to the Scatter? It looks like a test scene, so it may just be easiest to share the scene as looks like there won't be anything client-sensitive in there :)
Title: Re: Distance Shader with Chaos Scatter
Post by: blomen on 2022-03-10, 11:22:18
I've attached a small part of a project.

Ideally I'd like to use the distance shader to smooth out the transition between the path and the grass using the geometry that we have received from the client without having to redraw splines, especially on larger projects.

Title: Re: Distance Shader with Chaos Scatter
Post by: TomG on 2022-03-10, 13:15:35
What version of C4D and Corona was used there? It just crashes for me if I try to open or merge it :)
Title: Re: Distance Shader with Chaos Scatter
Post by: blomen on 2022-03-10, 13:27:38
It was saved with R25 and Corona 8 (latest daily), I've attached a file that I saved with an old R19 C4D, hopefully this works better!
Title: Re: Distance Shader with Chaos Scatter
Post by: TomG on 2022-03-10, 14:15:28
It loads, but I don't see the spline, nor Distance shader, like in your first image (wanted to see how you had those set up to see why they might not be working)
Title: Re: Distance Shader with Chaos Scatter
Post by: blomen on 2022-03-10, 14:32:22
In this file I don't have a spline, only the geometry.

The distance shader is placed under Transformations - Scale. The shader itself works when placed on a plane (as seen in the screenshot in the original post) but the "distance from" with the gravel object doesn't have an effect.  The same problem occurs when a spline is used as the object.
Title: Re: Distance Shader with Chaos Scatter
Post by: TomG on 2022-03-10, 17:14:18
TY! Does seem to be a bug at the moment where the Scatter is following the radial greyscale preview of the Distance map, and not the result of the Distance map at render time. We'll take a look into it, ty for testing and reporting!
Title: Re: Distance Shader with Chaos Scatter
Post by: blomen on 2022-03-10, 17:29:32
No problem! Glad to be of help and thank you for looking into it.