Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Daily Builds => Topic started by: Avi on 2021-12-07, 17:10:01

Title: Corona Slicer Material playground!
Post by: Avi on 2021-12-07, 17:10:01
From the latest Corona Renderer 8 Daily Builds Changelog:
Download Link : https://drive.google.com/file/d/1UbEYs_wGvGY_nkw4so69oeuam915awBD/view?usp=sharing

Corona Slicer can be found in "Materials>Corona>CoronaSlicerMtl"

How to use?

1. Create any polygon geometry which you want to use as a Slicer Object.
2. Create a new material "CoronaSlicerMtl" and apply to your slicer object.
3. Intersect your Slicer object with any object you want to slice.


(https://forum.corona-renderer.com/index.php?action=dlattach;topic=35060.0;attach=157816)
(https://forum.corona-renderer.com/index.php?action=dlattach;topic=35060.0;attach=157818)
(https://forum.corona-renderer.com/index.php?action=dlattach;topic=35060.0;attach=157820)
(https://forum.corona-renderer.com/index.php?action=dlattach;topic=35060.0;attach=157822)
(https://forum.corona-renderer.com/index.php?action=dlattach;topic=35060.0;attach=157824)
(https://forum.corona-renderer.com/index.php?action=dlattach;topic=35060.0;attach=157826)
Title: Re: Corona Slicer Material playground!
Post by: marchik on 2021-12-07, 17:34:26
So, if I understand correctly, we cannot leave the light calculation unchanged and the slicer cannot be used as a "complex plane for camera clipping", or I missed smth?
Title: Re: Corona Slicer Material playground!
Post by: Ondra on 2021-12-07, 17:37:09
Try using it in rayswitcher, it should help
Title: Re: Corona Slicer Material playground!
Post by: marchik on 2021-12-07, 18:00:04
Try using it in rayswitcher, it should help

Yes, sometimes I am not very quick-witted, I admit. :D Thanks, Ondra!

PS
so far, the only thing I've found is that we cannot use displacement for this inside slice mtl, otherwise everything works as expected
Title: Re: Corona Slicer Material playground!
Post by: Ondra on 2021-12-07, 18:18:22
dont worry, proper tutorials that will show this and more are coming in later ;)
Title: Re: Corona Slicer Material playground!
Post by: John.McWaters on 2021-12-07, 19:23:07
I haven't used this yet.........but holy heck it looks like the shit! We've been needing something like this for awhile now.
Title: Re: Corona Slicer Material playground!
Post by: scionik on 2021-12-08, 06:29:33
So, if I understand correctly, we cannot leave the light calculation unchanged and the slicer cannot be used as a "complex plane for camera clipping", or I missed smth?

Yeah, I've had the same question.
Thanks to Ondra for the tip on how to do this.
Title: Re: Corona Slicer Material playground!
Post by: romullus on 2021-12-08, 20:19:19
Slicing things in half is fun.

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=35060.0;attach=157875;image)
Title: Re: Corona Slicer Material playground!
Post by: Jpjapers on 2021-12-09, 23:44:46
Im glad this feature is finally getting worked on :) It would be great if the caps could retain the material of the object they belong to. Im not sure if thats already a thing but i couldnt see an example of that up there.
Title: Re: Corona Slicer Material playground!
Post by: romullus on 2021-12-10, 10:40:28
That's already possible. My example above, does exactly that.
Title: Re: Corona Slicer Material playground!
Post by: Jpjapers on 2021-12-10, 12:04:50
That's already possible. My example above, does exactly that.

Oh ok i had assumed there were multiple slicers at play there, Nevermind!
Title: Re: Corona Slicer Material playground!
Post by: Frood on 2021-12-10, 12:21:33
there were multiple slicers at play

As you can see in the picture: obviously only one chain saw ;]


Good Luck




Title: Re: Corona Slicer Material playground!
Post by: romullus on 2021-12-10, 14:41:10
Haha, actually Jpjapers is right, i used couple slicers there. The second one was dedicated specifically for the rear seat, as i wanted to adjust UV mapping for better looking capping. Nevertheless, no special cap material was used.

BTW, i would like to ask devs if there's something can be done to improve capping of intersecting meshes. Currently it gives pretty messy result, as you can see from engine block and gearbox.
Title: Re: Corona Slicer Material playground!
Post by: julobo on 2021-12-13, 13:58:21
hi, good work on this.
Would it be possible to have an option to ignore xref scenes? For example, cut the walls of an appartment but not the furniture of the xref...
Title: Re: Corona Slicer Material playground!
Post by: shoebu23 on 2021-12-13, 22:17:40
Devs,

First- amazing!  This is a totally new way to approach imagery and very very excited about it!  One issue(and this was sort of mentioned regarding intersecting meshes) is to figure out how to handle situations like the attached.

Left bottle - no slicer
Second bottle - showing the effect on just the liquid - amazing, dream come true!!!
Third bottle - the 'error' when you introduce the glass bottle to the Slicer (this is because the liquid intersects with the walls of the glass for correct rendering)
Forth bottle - final (incorrect) result with the glass is ignored in the Slicer Material.  Since the cap is only taking place in the space between the glass walls.

Cheers!


Title: Re: Corona Slicer Material playground!
Post by: giza on 2021-12-26, 18:09:29
Hi,

is there any specific rule about the geometry that gets sliced with this new material?
I was testing it with a file where the mesh is imported from ArchiCAD (walls of the apartment) and as you may see in the attached screenshot it makes some weird spots here and there for some reason. It is same in interactive and regular rendering.
Title: Re: Corona Slicer Material playground!
Post by: rowmanns on 2022-01-03, 09:32:42
Hi,

is there any specific rule about the geometry that gets sliced with this new material?
I was testing it with a file where the mesh is imported from ArchiCAD (walls of the apartment) and as you may see in the attached screenshot it makes some weird spots here and there for some reason. It is same in interactive and regular rendering.
Hi,

I believe this issue has already been fixed internally and should be out in the next daily build :)

Cheers,

Rowan
Title: Re: Corona Slicer Material playground!
Post by: giza on 2022-01-05, 11:54:57
rowmanns That is great, thank you.
Title: Re: Corona Slicer Material playground!
Post by: rowmanns on 2022-01-05, 16:51:26
rowmanns That is great, thank you.
Hi,

Just to let you know it didn't make it into todays daily build. But it is on the way :)

Rowan
Title: Re: Corona Slicer Material playground!
Post by: LorenzoS on 2022-01-09, 11:48:11
First of all, you have done a great job.
I ask you if it would be possible to have an option that reverses the way of working of the coronaSlicerMtl, that is to show only what intersects the geometry to which the coronaSlicerMtl is applied.

thank you
Title: Re: Corona Slicer Material playground!
Post by: karlingermano on 2022-01-13, 13:18:33
Hi,

The new slicer is amazing, really useful new feature!
I have one question: is it possible to have displacement on the slicer object. For me it seem that displacement works properly on the object which I sliced from but it isn't visible on the slicer.
Did I do something wrong?

Thanks
Title: Re: Corona Slicer Material playground!
Post by: rowmanns on 2022-01-14, 13:23:53
Hi,

is there any specific rule about the geometry that gets sliced with this new material?
I was testing it with a file where the mesh is imported from ArchiCAD (walls of the apartment) and as you may see in the attached screenshot it makes some weird spots here and there for some reason. It is same in interactive and regular rendering.
Fixed in the latest daily which you can find here: https://forum.corona-renderer.com/index.php?topic=33839.msg193862#msg193862

Let me know if you still have issues.
Title: Re: Corona Slicer Material playground!
Post by: LorenzoS on 2022-01-15, 18:39:54
Hi,
it wil be possible to include/esclude also an xrefscene from slicer material?
Title: Re: Corona Slicer Material playground!
Post by: jasond on 2022-01-18, 15:39:40
I'm so glad this feature will finally be implemented! Will save many headaches.

In its current form, can the coronaslicer only cap in one colour? For the icing on the cake, is there a way to set up multiple cap colours?

Currently when using the slice modifier, I simply create a 2 mat multi-subobject material to give the sliced part of an object a different colour. (Slice modifier + cap typically assigns mat id 2). This allows you to differentiate between sliced, nested objects and have the slice plane as an instanced modifier.

Attached is a crude example
Title: Re: Corona Slicer Material playground!
Post by: TomG on 2022-01-18, 15:47:35
Only way I could think of is to duplicate the slicer, use include exclude list as to which objects each one affects.
Title: Re: Corona Slicer Material playground!
Post by: jasond on 2022-01-18, 15:55:13
I thought of this as well but then you'd have to keep instancing slicer objects / materials. I sometimes have to section 10-20 objects (machine parts) at once to create a section view so this would be a tedious option...

I suppose more complex slice scenarios like this may still be a job for the slice modifier. It's just no good at complex imported CAD geometry as it often creates lots of artifacts and distorted geometry.
Title: Re: Corona Slicer Material playground!
Post by: K3D. on 2022-02-08, 10:37:38
Yep, slicing things is fun :)

Honestly, I thought it would only work with simple geometry, but it works great with whatever complex shape you use. Great job on this one!
Title: Re: Corona Slicer Material playground!
Post by: maru on 2022-02-08, 11:17:03
I'm so glad this feature will finally be implemented! Will save many headaches.

In its current form, can the coronaslicer only cap in one colour? For the icing on the cake, is there a way to set up multiple cap colours?

Currently when using the slice modifier, I simply create a 2 mat multi-subobject material to give the sliced part of an object a different colour. (Slice modifier + cap typically assigns mat id 2). This allows you to differentiate between sliced, nested objects and have the slice plane as an instanced modifier.

Attached is a crude example


You can also use it with Multimap in "instance" or "material id" mode - https://support.corona-renderer.com/hc/en-us/articles/4402649799441
Then the cap will have a different color depending on what object is capped.
Title: Re: Corona Slicer Material playground!
Post by: maru on 2022-02-08, 11:18:15
Yep, slicing things is fun :)

Honestly, I thought it would only work with simple geometry, but it works great with whatever complex shape you use. Great job on this one!

Yeah, it does work with complex shapes! :)
Title: Re: Corona Slicer Material playground!
Post by: jasond on 2022-02-08, 16:03:50
I'm so glad this feature will finally be implemented! Will save many headaches.

In its current form, can the coronaslicer only cap in one colour? For the icing on the cake, is there a way to set up multiple cap colours?

Currently when using the slice modifier, I simply create a 2 mat multi-subobject material to give the sliced part of an object a different colour. (Slice modifier + cap typically assigns mat id 2). This allows you to differentiate between sliced, nested objects and have the slice plane as an instanced modifier.

Attached is a crude example


You can also use it with Multimap in "instance" or "material id" mode - https://support.corona-renderer.com/hc/en-us/articles/4402649799441
Then the cap will have a different color depending on what object is capped.

Just tried with both options. Unless I'm doing something wrong, neither work. In the attached example, the inside tube is set to material id 3 for both tests. The multimap in 'material id' mode (left) never gets to the third colour (purple) plus there's an anomaly when the cutter doesn't fully pass through the object being sliced and switches to id 2. The inside tube should have purple caps, the outside should be red since its id 1.

Not sure how instance would work here in the case that we do not have instanced objects. Also, I have not tested objects that are assigned multi-subobject materials which we use often.

Title: Re: Corona Slicer Material playground!
Post by: Jpjapers on 2022-04-20, 15:24:55
Is there any future scope to have the slicer capping functionality added to the camera clipping settings in the corona camera? A Checkbox for capping would be useful for rendering orthographic elevations with the ortho projection camera.
Title: Re: Corona Slicer Material playground!
Post by: Avi on 2022-05-04, 12:10:45
Hi,

I have logged this feature request in our system to be reviewed by our devs.

(Report ID=1589)
Title: Re: Corona Slicer Material playground!
Post by: shortcirkuit on 2022-05-05, 01:22:45
Is there any future scope to have the slicer capping functionality added to the camera clipping settings in the corona camera? A Checkbox for capping would be useful for rendering orthographic elevations with the ortho projection camera.

this would be absolutely perfect!
Title: Re: Corona Slicer Material playground!
Post by: jasond on 2022-05-05, 14:56:40
Additional functionality to allow for different cap colours based on object/material id would be so helpful for when you're slicing many objects at a time with a single slicer. Drop a multimap in there for cap colour and bam, done. As it is now, looks like you can only have a single cap colour for everything. Sure you can have  many instances of a slicer to cut multiple objects to allow for multiple cap colours but that's very tedious when in theory you only need one.
Title: Re: Corona Slicer Material playground!
Post by: Frood on 2022-05-06, 09:21:45
Is there any future scope to have the slicer capping functionality added to the camera clipping settings in the corona camera? A Checkbox for capping would be useful for rendering orthographic elevations with the ortho projection camera.

Here is a working mock-up: open scene, select camera, run IR, activate camera clipping and cruise around. I misused the "show in viewport" checkbox to toggle slicer material on/off.


Good Luck



Title: Re: Corona Slicer Material playground!
Post by: aaouviz on 2022-05-06, 13:17:40
Is there any future scope to have the slicer capping functionality added to the camera clipping settings in the corona camera? A Checkbox for capping would be useful for rendering orthographic elevations with the ortho projection camera.

+1!
Title: Re: Corona Slicer Material playground!
Post by: Jpjapers on 2022-05-07, 21:36:21
Is there any future scope to have the slicer capping functionality added to the camera clipping settings in the corona camera? A Checkbox for capping would be useful for rendering orthographic elevations with the ortho projection camera.

Here is a working mock-up: open scene, select camera, run IR, activate camera clipping and cruise around. I misused the "show in viewport" checkbox to toggle slicer material on/off.


Good Luck

Oh Interesting! So it just works already just accidentally??
Title: Re: Corona Slicer Material playground!
Post by: Frood on 2022-05-09, 08:44:53
So it just works already just accidentally??

Depends on the point of view. As you can see, you can already do it by using a simple rig with a linked slicer box which changes its size depending on the clipping plane and camera frustum. I just wanted to know how it "feels" to have such a feature.


Good Luck



Title: Re: Corona Slicer Material playground!
Post by: aaouviz on 2022-10-04, 12:08:25
Is it possible to reverse the clipper?

So it works as an includes only?

An example; I want soil in a pot. I get a nice soil model from megascans but it isnt the shape of my pot. So I create an 'inverse' of the pot shape (so shell outwards from it) and use this to clip the excess megascans 3d soil model.

But it'd be nice to simply use the pot shape instead of making a new model. So essentially all I'd have to do is apply the clipper material and ideally tick 'boolean' or something, so it clips everything OUTSIDE of the clipping shape.
Title: Re: Corona Slicer Material playground!
Post by: LorenzoS on 2022-11-04, 21:15:07
+1
Title: Re: Corona Slicer Material playground!
Post by: LorenzoS on 2022-11-04, 21:17:03
https://forum.corona-renderer.com/index.php?topic=35060.msg193628#msg193628
Title: Re: Corona Slicer Material playground!
Post by: jrgby on 2022-12-02, 18:44:12
I just tried using this to recess some spotlights but I guess it still interprets the light as being inside geometry and doesn't work (inside parent geo and slicer object).
See image of ceiling slab, with intersecting cylinder+slicer mtl and coronalight.

Could this work somehow? Feels like it would be a pretty handy feature.
Title: Re: Corona Slicer Material playground!
Post by: romullus on 2022-12-02, 18:50:55
Did you use include/exclude feature, or doesn't it work with hierarchies?
Title: Re: Corona Slicer Material playground!
Post by: jrgby on 2022-12-05, 10:57:25
Did you use include/exclude feature, or doesn't it work with hierarchies?
Ok, I completely overlooked the material excludes - works perfectly!
Title: Re: Corona Slicer Material playground!
Post by: romullus on 2023-02-05, 14:53:09
Just discovered that if you include parent object in Slicer's include/exclude list, then its effect propagate to child objects as well. If it's not the limitation of 3ds max itself, then it would be nice to have an option to affect only included object without its child.
Title: Re: Corona Slicer Material playground!
Post by: Aram Avetisyan on 2023-02-08, 12:46:07
Just discovered that if you include parent object in Slicer's include/exclude list, then its effect propagate to child objects as well. If it's not the limitation of 3ds max itself, then it would be nice to have an option to affect only included object without its child.

Hi, thanks for checking this.
It is now reported.
A checkbox to affect children or not may be a good idea.

(Internal ID=1051616618)
Title: Re: Corona Slicer Material playground!
Post by: romullus on 2023-02-08, 13:23:04
That would be sweet indeed. Thank you!
Title: Re: Corona Slicer Material playground!
Post by: Jeriel on 2023-04-28, 10:46:01
I have an Autocad file as a dwg link in max. Working units are in mm.

Assigning a UVW (modifier) gives a normal result without using the slicer material. (left image)  Using the slicer material however makes the UVW oversized on the sliced parts. (right image) Sliced faces are marked red.

(http://www.jeriel.nl/temp/coronaslicermtl.jpg)

Coronaslicermtl options: cap sliced geometry on, override cap material off, no exclusions, assigned to a simple 3ds max box. Insulation material is non real world scale, tiling 1/1 and UVW modifier with the correct scale in mm's. Issue also happens on simple 3ds max objects. Not only on dwg links. Also tested it with real-world scale, same results.




Title: Re: Corona Slicer Material playground!
Post by: romullus on 2023-04-28, 10:57:45
Slicer capping gets its UV coordinates from the slicer object, so you need to adjust its UVs to get desired scale.
Title: Re: Corona Slicer Material playground!
Post by: Jeriel on 2023-04-28, 15:34:55
Ah, that does the job.Thanks!

Well, knowing there are multiple objects with multiple UVW's being sliced using 1 coronaslicermtl-object ... Can a checkbox "Use target UVW's" being added to the Coronaslicermtl?

Title: Re: Corona Slicer Material playground!
Post by: romullus on 2023-04-29, 11:41:00
I think it's easier said than done, or even imagine how that could possibly work. It seems pretty intuitive when we talk about slicing boxes with perpendicular faces and box mapping, but can you say how mapping should be transferred when objects of arbitrary shape are involved?