Author Topic: UVW Randomizer Issue  (Read 3963 times)

2022-09-25, 14:11:35

dj_buckley

  • Active Users
  • **
  • Posts: 872
    • View Profile
See screenshot.  These 3 objects (close up of banquet seating) have the exact same material on them, except the furthermost left one.  The only difference with that one, is the jpeg used for maps are also plugged into UVW Randomizers.

It looks to me as if the normal map is being inverted when plugged through the UVW Randomizer.  Which in turn is making it "shinier".  I've no idea if thats because of the inverted normal map or if it's also inverting any of the other maps i.e. bump, gloss etc.

Max 2021 Corona 8 HF1

2022-09-25, 19:28:37
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Could it be that you plugged randomizer in incorrect order? AFAIK, its correct position is between normal texture and Corona normal node. It also could be a mismatch between different maps. Double check if every randomizer is absolutely the same, including random seed parameter.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-09-25, 20:14:56
Reply #2

dj_buckley

  • Active Users
  • **
  • Posts: 872
    • View Profile
I've checked all that, but I'll check again.  As for the correct order, I'll screenshot the shader and post it shortly.

2022-09-25, 20:39:02
Reply #3

dj_buckley

  • Active Users
  • **
  • Posts: 872
    • View Profile
Shader tree attached for both materials.  As you can see there is a UVW Randomizer for the 'smudges' on both materials.  Other than that, all I've done is add additional UVW Randomizers for the other maps.

All UVW Randomizers have the exact same settings.

Top material is the furthest left object, bottom material is the 2 objects on the right.


2022-09-25, 21:28:14
Reply #4

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
You need to swap places trilanar with randomizer. Correct order is uvwrandomizer->triplanar->material. But i'm not sure if that's the cause of the issue, because that mistake is in both materials. Other than that, everything looks correct.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-09-25, 21:42:04
Reply #5

dj_buckley

  • Active Users
  • **
  • Posts: 872
    • View Profile
To be honest I could get rid of that smudges layer.  In the composite, the layer opacity is set to '10' so it's definitely not that, but good to know it's in the wrong order.

2022-09-25, 21:43:44
Reply #6

Basshunter

  • Active Users
  • **
  • Posts: 279
    • View Profile
You need to swap places trilanar with randomizer. Correct order is uvwrandomizer->triplanar->material. But i'm not sure if that's the cause of the issue, because that mistake is in both materials. Other than that, everything looks correct.

Is there any info about this in the Corona documentation? I've been having similar problems when not connecting maps in the right order.

On the other hand I wish it was possible to connect these maps in any order without this being a problem.

Also, as mentioned in other posts, it would be great if we could connect a single ranomizer/triplanar map for all textures instead of needing one for each map. Just like in Vray.

2022-09-25, 22:19:44
Reply #7

dj_buckley

  • Active Users
  • **
  • Posts: 872
    • View Profile
This article has a very brief reference to the 'order' but only in relation to the triplanar map.  All of the other examples in the article show the randomiser used at the end of the flow, so it is quite confusing https://support.chaos.com/hc/en-us/articles/4957371864977--Corona-Uvw-Randomizer-Map-3ds-Max


2022-09-26, 00:20:38
Reply #8

Basshunter

  • Active Users
  • **
  • Posts: 279
    • View Profile
This article has a very brief reference to the 'order' but only in relation to the triplanar map.  All of the other examples in the article show the randomiser used at the end of the flow, so it is quite confusing https://support.chaos.com/hc/en-us/articles/4957371864977--Corona-Uvw-Randomizer-Map-3ds-Max

Yeah, quite confusing :c

2022-09-26, 10:09:52
Reply #9

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
It's the triplanar that requires certain wiring order in order to work correctly. UvwRandomizer can be basically in any position you need.

Also, as mentioned in other posts, it would be great if we could connect a single ranomizer/triplanar map for all textures instead of needing one for each map. Just like in Vray.

AFAIK it has been requested many times and it's logged in the support system. I'm pretty sure that sooner rather than later we will have it.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-09-26, 12:04:47
Reply #10

dj_buckley

  • Active Users
  • **
  • Posts: 872
    • View Profile
Just running some tests with random normal maps.  It seems related to the W Rotation of the UVW randomizer (either that, or i'm not understanding something about how normal maps work).

2 screenshots attached.  Only difference between them is the one that looks 'inverted' has the W Rotation 'To' value, set to 360.

The normal map is taken from Poliigon https://www.poliigon.com/texture/penny-round-tile-texture-sea-mist-hexagons/7327

Edit: Now that I look at it on this example, it seems it's just the light changing direction as the normal map rotates, noticeable on the distant spheres, a downside to normal maps perhaps, an optical illusion??
« Last Edit: 2022-09-26, 12:09:42 by dj_buckley »

2022-09-26, 12:20:08
Reply #11

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
That's correct, when you're rotating normal map, it's the same as if you'd rotate mesh normals themselves. No doubt this will give you all sorts of weird illusions. It is best to leave W rotation alone and stick to U, V randomization only when normal maps are involved.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-09-26, 15:45:10
Reply #12

aaouviz

  • Active Users
  • **
  • Posts: 882
    • View Profile
    • Another Angle 3D
That's correct, when you're rotating normal map, it's the same as if you'd rotate mesh normals themselves. No doubt this will give you all sorts of weird illusions. It is best to leave W rotation alone and stick to U, V randomization only when normal maps are involved.

Wow, this is kinda mind-blowing to me. Obvious now that I think about it, but it shows I've been doing things very wrong ever since the UVW randomizer came around.

So what I'm understanding from this is that there isn't actually a way to truly randomize the textures in a traditional format? If I have a diffuse map that matches the normal (ie; wood grain) I can't go and randomize the diffuse W value as this means I'd also have to randomize the normal map W, which results in wrong normals?

I'd either have to revert to bump (greyscale) maps OR not randomise, OR only randomize non-critical elements (such as smudges)?
Nicolas Pratt
Another Angle 3D
https://www.instagram.com/anotherangle3d/

2022-09-26, 16:36:44
Reply #13

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
For starters you wouldn't want to randomize rotation of the wood texture regardless of presence or absence of normal map. It's highly directional texture and would look weird if it would be oriented randomly. Anyway, i don't see that as a problem - i use randomizer a lot and i almost never rotate the textures, even if they are simple black and white grunge masks. I find that simple U and V shifting is giving me enough randomization and there's rarely a need to use rotation.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-09-26, 16:40:18
Reply #14

dj_buckley

  • Active Users
  • **
  • Posts: 872
    • View Profile
I often randomise the rotation of wood but with a Step value of 180. 

2022-09-26, 16:42:10
Reply #15

dj_buckley

  • Active Users
  • **
  • Posts: 872
    • View Profile
That's correct, when you're rotating normal map, it's the same as if you'd rotate mesh normals themselves. No doubt this will give you all sorts of weird illusions. It is best to leave W rotation alone and stick to U, V randomization only when normal maps are involved.

Wow, this is kinda mind-blowing to me. Obvious now that I think about it

haha i had this same realisation when I ran that test today

2022-09-26, 16:49:37
Reply #16

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I often randomise the rotation of wood but with a Step value of 180.

Good point, but i think that wouldn't mess normal map, since XYZ coordinates would still match UVW.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2022-09-26, 16:53:54
Reply #17

dj_buckley

  • Active Users
  • **
  • Posts: 872
    • View Profile
And to be fair, if it did, it would hardly be noticeable as the wood grains I use aren't so dramatic in terms of 'bump' amount.

2022-09-28, 10:01:04
Reply #18

DPS

  • Active Users
  • **
  • Posts: 118
    • View Profile
I often randomise the rotation of wood but with a Step value of 180.

Good point, but i think that wouldn't mess normal map, since XYZ coordinates would still match UVW.

Yeah I don't see the problem with randomizing the normal map in conjunction with the other maps.

Still a pain in the but that displacement doesn't line up properly.
Specs: AMD 1950X, Aorus Gaming 7 x399, 64GB RAM, 1080ti. Win10, Max 2017, Corona 1.7.3

2023-04-14, 20:16:41
Reply #19

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Just to update things - apparently the solution to the issue is to keep correct order of nodes. Corona normal node must go before UVW randomizer, which must go before triplanar. More information about this can be found at Chaos support portal: https://support.chaos.com/hc/en-us/articles/13800753963537
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-04-17, 17:27:27
Reply #20

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
If you plug a normal map into the randomizer - the randomizer knows that this is a normal map and it should be treated in a special way (if you rotate a convex thing - it will remain convex)

if you plug a bitmap into the randomizer and then into a normal node - then Corona will take the result of the randomization (the normal map rotated and transformed the way you set it) and will then interpret this as a regular normal map - so whatever is red will be treated as red, whatever is green - as green, and whatever is blue - as blue) - this can result in "flipped normals" effect

the different orders of bitmap > normal > randomizer > triplanar will produce different effects - you may sometimes want to use the "incorrect" order if it makes sense in your specific case
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us