Announcement

Collapse
No announcement yet.

ZBrush 4R3 Vector Displacement

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

  • #16
    Just checking in on progress after another couple of months. I'm not the only person in this office who's hanging out for a solution. We are loving Zbrush 4r3 and loving Vray, and yet...argghh.

    BTW I heard the lizard character in the latest Spiderman flick was rendered using vector displacements.

    Comment


    • #17
      Nope, still won't work. The UVW tangent space used by ZBrush is completely different from the one expected by V-Ray. We are still waiting for a piece of information from Pixologic in order to implement support for the same tangent space. For the moment, as Johan suggested, going through Mudbox will work better.

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

      Comment


      • #18
        Hi Vlado, is there any word on this? a new version of zbrush has been released today but it looks like the VD issue still persists... There are a few more options in generating the VD map, but trying it with the Diagnostic scene generated from zbrush still gives broken results.

        It would be great if both companies could work together for a solution to help the users, I know a lot of people like using zbrush over mudbox.

        I've attached the entire diagnostic scene generated from zbrush 4r4 for you to test with ( 16mb ). http://www.sendspace.com/file/6qov04

        With thanks - John

        Click image for larger version

Name:	zb4r4vdoptions.jpg
Views:	1
Size:	131.1 KB
ID:	845859

        Comment


        • #19
          Thanks, but the zbrush diagnostic is mostly useless in this case. Anyways, we made some progress for this, but nothing that you can use yet.

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

          Comment


          • #20
            I'm also very curious to see where this goes. Any idea if it's VRay or ZBrush which will implement some sort of translation for this UVW tangent space issue?

            Comment


            • #21
              Any progress in this issue?.

              Anybody knows free software called xnormal? (www.xnormal.net).

              For that people we haven't Mudbox license, this is an option, but always know the right settings?.

              Comment


              • #22
                Seems completely dead. Maybe Zbrush and Vray's vector displacements will never get married...

                Comment


                • #23
                  Ok, I'm moving the issue again, maybe we can get an alternative to expensive expensive Mudbox.

                  I think I have a real one alternative, I have correct maps, but still no lucky with the final render. Maybe if more people of the forum makes a try...


                  So here we go. I've been testing this free software, xnormal (ww.xnormal.net). The next workfow is what you need for create a nice vector displacement map:

                  First of all, we need 3, yes three geometries.

                  Geo1: LowPoly Model
                  Geo2: LowPoly Model subdivided as the same level than HighPoly Model, but NOT sculpted (So, simply take LowPoly model and subdivide it)
                  Geo3: HighPoly Model (subdivided and sculpted, of course).
                  Export 3 ones in .obj


                  Launch xnormal.

                  In "High Definition" button (up right), over the list, right click and select "Add meshes". Select the HighPoly Model (Geo3).

                  In "Low Definition meshes" button (downside the "High Definition" button), again over the list, righ click and select "Add meshes". Picavek up your LowPoly Subdivided (Geo2). Scroll the list at right, uncheck "Highpoly normals override tangent space", and check "Match Uvs"

                  In "Baking Options", the third button of the right column select where's gonna be your output file, choose .exr, choose the resolution of your map, uncheck "Closest hit if ray fails" and "Discard backfaces hits". Set the "edge padding" with the number of pixels you want xnormal extends in uv borders, leave the bucket size at 32, and in "Maps to render" section, choose "direction map".

                  There you have to choose if you want the vector displacement map Tangent or World... What expects Vray?. Tangent or World?.
                  There you have the xyz options (48 possible combinations, like in Zbrush test).
                  There you have the range you want to choose for 32 bit alpha depth. I understand Vray expects a range from 0 to 1, right?. I understand that Vray can adapt to every range, automatially or manually, but "natural" range, what would be?.

                  Well, finally, hit "Generate maps" (The blue big dot at down right), and jackpot. A beatiful vector displacement map.

                  In Maya, this time we can use "Low Poly" (Geo1), the real lowpoly, to get it working.
                  Using it in Vray, works better in "Absolute Vector Displacement" mode, but still not perfect results. At least, the UVW map generated by Xnormal are not the alien ones generated by Zbrush.

                  I'd a test with 96 possibilities (48 xyz combinations in Tangent + 48 xyz combinations in World), I would say the more closer is +y+z-x, but, not perfect.

                  I've post about in Zbrush central, but still no lucky.. http://www.zbrushcentral.com/showthr...81#post1002181

                  If anybody finds how to use this maps with Vray, would be great to take an alternative to Mudbox.


                  A few questions:

                  For Vray, Maya displacement node options "Signed Encoding" of "Floating Point Absolute" means something?. Affects to the way Vray "see" the map?
                  In the same node, the "Vector Space" field, with "World, Object or Tangent", affects or not?

                  Vray expects tangent or world Vector displacement?.


                  If somebody want do a test with that, here you have:

                  http://www.mediafire.com/?b68laf990hyq8qn


                  C'mon guys, we're near!.

                  Comment


                  • #24
                    V-Ray uses tangent space always. In "vector displacement" mode, V-Ray uses signed encoding with red corresponding to displacement in the U direction, green corresponding to displacement in the V direction, and blue corresponding to displacement along the smooth surface normal. In "absolute vector displacement" mode, V-Ray does not use signed encoding (values are used directly) with red corresponding to displacement in the U direction, green corresponding to displacement along the smooth surface normal, and blue corresponding to displacement along the V direction. All displacement values are in object space units along the respective axis (i.e. a red value of 0.5 means 0.5 units displacement along the U direction).

                    As you see, it's simple and logical. To this day, I cannot for the life of me figure what what the 96 combinations do in ZBrush, but it looks like not one of them corresponds to the above.

                    Best regards,
                    Vlado
                    Last edited by vlado; 01-02-2013, 03:09 PM.
                    I only act like I know everything, Rogers.

                    Comment


                    • #25
                      Thank you Vlado for the info. You're the first person that answers me, and with very valuable info. Thank you too much.

                      Xnormal makes a near correct displacement map, but values of alpha channel are too much high, doesn't means the range stablished in xnormal settings...

                      I'll continue trying find a solution. But neither xnormal people answers nor Zbrush support says nothing about odd UVW map Zbrush is using..., not even what combination is their "7" number in the vector displacement mapping settings for x,y,z flipping...

                      Comment


                      • #26
                        Originally posted by Iqbahl View Post
                        Maybe Zbrush and Vray's vector displacements will never get married...
                        For the power that has been given to me, I declare Zbrush and Vray's vector displacement MARRIED FOR THE ETERNITY.

                        And you're all invited. I bring you peace and love for everyone. IT WORKS. Olé.


                        Vlado, Zbrush is not using odd UvMap!!

                        Zbrush haves a "BUG" like a house. It not accept a UV Map in the range (0,0) (1,1) (I'm talking Uv map space). Zbrush accepts a range from (0.0...1, 0.0...1) to (0.9999, 0,9999). I bet in the Zbrush Uv Map range code someone has written a range >0 and <1, in place of >=0 and <=1.

                        So, every UvMap of yours low poly models should be a little bit shrunken, a litte bit scaled down, for Zbrush do maps correctly.

                        In Zbrush preferences>ImportExport>Vector Displacement Mapping settings, the valors we was looking for are:

                        FlipAndSwitch = 3 (Vector displacement Absolute in Vray)
                        Tangent FlipAndSwitch = 1 (Vector Displacement in Vray)

                        The other options (crease, tangent eval mode...) as default.


                        With this settings and the detail of UvMap a little scaled down, at last, Zbrush will produce correct vector displacement maps. BUT, for start, don't create a "tangent" vector displacement, so leave "vd Tangent" unchecked for do it in World (absolute) type.


                        Please, don't confuse ourselves, remember, if you subdivide your low poly with "suv" pressed in Tool>Geometry palette, when you create Vector Displacements, leave checked "vd SUV", and if you gonna smooth your low poly normals on Maya, then leave checked "vd SNormals" too.


                        Now, in Vray for Maya, if you've created a WORLD vector displacement mapping (In Zbrush you've leave uncheck "vd Tangent" when you create Vector Displacement Map), just choose in your Vray Displacement Control Extra Attributes:

                        Displacement Type: Vector Displacement Absolute. All the rest, leave it as default. And that's all, it should be working perfectly.


                        But, people of Chaosgroup, let me dare myself to say you've a BUG too. Let's see it.

                        Create a plane (gonna be easy for see it) in Maya, scale down a little bit the uvs for it doesn't touch UvMap border's space, you know, the Zbrush bug. Export it to Zbrush and subdivide it and sculpt it a little bit (you choose if subdivide it with "smt" activated, for smooth uvs or not).

                        Create another Vector Displacement Map, but this time, not the World (Absolute) one, this time, the TANGENT one (checking "vd Tangent" in Zbrush this time). (Remember the correct flipxyz setting number is 1 for the tangent vector displacements maps). If you've choosen before subdivide with "smt" uvs, then now you'll need activate "vd SUV" before create the vector displacement map.

                        Now go to Maya, and prepare all for make a render, but this time with Displacement Type as "Vector Displacement" (not the absolute one).

                        Load in Diffuse channel a photo (any not pattern image, different in all places, like a photo, or a cool wallpaper). (This will help you to see).
                        Set "Displacement Amount" to 0. (I want you see it from 0).

                        Put 4 spheres (or cones, or cubes) at the four corners of the plane, activate subdivision & displacement for Rt and launch VrayRt.


                        Ok, with Rt working, up Displacement Amount to 0.2. You now should be viewing a "almost" correct displacement, but plane, in place of "grow" in heigh, is being "eaten", cut in XZ plane, while grows in Y (I'm talking in Maya world coordinates). If you up it at 0.3, you can see more area is dissapeared, but more augmentation in Y.

                        I've tested 48 possible combinations, number 18 appears good enough, but the correct one is 1, and all 48 are "eaten" by Vray Vector Displacement Mode when raise the "Displacement Amount".

                        Change in the Displacement Node from "Floating Point Absolute" to "Signed Encoding" doesn't changes anything.

                        I'll edit the post for leave a link with some stuff, but you can test any model with this explication.

                        Have been 2 or 3 days long and right now, I don't know if I'm forgetting something, so, please, if appears I miss something, ask about.


                        Here you have some stuff to start to play (Here you'll find the "Vector Displacement bug" I mentioned with a plane and four spheres to understand it, it includes a color map to you to see):

                        http://www.mediafire.com/?3ldge4fidorxezv


                        Please, if all is correct and works, remember update the Vray for Maya help!!.


                        Eeerr.. ok, its not a bug! http://www.zbrushcentral.com/showthr...68#post1002668


                        Ok, I'm editing an hour more or less after the first post. I'm shaking of laughter. What!? Anyone try nothing different than mushrooms and ears sculpted over planes!?. It always worked!!!. It appears incredible...
                        Last edited by Reaversword; 02-02-2013, 06:24 AM.

                        Comment


                        • #27
                          So from what I could test, these settings give me mostly a correct result:

                          *) "vd Tangent" enabled;
                          *) "vd SUV" enabled;
                          *) "vd 32-bit" enabled;
                          *) "vd SNormals" enabled (not sure if this is relevant);

                          *) Tangent FlipAndSwitch = 9
                          *) Tangent Eval Mode = 1

                          *) Save to OpenEXR file

                          *) Add V-Ray "Subdivision" and "Displacement control" attributes to the mesh shape;
                          *) Set the displacement type to "Vector displacement (absolute)";

                          This mostly works, although there are issues at the UV seams - not sure whether these can be fixed.

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

                          Comment


                          • #28
                            Here are some screengrabs.

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

                            Comment


                            • #29
                              You got it working?... wow.... very nice. I'll have to test that here.

                              Comment


                              • #30
                                so, those setting seem to work for me but ya, the UV seams are a problem, even with parallel UV edges. That sort of defeats their usability. Is there nothing that can be done about that?Click image for larger version

Name:	Screen Shot 2013-03-05 at 6.35.14 PM.png
Views:	1
Size:	138.4 KB
ID:	847044
                                Dave Girard | CAN-CON.ca | polygonspixelsandpaint.tumblr.com

                                Comment

                                Working...
                                X