Announcement

Collapse
No announcement yet.

0-1 Fresnel IOR does not match IOR mapping

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Hello,

    The mix map does the following: mixAmount*Color1 + (1-mixAmount)*Color2. So if for some point the mixAmount is 0.5 you get Color1/2+Color2/2 = 1/2*(Color1+Color2). Now if you invert this you get 2/(Color1+Color2).

    For the 0-1 case and again mixAmout=0.5 you get (1/Color1)*0.5 + (1/Color2)*0.5 = 0.5*(1/Color1 + 1/Color2). Now if you add the values in the parenthesis you get 0.5*( (Color2+Color1)/(Color1*Color2) ). If you invert that - you don't get the same as the other case - and the result is different.

    It would work if you do the mixing with the normal values and invert after that if that is an option ?

    Best regards,
    Yavor
    Yavor Rubenov
    V-Ray for 3ds Max developer

    Comment


    • #17
      Originally posted by yavor.rubenov View Post
      Hello,

      It would work if you do the mixing with the normal values and invert after that if that is an option ?

      Best regards,
      Yavor
      Isn't that exactly what I tried to do in post #10 here? -> http://forums.chaosgroup.com/showthr...469#post717469

      It still does not work, even when inverting the entire result of the mix... :/

      Or did I misinterpreted what you meant?

      EDIT: There is still that scene in second post of this thread. It would be best to download it, try the solutions out and see if the right part of the image matches the left. There's been quite a few people here shooting suggestions from the hip, but none of them worked even in that simple repro scene
      Last edited by LudvikKoutny; 12-12-2016, 03:20 PM.

      Comment


      • #18
        In post 10# you've the result in both cases in the Fresnel IOR slot. What I've meant is to put the non inverted mix in the IOR and the inverted in the Fresnel IOR:

        Click image for larger version

Name:	ior_test.jpg
Views:	1
Size:	511.9 KB
ID:	864573

        That way the results are much closer.

        Best regards,
        Yavor
        Yavor Rubenov
        V-Ray for 3ds Max developer

        Comment


        • #19
          Originally posted by yavor.rubenov View Post
          In post 10# you've the result in both cases in the Fresnel IOR slot. What I've meant is to put the non inverted mix in the IOR and the inverted in the Fresnel IOR:

          [ATTACH=CONFIG]34864[/ATTACH]

          That way the results are much closer.

          Best regards,
          Yavor
          Oh yes! Thanks a lot!

          Can't believe I missed that. It actually does work even if both are in Fresnel IOR slot... It seems I was idiot enough to forget to switch CompTex from Add to Divide when I created a new one.

          Thanks again... so lesson learned. When converting fresnel mapping to 0-1 range, invertion of value should come as a very last node before input slot

          Comment


          • #20
            Glad that helped
            Yavor Rubenov
            V-Ray for 3ds Max developer

            Comment

            Working...
            X