Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: Ink Visual on 2024-04-08, 15:41:03

Title: Tile map displacement mapping on displaced edge.
Post by: Ink Visual on 2024-04-08, 15:41:03
Hi,
Is there any way to preserve the colour/texture of the tile on the vertical part of the displaced surface?
Acording to my tests the majority of the colour comes from the gap colour rather than tile one. (see attached example)
Cheers.
Title: Re: Tile map displacement mapping on displaced edge.
Post by: Beanzvision on 2024-04-08, 16:44:05
Like this? *Edit Sorry I just saw this is for 3ds Max.

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=42415.0;attach=197276;image)

I think if you lower the gap thickness in the displacement tile to something low like .001 it should work. I'm new to Max also so I could be wrong ;)

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=42415.0;attach=197292;image)
Title: Re: Tile map displacement mapping on displaced edge.
Post by: Ink Visual on 2024-04-08, 18:40:34

I think if you lower the gap thickness in the displacement tile to something low like .001 it should work. I'm new to Max also so I could be wrong ;)


Yeah, that's exactly what I'm looking for.
Interestingly enough using similarly low values as per your test does not give me the same results.
Not sure what I'm doing wrong.

Title: Re: Tile map displacement mapping on displaced edge.
Post by: Ink Visual on 2024-04-10, 10:39:57
Just noticed you're using Corona 12 Daily. Is there anything that has changed since version 11 that would make it work for me and not for you?
Guess that's the question to Corona Dev team though.
Title: Re: Tile map displacement mapping on displaced edge.
Post by: arqrenderz on 2024-04-10, 15:03:25
I see you are using meters, maybe change to cm would help ?
Title: Re: Tile map displacement mapping on displaced edge.
Post by: Beanzvision on 2024-04-10, 16:44:02
Also note that my settings screenshot was from the tile map connected to displacement.
Title: Re: Tile map displacement mapping on displaced edge.
Post by: pokoy on 2024-04-10, 17:37:15
I see you are using meters, maybe change to cm would help ?
This might be not practical. Most archviz scenes or anything showing real world scenarios of larger scale will have to be setup in meters. At the same time, a tiles map might be one of the most useful things to have for archviz especially. If there are limits to how small values can get within the tiles map then this needs a second thought, some users just have to work in meters.
Title: Re: Tile map displacement mapping on displaced edge.
Post by: romullus on 2024-04-10, 20:14:53
Maybe we could have additional colour bias control which would shift tiles/grout colour transition point to either direction, because most of the times you want tile walls to have either one colour, or another, but not a smooth gradient. Beanzvision's method if it works, it does so in very specific case, which is hardly practical at all.
Title: Re: Tile map displacement mapping on displaced edge.
Post by: Ink Visual on 2024-04-11, 13:50:54
Right,
So I did the test with scene units set to cm and I still don't get the same results that Beanzvision posted.
The only way I could get the tile colour to propagate lower to vertical edges was using larger gap blur value for displacement tile map and 0.00 gap blur for the tilemap base colour.
This is also not an ideal solution as this way I cannot make use of SME additional node outputs to control all inputs with one corona tile map.

I think the only difference between my scene and Beanzvision's one is Corona version 11 vs 12. I cannot test 12 dailybuild atm though so won't be able to confirm if that makes any difference for me.
Alternatively, Beanzvision perhaps you'd be happy to share your scene with me and I can see if it works on my end?
Title: Re: Tile map displacement mapping on displaced edge.
Post by: Beanzvision on 2024-04-11, 15:32:51
Sure thing :)
Title: Re: Tile map displacement mapping on displaced edge.
Post by: Ink Visual on 2024-04-12, 15:55:11
Many thanks for the file Beanzvision.
So just to confrim, after checking Beanzvision's scene I reasured myself that in order to make the tile colour to be visible on vertical displaced edge you need to use different values for tile gap&blur in base colour and displacement. Generly speaking, base colour values for gap&blur size have to be smaller than dispalced value. This makes the displaced area slightly smaller than the colour area and thus it projects colour onto vertical faces.
Scene units have not much to do with it. (Maybe except for the fact that if you're using meters you need to allow max to use more than default 2 decimal places to use low values like. 0.001 or 0.0001 for better control of transition point)

The above method works but is not an ideal solution as you cannot drive tile shader with just one tile map but you have to use multiple ones to achieve desired result.

I think Romullus' idea of colour bias control would be a great adition to tile map controls.

Maybe we could have additional colour bias control which would shift tiles/grout colour transition point to either direction, because most of the times you want tile walls to have either one colour, or another, but not a smooth gradient. Beanzvision's method if it works, it does so in very specific case, which is hardly practical at all.