• Login
sketchucation logo sketchucation
  • Login
🤑 30% Off | Artisan 2 on sale until April 30th Buy Now

How to do linear displacement?

Scheduled Pinned Locked Moved V-Ray
renderpluginsextensions
11 Posts 3 Posters 1.9k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    jopsa2
    last edited by 13 Oct 2009, 21:46

    I realize the subject line isn't very clear, hopefully i'll explain myself with some images. I've been playing with displacement maps recently (http://forums.sketchucation.com/viewtopic.php?f=18&t=21987 ), but ran into a problem...

    let's see if i can explain myself correctly... a straight black-to-white gradient doesn't displace geometry as a straight line, but as some kind of a curve (see diagram for approximation).

    dispmap.jpg

    a displacement map created, for example, from my fog method (see linky above), will never be accurate since it isn't displacing the geometry "evenly," if you know what i mean.

    The solution would be to create a method by which a displacement map could be modified in an image editor to trick Vray. Or in other words, what should be done to the straight gradient so that it produces a straight displacement?

    I've been trying some but it only makes it worse.

    Any help/tips would be amazing, not only to let me sleep at night, but I would give it so much use!

    Also, here's a quick image on something i did using the fog method that's not topography

    disp map and the resulting render

    cheers!

    1 Reply Last reply Reply Quote 0
    • X Offline
      xrok1
      last edited by 13 Oct 2009, 23:42

      looks like a sampling resolution issue? i'm not that familiar with vray but is there a way to set a higher sample rate for displacement (like you can with shadow mapping)?

      “There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

      http://www.Twilightrender.com try it!

      1 Reply Last reply Reply Quote 0
      • J Offline
        jopsa2
        last edited by 14 Oct 2009, 19:41

        thanks xrok! i tried looking around for that, and i'm sure it's there, but couldn't find it.

        I gave it some more time today and answered my own question. Basically, if you have a hypsometric drawing (black-to-white according to depth), you would need to modify the Curve in Photoshop so Vray displaces it accurately.

        This curve to be exact:
        linear displacement.jpg

        Maybe i've lost everyone and am just rambling on with myself, I would be happy to do a tutorial about it if anyone's interested.
        Basically, it's a method to create displacement maps from Sketchup geometry.

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 14 Oct 2009, 20:07

          V-Ray for Sketchup applies a 2.2 gamma correction to 8bit texture maps - even displacement maps.
          Either use a 32bit displacement image, or override the displacement map gamma with a negative gamma 0.4545. (I think it would be the inverse of the Global gamma correction from under General Switches.)

          See more info in this thread:
          http://forums.sketchucation.com/viewtopic.php?f=322&t=18202&p=189538#p148769

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • J Offline
            jopsa2
            last edited by 14 Oct 2009, 21:59

            @thomthom said:

            V-Ray for Sketchup applies a 2.2 gamma correction to 8bit texture maps - even displacement maps.
            Either use a 32bit displacement image, or override the displacement map gamma with a negative gamma 0.4545. (I think it would be the inverse of the Global gamma correction from under General Switches.)

            See more info in this thread:
            http://forums.sketchucation.com/viewtopic.php?f=322&t=18202&p=189538#p148769

            right right! that makes sense, seems like I went for the less technical option, your method solves it perfectly.
            thanks very much thomthom!

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 14 Oct 2009, 22:13

              So what's you're doing with that displacement there?

              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • J Offline
                jopsa2
                last edited by 18 Oct 2009, 13:32

                @thomthom said:

                So what's you're doing with that displacement there?

                oops sorry, I haven't checked the forums in a couple of days...
                I've been working at uni on some very large topography, and even though I had the 3D model made with the sandbox tools, it was just too big to be usable.

                So I thought displacement might be a good option, and it definitely helped! I needed different layers of information projected onto the 3D model and just had to change the diffuse layer in the vray material.

                Like so:
                topografia-SM.jpg

                1 Reply Last reply Reply Quote 0
                • T Offline
                  thomthom
                  last edited by 18 Oct 2009, 13:41

                  How did it go - displacing such a large area in V-Ray?

                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    jopsa2
                    last edited by 18 Oct 2009, 13:52

                    better than expected actually, it never took longer than 15 minutes to render at a pretty decent quality, so it never obstructed the workflow

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      thomthom
                      last edited by 18 Oct 2009, 14:02

                      Will/can you post back the final results? It'd be interesting to see.

                      Thomas Thomassen — SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        jopsa2
                        last edited by 18 Oct 2009, 14:26

                        well, everything was similar to what i posted just now, just different layers of information projected onto the terrain (villages, rivers, climate, woodland, etc.), nothing amazing really.

                        The pure displacement map generated this:
                        aramaio.jpg
                        (7 minute render)

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        1 / 1
                        • First post
                          4/11
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement