Announcement

Collapse
No announcement yet.

Displacement mesh capture wish.

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

  • Displacement mesh capture wish.

    I am using blend materials with multiple displacements materials and many of those displacement maps are using tri planer projections.
    What I need is a way to capture an optimized version of that render time displacement mesh so I can scatter particles on that displaced surface or use that surface for other simulations.

    Andy

  • #2
    There is a .write_vrmesh property in the displacement modifier that acceps a proxy path out (f.e. "d:/myDisplacedPlane.vrmesh").
    Then you need to start a render, and the visible displaced geo with the property filled will be written to disk as proxy.

    However, i am currently having issues with the output: it only writes an empty, if valid, proxy.
    I've asked the devs and will be sure to report back as either a procedural mistake from my part or a bug will be found.
    Lele
    Trouble Stirrer in RnD @ Chaos
    ----------------------
    emanuele.lecchi@chaos.com

    Disclaimer:
    The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

    Comment


    • #3
      Eh? In Max there's no write option....is this a Maya only thing then?
      That would have been an immense boon to me on an ongoing thing....
      I remember FinalRender having this option years ago so it must be possible I guess.
      https://www.behance.net/bartgelin

      Comment


      • #4
        The option is UI-less (notice how i wrote it.), but as i mentioned it's currently broken for me.
        I'll make sure to reshare the script to automate this as i find out why it's not working.
        Lele
        Trouble Stirrer in RnD @ Chaos
        ----------------------
        emanuele.lecchi@chaos.com

        Disclaimer:
        The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

        Comment


        • #5
          Don't think I understand that I'm afraid.
          Do you maybe mean that whilst it's not a visible option in the modifier, it works as a script?
          I don't delve into scripting so an explanation of how you get it to work (when it is working ofc) would be great please
          https://www.behance.net/bartgelin

          Comment


          • #6
            Actually I just found the relevant doc page.
            Wouldn't work for me sadly, as I'm using 2d displacement.
            https://www.behance.net/bartgelin

            Comment


            • #7
              If the goal is to export the displacement, you can surely change the displacement mode to suit what's needed.
              In the end you'd get a proxy for rendering purposes (so no issue with building time or RAM usage), that you can convert (even only for the viewports, via modifiers) to an editable mesh.
              Lele
              Trouble Stirrer in RnD @ Chaos
              ----------------------
              emanuele.lecchi@chaos.com

              Disclaimer:
              The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

              Comment


              • #8
                Yeah I thought to change it to 3d just to get this to work, but the very same map which works perfectly in 2d will not displace using 3d...or rather it displaces upwards but remain flat though with the land clearly visible but obviously wrong. What could be wrong do you think?
                It's a terrain map, 32bit exr.
                https://www.behance.net/bartgelin

                Comment


                • #9
                  Send it over and I'll check it out.
                  Lele
                  Trouble Stirrer in RnD @ Chaos
                  ----------------------
                  emanuele.lecchi@chaos.com

                  Disclaimer:
                  The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                  Comment


                  • #10
                    Texture is 2gb so a bit big to upload but the result is as attached.
                    If I stick it on a sphere it works just fine so it's weird...
                    Attached Files
                    https://www.behance.net/bartgelin

                    Comment


                    • #11
                      Here's a small piece of the map https://www.dropbox.com/s/u6dk1tq1ys...%2001.exr?dl=0
                      https://www.behance.net/bartgelin

                      Comment


                      • #12
                        The issue comes from the map being in raw format, with the max value at about 1800.0 float.
                        This has to be put into the right place in the modifier (Texmap Max, grayed out in 2d mode), and then a suitable scaled value for the displacement Amount (f.e. 0.05.).
                        Notice this is awkward as the min doesn't change and so the offset values stay unscaled (f.e. -75.0).
                        On the right, i rescaled the map in the 0-1 range, saved it as "normalised" and re-plugged it.
                        This time "texmap max" stays at the default of 1.0, and displacement Amountn and Offset work as expected (100 and -80 respectively.).
                        The slightly different detail is due to a non-exact match of the total displacement height (lazy to do the maths. It should match with an Amount of 90.9678589).


                        Click image for larger version  Name:	image.png Views:	0 Size:	631.0 KB ID:	1160636
                        Last edited by ^Lele^; 25-09-2022, 11:01 AM.
                        Lele
                        Trouble Stirrer in RnD @ Chaos
                        ----------------------
                        emanuele.lecchi@chaos.com

                        Disclaimer:
                        The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                        Comment


                        • #13
                          Brilliant ^Lele^ I knew you'd figure this out and thanks for doing so....you're really adding to your 'beers in' tally for sure

                          How are you normalising the values and maintaining detail?, as option b seems like the most sane approach.




                          https://www.behance.net/bartgelin

                          Comment


                          • #14
                            I used nuke: i read the highest value (with a curvetool), and plugged it into the white level in a grade node.
                            It ought to be doable anywhere so long as you can read the max value in the image, and then divide the image channels by it.
                            Lele
                            Trouble Stirrer in RnD @ Chaos
                            ----------------------
                            emanuele.lecchi@chaos.com

                            Disclaimer:
                            The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                            Comment


                            • #15
                              Hmm...don't have Nuke. What would be the process in PS e.g.?
                              https://www.behance.net/bartgelin

                              Comment

                              Working...
                              X