Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: szymon.bochenek on 2022-05-19, 16:10:58

Title: CoronaDECAL masked by Vertex Paint
Post by: szymon.bochenek on 2022-05-19, 16:10:58
Hi!

Is it possible to somehow mask CoronaDecal by VertexPaint ?
I just would like to paint this Decal mask in 3dsmax instead of using ready bitmaps:)
(for example dusty road or path line on grassy field)


BR,
Szymon
Title: Re: CoronaDECAL masked by Vertex Paint
Post by: romullus on 2022-05-19, 20:59:02
Nope, decals can't be used as masks, nor they can be masked themselves. You can use include/exclude lists to control which object will receive decals, but you can't limit that to specific parts of the object.

I'm not sure if i understand what you're trying to achieve, but it looks like Corona distance might be more suitable for your task.
Title: Re: CoronaDECAL masked by Vertex Paint
Post by: szymon.bochenek on 2022-05-20, 09:39:29

Thank you Romullus.
I meant can I use somehow VertexPaint as a mask for Decal texture?
I attached screenshot.
Title: Re: CoronaDECAL masked by Vertex Paint
Post by: romullus on 2022-05-20, 10:23:32
I'm afraid that's not possible. Vertex colours is a property of an mesh object and decal is not a mesh, it can't have vertex colours. If your aim is to paint a mask directly in 3ds Max, maybe consider using viewport canvas. Since its output is regular bitmap, there should be no problems of using it with decals.
Title: Re: CoronaDECAL masked by Vertex Paint
Post by: szymon.bochenek on 2022-05-20, 11:33:28
Thanks Romullus!

Viewport Canvas is solution for me (instead of VertexPaint).
I can draw mask for Decal directly on 3d model. It works! Decal size should be the same as plane below to fit bitmap size.
I use Decals in this case because its very easy to manage displacements while making complex terrain models.
File in attachement. (the only thing is that IR is not working while I`m painting but its not big problem:) )


Thanks again!!
Title: Re: CoronaDECAL masked by Vertex Paint
Post by: romullus on 2022-05-20, 11:58:38
Glad to see that it helped :]

I think Corona Team has plans to add more funcionality to decals in the future, so if you have some suggestions or wishes, feel free to express them in feature request board.
Title: Re: CoronaDECAL masked by Vertex Paint
Post by: maru on 2022-06-01, 10:29:27
Maybe you could use a workaround with Corona Distance?
The Layered Mtl is applied to the ground object.
The distance is calculated from the box.
We are not using Decals here, so there may be some limitations to this method that could be overcome with Decals (e.g. it will work with simple box and plane, not sure about more complex shapes).

But we will also consider your feature request as it makes sense.
Title: Re: CoronaDECAL masked by Vertex Paint
Post by: Aram Avetisyan on 2022-06-01, 10:55:25
Hi,

There can be different workarounds with vertex/viewport canvas paint and distance maps but the important thing to understand here is that decal gets masked first by itself, then gets projected onto a surface, without connection to the base object material/maps.

So a feature request I see here is to have base object mask adding - masking (or adding to the existing one) the decal after it has been projected.
So there is map which masks the decal - projecting leaves with opacity e.g. - and then an enable/disable option for masking the projection further with base object related material/mask.
This will also cover the cases where decal is projected with different angles and will grant a more convenient texture/projection mapping workflow.

The feature request will be logged.
Title: Re: CoronaDECAL masked by Vertex Paint
Post by: romullus on 2022-06-01, 11:33:05
Object based masking in addition to decal based masking, would be very nice feature to have indeed!
Title: Re: CoronaDECAL masked by Vertex Paint
Post by: maru on 2022-06-01, 14:21:15
logged:
(Internal ID=907398449)
Title: Re: CoronaDECAL masked by Vertex Paint
Post by: BSimon on 2022-06-01, 15:44:13

Exactly!:)
It would be very handy and useful feature!
BR,
Szymon


Hi,

There can be different workarounds with vertex/viewport canvas paint and distance maps but the important thing to understand here is that decal gets masked first by itself, then gets projected onto a surface, without connection to the base object material/maps.

So a feature request I see here is to have base object mask adding - masking (or adding to the existing one) the decal after it has been projected.
So there is map which masks the decal - projecting leaves with opacity e.g. - and then an enable/disable option for masking the projection further with base object related material/mask.
This will also cover the cases where decal is projected with different angles and will grant a more convenient texture/projection mapping workflow.

The feature request will be logged.