Announcement

Collapse
No announcement yet.

Issue with glass

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

  • Issue with glass

    I have been waiting to post this until I upgraded from v.1.5 to v.2x to make sure it still is relevant.
    Something I often do is try to distort glass facades to emulate bulges and such in the glass panes. The most "correct" way for this would be to subdivide the panes and physically bulge\distort them.
    This is of course not practical with scenes containing lots of large curtain walls and such.
    So ideally I then face map each glass pane and use something like Multitexture or bercon gradient with a selection of custom "bulge maps" for bump randomly distributed and random strength.
    Since the glass has volume, the back side of each pane needs the direct opposite bulge to not appear like a large square lens. So I then set 3 id's: Front, edge and back, where side has no bump in it's material, and back has the same as front but with a negative value. (I.E bump 30 front, and -30 back).
    This is where Vray starts acting up. As you can see in the attached scene, the fog turns the window really dark. Disabling the bump makes the glass look normal. This happens both with 2 sided checked and unchecked in the VRay material-options.
    What is the correct way of doing this? It also happens when using a regular noise map for bumping the total fasade, so its not related to the plugins.
    If this is so difficult to calculate, could we maybe get a specialised shader for this ?


    https://dl.dropbox.com/u/11737977/Glass-Problem.7z
    Signing out,
    Christian

  • #2
    Instead of using a Multi/Sub material, use just one VRayMtl, and VRayMultiSubTex textures inside it - then it will work fine. When you use different materials, V-Ray cannot make the connection between them to compute the correct fog color.

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

    Comment


    • #3
      Ok, thanks.
      I'll See if I can test it soon.
      Signing out,
      Christian

      Comment


      • #4
        Ok. I have been testing this a bit, and I can't seem to replicate the features i want like with my "problem file".
        We need to be able to have the same bump applied to the front and back side of the pane, but with the back bump amount set to the negative of the front value, so we can simulate an "even" thickness while bending the glass with the bump. This then needs to be randomly applied for variations sake, where we have the option of either Bercon gradient (extremely prone to crashing in 2012) to select maps, or multimap, as I know of no other utility to do this.
        Using the VrayMultiSubTex will not allow me to get the same map chosen for the front and the back (inverted). At least as far as I can see.
        Am I doing this wrong?
        Please feel free to explain if you have the right workflow.
        Last edited by trixian; 12-11-2012, 10:01 AM. Reason: sloppy english
        Signing out,
        Christian

        Comment


        • #5
          Would it work using the multi texture map in your forward facing map number, setting the random to per object, then in the back facing slot using an instance of the multitex inside an output map, and turning on invert for the output to reverse the black / white? Then in terms of variation maybe do this with the fog colour and slight saturation / gamma variations in a multitexture map again?

          Comment


          • #6
            Hmm.. not sure if I'm confused or if you are. Aren't you describing basically the premise of the test scene I uploaded where it doesn't work?
            Vlado stated the it cant handle refraction through mat-id's for some reason. If it did then there would be no problem.
            Would this be possible Vlado? Just making it handle separate materials? Or maybe a special shader to handle this type of effect?
            Signing out,
            Christian

            Comment


            • #7
              Vlado said that it can't handle multi sub object materials, not maps so the same, single material applied to an object that happens to have multi sub object ids doesn't break that rule. Alternatively do it with mapping placement and something like a composite material? You could use uv offsets to position your bitmaps to the left and right side of a uv space so they arrive in the right place for each brick?

              Comment


              • #8
                I'm still not sure how I get the correct inverted bump from the randomly picked front to the back. Would all glass panes need to be separate objects, or can it still distinguish through mat-ids? I feel like there is something essential and really simple that is eluding me. Like a pre-alzheimers creeping up.
                The uv workflow was considered, until I realized the sheer massive amount of mapping that needs to be done for large amounts of glass. Could someone post a screengrab from the slate editor or post a mock-up mat so I can see this with my own eyes?
                Signing out,
                Christian

                Comment


                • #9
                  In this specific case, how do you make your glass? Are all of the glass planes simple boxes? or are they more complex with lots of subdivisions across each face with curves?

                  Comment


                  • #10
                    Well you can see for your self in the file above.

                    Usually I would like to have them as single sided sheets in a continious mesh, then add a open chamfer for all border edges between each pane to get them sepparated, a uv modifier set to face map, and then a shell for thickness.
                    This ideally results in a compact model with lots of panes.
                    I then hoped to be able to set the id's through the shell modifier for front edge and back, with the corresponding material set up (the one that doesn't work).
                    This of course needs to be collapsed and exploded to let the mutlitex map assign randomness via object mode.

                    Preferably I would like to keep it as one colossal mesh and let something like the material-by-element modifier set to random 100 or so control the id's for each solid pane.
                    How then does one ensure that the map picked randomly for the front element is inverted for the back of that pane, if IDs are set on an element level?
                    Signing out,
                    Christian

                    Comment


                    • #11
                      Originally posted by trixian View Post
                      Would all glass panes need to be separate objects, or can it still distinguish through mat-ids?
                      You can still use material IDs; use the VRayMultiSubTex texture to put a different bump map on each face. In one case, it will have to be inverted.

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

                      Comment


                      • #12
                        On that note vlado, will the invert function in the output map with a nested normal copy of the map do this?

                        Also with bump does it consider black to be 0 bump with white forward, or does it consider mid grey to be 0 with white forwards and black backwards like displacement with a shift value?

                        Comment


                        • #13
                          But how will it still be random? The 2 randomisers I know of are multimap that uses either mat-ids or object differentiation. Bercon gradient does both these plus more.
                          I can't check right now, but does Bercon Grad let us randomise through mesh elements without regards to IDs?
                          Signing out,
                          Christian

                          Comment


                          • #14
                            Pardon me if I am completely missing the point here, but it seems to me that either you don't get what I am asking for, or I am being unusually dense. I usually comprehend these types of things fairly well, so for my sake, I hope the former

                            It should be pretty evident from the file I posted what I need to happen. (The file contains 2 techniques in case it was an issue with the plugins).
                            Could you explain to me \ show me the best way to get massive amounts of glass panes distorted randomly through shaders (not geometry) where the front and back are distorted in relation to each other so one doesn't end up with glass appearing to be 1m thick some places because of (refraction) and with fog enabled?
                            Ideally random in both what bump maps are applied to what pane, and their strength (multitex appears to let this happen through the gamma variation spinner).
                            Signing out,
                            Christian

                            Comment


                            • #15
                              We'll look at the bump application as one thing, but on the note of the fog you might have a good question here too. Are you finding that with the fog on, the fog looks okay with no bump, but incredibly dark fog with the bump on?

                              I know how to control fog when it's just pure geometry, so there might be something to be taken into account with your fog multiplier when you start using bump. For example the bump units might be being considered by the fog effect to be something like an invisible type of displacement and it's actually making the fog calculate it's effect as if the bump has made the glass object way deeper.

                              I'm up to my nads right now but I've downloaded your scene and I'll try to have a look some stage today!

                              Comment

                              Working...
                              X