Chaos Corona Forum

Chaos Scatter => [Scatter] I need help! => Topic started by: zrylux on 2016-11-07, 15:33:09

Title: Scatter populating oustide plane
Post by: zrylux on 2016-11-07, 15:33:09
Hello. Im trying to create some relaistic grass in a plane next to the pool.

Im using this model to populate the plane using corona scatter.
(https://img2.cgtrader.com/items/33199/74dfdd1fb5/grid/green-grass-patch-3d-model-obj.jpg)

The results are pretty convincing but some of the grass is populated oustide the plane. I understand the scatering tool uses the model's pivot to put inside the plane. So, my final result is some grass inse the water wich is next to the plane.

Any chance to hide that or avoid populate outside the plane?
Title: Re: Scatter populating oustide plane
Post by: romullus on 2016-11-07, 15:43:32
Here's a thread where similar problem was successfully solved: https://forum.corona-renderer.com/index.php/topic,9630.0.html You may want to take a look at it.
Title: Re: Scatter populating oustide plane
Post by: zrylux on 2016-11-07, 21:10:33
Thanks for your reply Romullus. I ve checked it and the the vertex map technic is not an accurated solution for my problem. That was the first thing come to my mind when looking for a solution.

Is there any better way to solve that? As you can see in the attached image, some grass is populated going outside the limits of my grass plane.

I was thinking maybe create some kind of poligon surrounding the plane wich can be used as a mask and will hide the scatter object when rendering...

And idea?

Thanks
Title: Re: Scatter populating oustide plane
Post by: romullus on 2016-11-07, 21:18:40
You don't necessarily have to use vertex colours for that. Use bitmap mask if you like. In fact it's not necessary to use second scatter either, everything can be achieved in the same scatterer with density or scale maps. Actually there's very fresh official Corona tutorial that's addressing exactly your situation. Here it is:

Title: Re: Scatter populating oustide plane
Post by: maru on 2016-11-08, 12:54:11
Another idea is to use distance tex to cut off scattered objects which are outside of some specified area.
Title: Re: Scatter populating oustide plane
Post by: romullus on 2016-11-08, 15:07:47
I didn't know that distance tex works with scatterer too. Pretty cool. But i guess, time penalty can be quite signifficant.
Title: Re: Scatter populating oustide plane
Post by: maru on 2016-11-08, 15:20:03
I did not notice any. Just to clarify: distance tex is used as opacity map for the grass blades here.
Title: Re: Scatter populating oustide plane
Post by: romullus on 2016-11-08, 16:03:26
Just a thought, since we already have collision calculation, maybe it's worth to introduce one more checkbox, that would prevent instanced objects bounding boxes to exceed boundaries of distribution object?
Title: Re: Scatter populating oustide plane
Post by: ktulu on 2016-11-08, 16:45:49
I don't want to hijack this thread, but wanted to know if there was any way to manually define the position of scattered objects. In Forest Pack its referred to as 'custom edit mode'.
I couldn't find this setting anywhere in corona scatter and it's a major deal breaker for workflows, where one needs to precisely define the position of say trees and still wants to benefit from all the goodies like random scaling, rotation and instancing.
Title: Re: Scatter populating oustide plane
Post by: zrylux on 2016-11-08, 17:14:09
Another idea is to use distance tex to cut off scattered objects which are outside of some specified area.

This seems a nice idea. Ill try to achieve it using the distance map. I'll have to take a look to teh tutorial.

Anyway, I ve seen in a diferent  render engine wich I do not want to say the name ;) there is an option wich allow to do not render part of an object putting overlapping it with a polygon. I think its called "Render booleans" and its a perfect solution for this problem. Just put a box next to the plane where the grass is outside the area and anything inside the box wont be rendered.

This could be a nice future feature

http://support.nextlimit.com/display/mxdocsv3/Render+booleans
Title: Re: Scatter populating oustide plane
Post by: romullus on 2016-11-08, 19:00:46
zrylux, have you seen maru's reply in this topic (#4), he showed how to do exactly the same thing in Corona as you described.
Title: Re: Scatter populating oustide plane
Post by: zrylux on 2016-11-09, 09:18:28
Yes! thanks! I'm going to take a look!!