Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] General Discussion => Topic started by: Alex_ST on 2020-10-15, 20:11:13

Title: Any way to remove the gradient effect from corona distance?
Post by: Alex_ST on 2020-10-15, 20:11:13
Hi everyone,
Im trying to get the effect seen in the reference image attached using coronadistance. So far i can only get this gradient effect (result.png) which doesn't look too bad but its not what im looking for.
I tried making the pavement with geometry and MaterialByElement modifier combined with corona distance but still have a gradient effect... Right now i don't see a solution besides manually selecting polygons and setting them up for corona scatter. Maybe there is some way to convert the corona distance output to ID or something?
Title: Re: Any way to remove the gradient effect from corona distance?
Post by: TomG on 2020-10-15, 20:22:26
You can control the gradient just by making the Near and Far Distances very close together, giving a hard edge to the transition. The problem is that it is that you need that to be "per geometrric shape", your hard edge will still cut partway across some of those parts of the geometry giving a rectangle half filled with grass.

You could do something like create a geometric shape that covers precisely what squares you need to have grass, use the hard edge for distance, and point it to the Distance From that geometric shape - you hide the shape of course, or just set it below the objects in the scene. That way the shape is kind of like a "mask drawn in Photoshop" except you can remodel it in the scene at any time without having to mess around with an external image.

Title: Re: Any way to remove the gradient effect from corona distance?
Post by: TomG on 2020-10-15, 20:23:49
(with that said, simply selecting what squares are to have grass and only applying scattering to them wouldn't be much more involved, and would be faster to render most likely as it won't be calculating distances all the time :) )
Title: Re: Any way to remove the gradient effect from corona distance?
Post by: sprayer on 2020-10-18, 00:11:51
You can always use maps like this to adjust contrast
Title: Re: Any way to remove the gradient effect from corona distance?
Post by: romullus on 2020-10-18, 11:20:11
I managed to come up with something interesting using Corona scatter. Unfortunatelly it's not really practical solution. A more capable scatter tool would be needed to acieve something useful here.

(https://i.ibb.co/1ZD692g/cscatter-pattern.gif) (https://ibb.co/Y2zZtjC)
Title: Re: Any way to remove the gradient effect from corona distance?
Post by: Mohammadreza Mohseni on 2020-10-22, 17:30:31
I hope not to post unrelated advice here, but I will share my way here too, it may benefits somebody.

of course, we can always modify the source distribution surface of scattering to get the desired effect using vol selection by an object (and then delete the selected faces) this way you can determine the scattering places in any way you want or attach several objects to get an even more complex selection. it is very practical and I use it all the time. this can be used for clipping, exclude or include or many other possible effects. it can be even used with corona distance, vertex map ( to hand paint objects placements), or even particle flow or tyflow to simulate very complex scattering effects.

(https://i.ibb.co/RSprNYP/ezgif-com-gif-maker.gif)
click to play the gif (https://ibb.co/Ct5C6mv)

you may also use a data channel modifier to bake distance map to a channel of your choice then mix it with any map you desire like vertex paint map to exclude some area as well. there are literally endless possibilities for creating a very complex scattering effect using corona scatter. you are not limited to corona scatter features you have osl, modifiers, particles and so much more at your disposal to make corona scatter even better.
(https://i.ibb.co/FqzVRsz/mohseni-datachannel.png) (https://ibb.co/2YdNG8d)
Title: Re: Any way to remove the gradient effect from corona distance?
Post by: arqrenderz on 2020-10-22, 20:42:50
Hi Mohammadreza Mohseni, can you elaborate on the method you are using?
Looks good!
Title: Re: Any way to remove the gradient effect from corona distance?
Post by: Tanakov on 2020-10-31, 15:54:16
Sounds like you just need to use "color inside" instead of near.