Author Topic: Triplanar mapping and displacement  (Read 2812 times)

2022-10-26, 14:25:19

RecentSpacesSam

  • Active Users
  • **
  • Posts: 62
    • View Profile
Hey all,

We were recently having some trouble with the triplanar mapping on displacement not matching the mapping on the rest of the channels and I discovered this thread https://forum.corona-renderer.com/index.php?topic=19726.15
The summary being "the mismatch is intended".

Would it be possible to add a checkbox/radiobutton onto the CoronaPhysicalMtl to allow the user to decide the order of operations between Displacement and Triplanar.
I completely understand the devs reasoning that displacement should be mapped prior the other channels but as an artist, there are use cases where we would like them all to by synced up together.

Cheers

2022-10-26, 14:32:23
Reply #1

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Tanks for bringing this up again,  and + 1000 for your suggestion.

2022-11-02, 13:55:41
Reply #2

philipbonum

  • Active Users
  • **
  • Posts: 73
    • View Profile
I didn't even know this was an issue, and would like this option as well, or at least a warning when putting it into displacement?  Would be awesome to have the ability if it is an easy fix :)

2022-11-03, 14:39:12
Reply #3

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
This was discussed many times and the only information we are missing is:
When exactly is this useful? Do you have some specific example/scenario where you would like to use this?

OTOH, V-Ray has this option ("use displaced surface"): https://docs.chaos.com/display/VMAX/VRayTriplanarTex
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-11-03, 15:38:11
Reply #4

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
This was discussed many times and the only information we are missing is:
When exactly is this useful? Do you have some specific example/scenario where you would like to use this?

That is exactly what i'm constantly asking myself - "where is current behaviour useful?" :] I don't think i ever used triplanar in conjunction with displacement, because of that limitation. Personally for me, current implementation makes very little sense.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-11-03, 16:03:43
Reply #5

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
I remember that the use case mentioned by Maru years ago was displaced terrain on which it makes sense to project afterwards. But even that scenario doesn't really fit well in my head since such terrains are displaced as baked-in from large-scale but not detailed height-map and tiled micro-displacement is used afterwards for further detail.

It really makes sense imho for 95perc. to make it opposite, and always align displacement with rest of textures in triplanar projection. Textures come in sets and displacement is almost always part of the whole PBR set and should match.

The Vray option is really nice ! Solves the problem completely.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2022-11-03, 16:08:09
Reply #6

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
That is exactly what i'm constantly asking myself - "where is current behaviour useful?" :] I don't think i ever used triplanar in conjunction with displacement, because of that limitation. Personally for me, current implementation makes very little sense.


I remember that the use case mentioned by Maru years ago was displaced terrain on which it makes sense to project afterwards. But even that scenario doesn't really fit well in my head since such terrains are displaced as baked-in from large-scale but not detailed height-map and tiled micro-displacement is used afterwards for further detail.

It really makes sense imho for 95perc. to make it opposite, and always align displacement with rest of textures in triplanar projection. Textures come in sets and displacement is almost always part of the whole PBR set and should match.

The Vray option is really nice ! Solves the problem completely.


Guys, I am not sure if you are trolling me or not, but I am not asking where the current solution does not make sense, but where the new solution would make sense. Do you have some specific examples of using triplanar + displacement where you would like to see this new behavior?

Some of the previous examples show things like bricks or tiles. While the result looks incorrect indeed, I do not see any reason why a brick texture would use triplanar mapping instead of the regular UVW mapping.

I would just like to see some practical examples where using the new method would help.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-11-03, 16:22:41
Reply #7

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Maru@ - I don't think anybody are trolling you. It just doesn't make sense to ask the obvious. Read the comment again, and you'll get the answer. Personally I need this every time I use triplannar with a material that uses displacement. I've NEVER needed the current behavior.

Regards

2022-11-03, 16:25:36
Reply #8

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
Maru@ - I don't think anybody are trolling you. It just doesn't make sense to ask the obvious. Read the comment again, and you'll get the answer. Personally I need this every time I use triplannar with a material that uses displacement. I've NEVER needed the current behavior.

Regards

Can you share 1-3 examples of such setup? What kind of real-life object and material is it?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-11-03, 16:38:42
Reply #9

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
ALL materials that I would use with triplanar.

For example ground materials as dirt with small stones on curved terrains where planar or box-mapping will give unwanted results.
Or when importing lots of objects without propper mapping, where triplanar gives a useable result in a short time.
Or with organic shaped objects without proper UVW.

I can't honestly imagine one single case where the current behavior is wanted. To me this is a pure theoretical solution.

2022-11-03, 16:41:02
Reply #10

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
For example ground materials as dirt with small stones on curved terrains where planar or box-mapping will give unwanted results.

We have one specific example so far, thanks!

We also have my example where we are displacing some curved terrain and applying grass to it, where the current order of operations makes more sense.

So the current score is 1:1.

Can anyone else make it at least 2:1 for the new behavior? :)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-11-03, 16:50:31
Reply #11

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
I don't think your example is used as often as ALL other usecases together. And your result could be done in other ways (f.x. by baking the displacement into the mesh), whereas the suggested behavior can't.

2022-11-03, 16:52:11
Reply #12

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
I don't think your example is used as often as ALL other usecases

Such as? :)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-11-03, 16:53:54
Reply #13

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
ALL other usecases!

2022-11-03, 16:54:26
Reply #14

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Are you trolling me?

2022-11-03, 16:55:26
Reply #15

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
Not trolling, I don't have any particular material where I avoid triplanar. I use it on almost every single tiled material without too obvious pattern, because it lets me skip UW mapping completely. Very production easy trick.
So I definitely use it for all bricks.

For me Triplanar isn't about blending primarily or often at all, it's about drag& dropping material from Connecter and slapping it on client's model with no regards to model quality, orientation or scale (I frequently use world-mode to avoid X-forming). Like TheSims or Sketchup material applying. Like using Real-World scale but even better, less clicks.

(I would love Triplanar option to keep UV orientation but adjust scale only too)
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2022-11-03, 16:59:10
Reply #16

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
ALL other usecases!

Can you be specific? List 2-3?

Not trolling, I don't have any particular material where I avoid triplanar. I use it on almost every single tiled material without too obvious pattern, because it lets me skip UW mapping completely. Very production easy trick.
So I definitely use it for all bricks.

For me Triplanar isn't about blending primarily or often at all, it's about drag& dropping material from Connecter and slapping it on client's model with no regards to model quality, orientation or scale (I frequently use world-mode to avoid X-forming). Like TheSims or Sketchup material applying. Like using Real-World scale but even better, less clicks.

Thanks for the details Juraj!


I'm on your side, really. I would like to see that option for the sake of simplicity. But it requires development time + effort and we need to prioritize things carefully. So far, after reporting this once or twice, it was always rejected as not making any practical sense. But now it might change since we have a few example use cases.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-11-03, 17:02:18
Reply #17

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
I also stand behind the point of displacement maps mostly coming from texture sets today, I don't think most people are making their own displacement maps to displace geometry like in "old times" :- ). Or even using displacement in creative way.
Today it's primarily an aspect of almost every PBR material you will download from TexturesCom/Megascan/Substance/Poliigon/etc.., so synchronization between the set is important.

The Vray's option seems like goldilocks solution.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2022-11-04, 12:57:28
Reply #18

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
Logged. If you have some specific examples how this currently produces incorrect results in your scenes, please do share them.

(Internal ID=998173015)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2022-11-11, 10:37:41
Reply #19

philipbonum

  • Active Users
  • **
  • Posts: 73
    • View Profile
I'm with Juraj here. There is plenty of times I also use triplanar to skip having to think about uvw mapping on bad or complex geometry.
On the other hand it might not be the intended use case from the side of the Corona Team?

One use case I remember helped me a lot was when I made a certain building with Railclone, and didn't quite manage to get the bricks on all parts of the object to match up the way I wanted. So I ended up using triplanar mapping in world space to make sure it matched, bypassing having to fiddle with Railclone to maybe make it work.

And what about if you have a terrain, it might be displaced or it might be pure geo, and we want to make a complex material that blends several materials on the surface(could just be one material really). We will in high likelihood use some Quixel materials, and they all come with displacement. But we have to stick to the normal/bump maps, because the displacement will not match the rest? I guess we could just slap a uvw modifier on it, but this wouldn't have blending between the axis, so we would maybe get some visible seams based on how heavy we want to displace it.

I feel like our business ain't the "cleanest" when it comes to what geometry we need to use, or what we're sent, so the triplanar with blending helps hide a lot of these problems.

I might be in the wrong and there's other ways of doing this, but for me, triplanar has always been the fix-it-all node for the lazy :)


2022-11-14, 16:33:12
Reply #20

RecentSpacesSam

  • Active Users
  • **
  • Posts: 62
    • View Profile
Hi Maru,

Apologies for the delayed response - I really need to come back to the forums more regularly and certainly not trolling!

As others have mentioned, it mainly comes down to when using texture sets from a source like quixel, poliigon etc. where someone has
a) photoscanned a surface
b) created a material in substance designer
c) some other form of specific texture creation

In these instances, the diffuse/normal/roughness etc. are all pretty much tied to the displacement.

Lets take a set of maps for bathroom tiles as an example and assume that it tiles perfectly on every edge (wouldn't that be the dream eh?) but the pattern might change in the middle
I want to run all of these maps through a UVW Randomiser to get 90deg rotations per tile and then I run each of those through a triplanarTex so that I don't need to re-UV additional walls/floors if they change, or if the client sends through a new model.
The grout lines of the diffuse must line up with the grout lines displacement otherwise you'll get a crevice in the middle of an area where there shouldn't be one.

Example #2, a set of photoscanned maps of snowy ground, with variation in the roughness map that shows ice as well as some footprints - which may be more reflective as the snow has been compacted.
Same as before - UVW Randomiser with 360degrees and per tile is enabled. It's crucial for the glossiness/roughness/normal/bump to line up with the displacement as the reflections and fine details won't be in the right place.

Perhaps this isn't how these two features are designed to be used, but it is certainly how many artists in our studio are using them. Do let me know if this isn't clear and I'll try to come up with another example :)

Edit:
re-reading the chain I noticed you asked for non-brick/tile examples. My bad.

Roads would be another example of needing this to work - downloading a texture set of asphalt without road markings but with cracks - these would need to line up with the respective normal maps

Using a rocky material on cliff faces etc. would need the displacement to match up with other maps

Looking through quixel bridge, I think I can safely say that any surface isn't explicitly manufactured/arranged to a pattern manually would benefit from the displacement triplanar matching the other maps.
Even then for things like bricks UVWRandomiser is great to get random mirroring per tile and I generally find myself using triplanar instead of UV's as it's faster to set up the scale on a material than it is to apply a modifier to multiple objects.
« Last Edit: 2022-11-14, 17:04:13 by RecentSpacesSam »