Author Topic: Render time booleans with CoronaDistance  (Read 14424 times)

2016-09-26, 16:08:44

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13041
  • Marcin
    • View Profile
Other than creating coastline foam and real-time displacement, the distance tex also allows for render time booleans, which should always render correctly and without things like jagged edges and flipped normals, which you sometimes get when using boolean modifiers/scripts/plugins. Here is how to do it:

Create two objects - "object" will be the one we want to cut, and "cutter" will be the one which is cutting
Duplicate the cutter object (let's call it "inside-edges") - it has to be a copy, not an instance
Create material 1 and apply it to "object"
Create material 2 and apply it to "inside-edges"
Create material 3 and apply it to "cutter" (this can be anything, since this object and material will not be rendered at all)

Take material 1 and assign CoronaDistance to its opacity. Set color near and color far to pure white. Enable "color inside" and set it to pure black. Then add "cutter" object to the "distance from" list.
Take material 2 and assign CoronaDistance to its opacity. Set color near and color far to pure black. Enable "color inside" and set it to pure white. Then add "object" to the "distance from" list.
Select "cutter" object and either hide it, or disable "renderable" option in its object properties.

That should be it. Enjoy your epic booleans! :)




Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2016-09-27, 07:31:28
Reply #1

Tiago4D

  • Active Users
  • **
  • Posts: 122
  • Be Happy!
    • View Profile
    • Lumo Studio Arch & Design
WOW!

Amazing!

I´Really like it!

B.R.

Tiago
Learning...

2016-09-30, 17:40:09
Reply #2

Tiago4D

  • Active Users
  • **
  • Posts: 122
  • Be Happy!
    • View Profile
    • Lumo Studio Arch & Design
Hi All,
Tutorial to create a boolean object using material with the new distance map on corona 1.5 (DB)
B.R.

:)

made from MARU Tutorial in Corona forum

Learning...

2016-10-21, 16:02:56
Reply #3

lixai

  • Active Users
  • **
  • Posts: 11
    • View Profile
i get this nasty error, and i can't figure out why :(

2016-10-21, 18:37:55
Reply #4

lixai

  • Active Users
  • **
  • Posts: 11
    • View Profile
here is the test scene, max 2016, corona 1.5.1 can someone else please confirm the same behavior ? i really need this feature to work

and a link to a short video i made to show the bug, if it's not HD, download the file
https://drive.google.com/file/d/0B4VLcFUxVhZPYS1icFpSUGNETEE/view?usp=sharing

thanks

2016-11-14, 15:00:43
Reply #5

Tiago4D

  • Active Users
  • **
  • Posts: 122
  • Be Happy!
    • View Profile
    • Lumo Studio Arch & Design
here is the test scene, max 2016, corona 1.5.1 can someone else please confirm the same behavior ? i really need this feature to work

and a link to a short video i made to show the bug, if it's not HD, download the file
https://drive.google.com/file/d/0B4VLcFUxVhZPYS1icFpSUGNETEE/view?usp=sharing

thanks

Hi lixai

look the video to do correctly

see the values and colors on dist maps, look opacity slot selections do the test on a single object... then you can test...

on your work convet the objet to poly and separate the object in 2 to work better 1 object and one void will work correctly.

see my file to look the correct values.

https://drive.google.com/a/lumostudio.com.br/file/d/0ByC5L09xV8liTFl3aElhVmhWTGM/view?usp=sharing



B.R.

Tiago
Learning...

2017-02-01, 09:35:18
Reply #6

sprayer

  • Active Users
  • **
  • Posts: 794
    • View Profile
it works, but gives black errors at complex objects, for example text boolean

another easier method
« Last Edit: 2017-09-26, 16:16:31 by sprayer »