Announcement

Collapse
No announcement yet.

Total Internal Reflection bug?

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

  • Total Internal Reflection bug?

    Tonight I have been researching about an issue that time ago has been disturbing me. After all, if I could bet, I bet for take a look at the TIR (Total Internal Reflection) effect code.

    Here is a .ma scene from Maya 2012, a simple plastic plane, a crystal above, and a semisphere above, with no shadow casting.

    The bug appears near glazing angles, and appears depends too about reflection quantity.

    Vray 2.0 always shows same results nevermind the number of Trace Refractions rays, but for VrayRt, thing changes.

    You have all the stuff in the zips, scene, effect-iors, and effect-Refraction Rays for Vray RT.


    Maybe is not a TIR issue, or the bug is some effect I don't know about, but for me, like user, right now, appears a rendering error. Till I know, Tir occurs when you're looking at glazing angles, from a medium with higher ior to a medium with lower ior (looking at the water surface from above, from 1.33 to 1.0001, or in the case of the scene, from inside the glass to the air, from 1.51 to 1.0001, but not at the opposite. Maybe the number of refraction rays have something to do with this issue.

    I would like clarify a thing, the "correct reflection" of the semisphere is at very down-left corner of the crystal, you can see clearly two intensity colors, the second, the one that grows through surface when ior ups, this is the "reflection Tir?" bug. The fact of put there a blue/red semisphere is for proof the fact of the color of the bug effect is based in the original reflection, you can change the semisphere for another thing and the error will be based in the new object/texture.


    What's your opinion?

    InvertedTir.ma.zip

    Iors.zip

    RtTraceRefractions.zip

    Click image for larger version

Name:	VrayRtTraceRefractions5+Rays.jpeg
Views:	1
Size:	16.1 KB
ID:	873439Click image for larger version

Name:	Ior20.jpeg
Views:	1
Size:	11.7 KB
ID:	873440
    Last edited by Reaversword; 04-10-2011, 08:43 PM.

  • #2
    Thanks for the pointers; will look into it.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      Some workaround / fix for this?

      Comment


      • #4
        Apologies for the late reply; set the normal angle to your mesh to 0.0 and it will be fine.

        The problem is that the normals for your mesh are interpolated across the surface; they are not flat as you would expect. The result is that the reflections and refractions think that the surface is curved, when in fact it isn't.

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment


        • #5
          Ow!. I see. Then this fact gonna make me change my modelling style... I need to do some retouches then.

          Thank you for the support one more time, and please, accept my apologizes for not realize myself of where the error was. I should have tried with a single cube, without beveled edges. Next time I'll try to make more test!!!.

          Thank you very very much.


          Edit: Vlado, there is no way Vray understands which part of the geometry is hard edged and which soft edged?. If I take the up high face of the crystal table, extrude it, making it a little bit smaller (without get it in or out the surface), making it share the same plane as before, and leave it with the edges harded, there is a little change in the render, but still Vray thinks the surface is curved.

          Its more, if you take the entire object, leave it with hardened edges, renders perfectly, then if you select a single edge and soft it, the entire geometry appears soft in the render (or at least, Vray still things the surface is curved for the reflections).

          Any way to get Vray understanding this face of the table is plane, leaving borders with interpolated normals?

          Vray uses face normals, or vertex normals?, the normals ones, isn't it?
          Last edited by Reaversword; 17-10-2011, 08:42 AM.

          Comment


          • #6
            V-Ray takes the vertex normals from Maya directly; it does not do any guesses as to which parts must be smoothed and which not. In any case, I've attached a sketch of the correct way to model such objects - you have to imagine that you are looking at a cross-section of the table. As you see, you need to add some polygons around the edge of the table, but in the same plane as the main surface. This way the normals will be constant for the large surfaces. I hope this makes things a bit more clear. The red arrows represent the surface normals that end up being used for shading.

            Click image for larger version

Name:	normals.png
Views:	1
Size:	17.0 KB
ID:	844581

            Best regards,
            Vlado
            I only act like I know everything, Rogers.

            Comment


            • #7
              Vlado, both being talking about the same solution (but you explained it better).
              The thing is... yes, it haves all logical of the world, but doesn't works!. Try it and realize yourself. I don't know why, but Vray is not understanding what we need.

              I've been doing some tests with the Maya Polygonal Normal tools, I've tried to reach a succesful render stablishing the normals of the new face vertices (the center-in-the-same-plane face) and its four neighbours faces vertices at 0,1,0 in world space using "Set Vertex Normal" tool, but no success neither wihtout normalization nor with it, Vray keeps thinking surface is not flat.

              But the strange thing, is that appears I founded a solution. I still don't understand why it works, I think it should't work, but it does. It's a stupidity without sense I've done while I was touching settings, and when I realized it was working, I've been a while sieving commands till reach again the correct (?) result. For more reason to be non-sense, with this solution its not neccesary to modify the topology, so you can avoid edit the geometry of the .zip model.
              Here we go:

              Select the object, make it Hardedged (Polygons>Normals>Harden Edge), now lock the normals (Polygons>Normals>Lock Normals), and yes, I think this, with normals locked, shouldn't work, but... make the edges soft! (Polygons>Normals>Soften Edge). Render now!.
              Maybe Display>Polygons>Vertex Normals help you to research what's happening.

              I've attached new .zips, here you can see 6 renders, 3 of the scene with hard, soft and "mix" normals and 3 of the corner detail of the crystal in hard, soft, and "mix". (Let me baptize this "new" mode as "mix").
              Its like if the "mix" mode would do the transition between angles faster than soft mode, how if now transition from angles would be rendered in a 2 or 3 percent of the face, in place of along 100 percent of it, like in soft mode.

              Soft.zip
              Mixed.zip
              Hard.zip

              Comment

              Working...
              X