Author Topic: Scatter edge trimming shader  (Read 6052 times)

2022-10-07, 10:58:17

fierruccio

  • Active Users
  • **
  • Posts: 5
    • View Profile
Hi guys.
I am trying corona 9 and its new features. I can't understand how the scatter edge trimming shader works.
can anyone give me some info about it?


2022-10-07, 11:37:14
Reply #1

Nejc Kilar

  • Corona Team
  • Active Users
  • ****
  • Posts: 1297
    • View Profile
    • My personal website
Hello!

You're supposed to create a "Scatter Edge Trimming" shader and then plug it into the Opacity slot of the material you'd like it to affect.

If those materials are already being driven by an opacity map (f.e leaf cut outs and such) then you can do the above and then plug that opacity map into the "Scatter Edge Trimming" shader.

Hope that helps!
« Last Edit: 2022-10-07, 13:59:08 by Nejc Kilar »
Nejc Kilar | chaos-corona.com
Educational Content Creator | contact us

2022-10-07, 11:43:46
Reply #2

Beanzvision

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 3881
  • Bengamin
    • View Profile
    • Cormats
Yep^

Bengamin Jerrems:
Portfolio l Click me!

2022-10-07, 13:52:03
Reply #3

fierruccio

  • Active Users
  • **
  • Posts: 5
    • View Profile
Thanks a lot guys. I wonder why I thought it was for anything else.
Very good feature. super easy.

2022-10-07, 16:28:13
Reply #4

elaraisawhale

  • Active Users
  • **
  • Posts: 21
    • View Profile
hi guys, thanks for the great feature, really appreciated.
i was testing it on a shrub close to a wall. i understand how it works, i scattered it on a plane limited in a spline rectangle. put the trim shader on every model's material but some branches are still not trimmed. what i'm doing wrong?
« Last Edit: 2022-10-07, 16:36:52 by elaraisawhale »

2022-10-07, 17:48:20
Reply #5

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5766
    • View Profile
It depends on where the pivot point is for that sub-object - if it is inside the scatter area, it still gets displayed, which means for a long thin branch it can still stick out beyond the scatter area. Your example is an ideal case for using a Slicer object though, to achieve what you want (things not sticking through a wall), shouldn't even need the new edge trimming.
Tom Grimes | chaos-corona.com
Product Manager | contact us

2022-10-07, 17:53:16
Reply #6

elaraisawhale

  • Active Users
  • **
  • Posts: 21
    • View Profile
It depends on where the pivot point is for that sub-object - if it is inside the scatter area, it still gets displayed, which means for a long thin branch it can still stick out beyond the scatter area. Your example is an ideal case for using a Slicer object though, to achieve what you want (things not sticking through a wall), shouldn't even need the new edge trimming.

Thank you Tom!!!

2022-10-09, 20:58:23
Reply #7

leo3d

  • Active Users
  • **
  • Posts: 190
    • View Profile
    • Leo3D
I find that going through the shader edge trimming, it is not simple at all
There should be an option in the scatter to activate it or not

2022-10-09, 21:02:20
Reply #8

leo3d

  • Active Users
  • **
  • Posts: 190
    • View Profile
    • Leo3D
the slicer shader only works in inclusive and not in exclusive with the scatter

2022-10-09, 22:23:24
Reply #9

Cinemike

  • Active Users
  • **
  • Posts: 1007
    • View Profile
I find that going through the shader edge trimming, it is not simple at all
There should be an option in the scatter to activate it or not

This is what Chaos-Ondra (I had to use this ^^) says in the Max-section:
"yes, we want to have the trimming feature implemented internally with just a checkbox in the future. It requires some internal changes first though. When done, it will work the same also for ForestPack."

Fingers crossed, there's hope!

2022-10-10, 16:06:48
Reply #10

tiagosaraivacg

  • Active Users
  • **
  • Posts: 73
    • View Profile
    • tiagosaraivacg
Yep^



Hi, can you share this scene? .. im not able to use it.. with and without the shader gives me the exact same outcome, tried it with Chaos Cosmos Grass.

thanks in advance.

2022-10-11, 08:31:11
Reply #11

Beanzvision

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 3881
  • Bengamin
    • View Profile
    • Cormats
Sure, here's a setup using Cosmos ''Field Grass 008'', Corona 9 RC2. :)

Please note that the grass mesh is not included in this zip, you'll need to download it from Cosmos and then add it to the scatter object.



Bengamin Jerrems:
Portfolio l Click me!

2022-10-11, 08:51:22
Reply #12

Nejc Kilar

  • Corona Team
  • Active Users
  • ****
  • Posts: 1297
    • View Profile
    • My personal website
Also, to add to Bengamin's really helpful post, make sure you're on the latest daily too as there's been some improvements to the way we do trimming especially with Corona Proxy objects.
Nejc Kilar | chaos-corona.com
Educational Content Creator | contact us

2022-10-11, 12:24:48
Reply #13

Philw

  • Active Users
  • **
  • Posts: 273
    • View Profile
Sorry to hijack the thread - but thank you all for that last setup - I now understand and it works brilliantly :-)

2022-10-11, 15:10:19
Reply #14

Pepelecrabb

  • Active Users
  • **
  • Posts: 99
    • View Profile
I am having difficulty understanding how this works.
 A slightly different scenario. I have a blanket in the middle of a grass field. How do I keep the grass from coming up through the balnket? The exclude spline does not seem to exclude.
I am using Short Grass 98-08 from Cosmos so you'll need to download for yourself. Unfortunately I cannot get a fabric from Cosmos for the blanket;)