Announcement

Collapse
No announcement yet.

Volume Scatter Vray Proxies : a solution (or how to render PFlow as Vray Proxies...)

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

  • Volume Scatter Vray Proxies : a solution (or how to render PFlow as Vray Proxies...)

    Hi everyones,

    I know that this issue is a long time concern on various forums, so here is my solution.

    Pros : really fast, works with Pflow or any other particle system (TP, krakatoa PRTs), no scripting...
    (I first tried replacing particles at render time by scripting, worked, but script loops comes very slow from 50 000 particles, +15min, and no way to multithread maxscripts)

    Cons : quite expensive... you'll need Thinkox's Frost and R&D Group's Multiscatter (or VrayScatter) licenses, several steps involved

    I don't have mush time to start expensive explanations, but here is the basic steps (don't worry, sample scene following...) :
    1. Generate your particles using your favorite system, no need to generate or display geometry
    2. Mesh them with Thinkbox Frost : 1 paticle = 1 plane, so each plane got his UV (important for the following), keep scale and orientation
    3. Now scatter your Vray Proxies using Frost mesh as distribution source,
    well configured it will place 1 instance by plane (thanks to UVs) and keep orientation and scaling too
    4. For total control of the materials I had to duplicate the setup, I found no way to pass mat ID throught the pipe
    (but you can still use MultiScatter functionality for randomization)
    4. Hit Render !

    And the beauty of the thing is that everything happens on at render time, you can play with viewport/render ratios as usual !

    This setup supports :
    - Position
    - Orientation
    - Scale
    - Material
    - Birth/Death

    Here is 1 million (and five) teapots, look at render time :
    Click image for larger version

Name:	1Mteapots.jpg
Views:	1
Size:	339.6 KB
ID:	876445

    And the sample scene :
    PF-to-VrayProxies.zip

    Hope you'll find it usefull, and post your thoughts and results !

    Jop
    Last edited by jop; 02-07-2012, 03:33 AM.

  • #2
    I wonder, does it really take Vray Proxies ? Usually if you use a Vray Proxy like this it will just take the viewport mesh of the proxy.
    I see in your screenshot that those teapot are represented as whole mesh. I ´m curious what happens if you take a vray proxy that does not show
    all polys in the preview mesh ?

    Comment


    • #3
      Sure it uses the vray proxies... the picture is the render, not a screenshot.

      My proxies are actually represented as boxes in the viewport, just give it a try.

      Comment


      • #4
        I ´m still skeptical
        Try the following. Export a Teapot as Vray Proxy but in the export dialog turn down the "Faces as preview option" to something like 50
        so the teapot, when imported does not show all faces (just in case you´re proxy at the moment does show all faces).
        Than scatter those teapot again and see if it renders the viewport mesh or really the proxy.

        Comment


        • #5
          As just said... just give it a try.
          Open my scene and see.

          This setup is based on MultiScatter, which is actually made to make full use of Vray-Proxies.

          Maybe you missed some point, I don't feed PFlow with proxies, MultiScatter does the job at render time.
          Otherwise, I did not manage to render such massive count of particle in just 1min.
          Last edited by jop; 02-07-2012, 04:10 AM.

          Comment


          • #6
            I ´m sorry I don´t have the tools to test your scene.
            Well I don´t say it´s impossible. I´m just sceptical as it can easily happen that it will just take the viewport mesh.
            You´re using the Frost Mesher and with your setup it´s not easily to say that is actually works.
            Btw. It´s easy for Vray to render some million instances that are not Vraymeshes within a minute.
            so I made a basic setup to show the problematic.

            I used a Cloud Particle system in this case. If you look at the first image you´ll see the particle system as well as
            two proxies. One with full viewport mesh and the other with a limited amount of polys on export. In the second image you see the rendering
            using the first proxy as instance. It looks fine expect the normals (wich are not to recognize in your image). One could think it ´s using
            the vray proxy, but it isn´t .. it just uses the viewport mesh as instance. You can clearly see this in the third image where I used
            the second teapot as instance.

            As I said I don´t say it can´t work. But I made the experience that unless as plugin or tool can explicitly work with Vray Proxies, it usually
            will just take the viewport mesh for rendering. Now I don´t know Frost and from your setup it ´s hard judge as Vray with the default
            values will export a Teapot as whole mesh.
            Attached Files

            Comment


            • #7
              Ok, let me explain again...

              1. Pflow generates particles positions, orientations, scales, and so on (only particles, no geometry or even proxies)

              2. Frost takes those particles and place 1 standard plane mesh per particle, according to it's various properties.
              Resulting in a big mesh where each quad (two tris) represent a particle and has a correct UV for latter proxy distribution

              3. Multiscatter now works just as in normal situation, it distributes Vray Proxies on a source mesh, just what it is build for.
              In that case on the Frost generated mesh.
              The trick is to use UVs generated with Frost to place only one proxy in the center of each quad.

              I hope you got it
              Last edited by jop; 02-07-2012, 04:59 AM.

              Comment


              • #8
                Oh now I get it, sorry To do this you don´t need frost.
                You can use a standard Max Mesher object instead and within Multiscatter (well I only have vray scatter but i guess it´s similar)
                set the distribution to regular pattern/square and it will place one proxy in the middle of each plane within the mesher object.

                Comment


                • #9
                  You can use a standard Max Mesher object instead
                  Right, that's what I tied in the first place, but it crashed every time I tried
                  I think Frost has way better memory management, it 's activelly developped.

                  set the distribution to regular pattern/square
                  That's what I called "well configured" in my first post.
                  Actually you'll have to set the scale mutl to 1 too, tick "affect transform", "affect scale" and "afect Z scale" with both ratios set to 1.

                  Comment


                  • #10
                    Hi,

                    I know it's an old post but I downloaded the scene file and I have Frost and I got a temporary license of multiscatter just to try this but my render time is way longer than what jop got in the screenshot. It's more around 25 minutes. Could it be related to the new version of vray?Click image for larger version

Name:	22minProxy.jpg
Views:	1
Size:	330.3 KB
ID:	859643
                    Last edited by jstrob; 28-01-2016, 11:57 AM.

                    __________________________________________
                    www.strob.net

                    Explosion & smoke I did with PhoenixFD
                    Little Antman
                    See Iron Baby and other of my models on Turbosquid!
                    Some RnD involving PhoenixFD

                    Comment


                    • #11
                      Originally posted by jstrob View Post
                      Could it be related to the new version of vray?
                      I don't think so, but in any case I would just use the VRayInstancer.

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

                      Comment


                      • #12
                        VRayInstancer!!! I didn't know about that! thanks Vlado I'll give it a try. I just ordered Forest Pack Pro... maybe I should have wait... too late! Anyway I'm sure Forest Pack will be useful too one day... I hope...

                        __________________________________________
                        www.strob.net

                        Explosion & smoke I did with PhoenixFD
                        Little Antman
                        See Iron Baby and other of my models on Turbosquid!
                        Some RnD involving PhoenixFD

                        Comment


                        • #13
                          Ok I just tried to pick a PRT loader as a source for the VRayInstancer but it doesn't work... So it works only with pflow. I can use a PRT birth but pflow is so slow with millions of particles.... My particles are animated (I'm doing a collapsing sand castle) and with pflow (with only a prt birth and prt update) when i change the time slider, I see "pflow Update 0%" at the bottom and it's taking forever to update for obscure reasons. The PRT loader by itself loads a instantly when changing frame.

                          That would be awesome if we could pick a PRT loader instead (and read data from magma). I'm talking about that with Bobo about that at the same time on the Thinkbox forum. You should team up one day, aren't you both from Sofia?

                          I dream of Bobo and Vlado teaming up to create a new 3D software that would do everything without plugin just like Houdini!
                          Last edited by jstrob; 28-01-2016, 06:57 PM.

                          __________________________________________
                          www.strob.net

                          Explosion & smoke I did with PhoenixFD
                          Little Antman
                          See Iron Baby and other of my models on Turbosquid!
                          Some RnD involving PhoenixFD

                          Comment


                          • #14
                            Originally posted by jstrob View Post
                            That would be awesome if we could pick a PRT loader instead (and read data from magma).
                            It's possible of course, so long as there's an API for us to hook into.

                            I'm talking about that with Bobo about that at the same time on the Thinkbox forum. You should team up one day, aren't you both from Sofia?
                            We are both from Bulgaria

                            I dream of Bobo and Vlado teaming up to create a new 3D software that would do everything without plugin just like Houdini!
                            Well, even if we start today, it would take 15 years to get there

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

                            Comment


                            • #15
                              Originally posted by jstrob View Post
                              VRayInstancer!!! I didn't know about that! thanks Vlado I'll give it a try. I just ordered Forest Pack Pro... maybe I should have wait... too late! Anyway I'm sure Forest Pack will be useful too one day... I hope...
                              Have zero regrets about buying forest, it's very, very useful.

                              Comment

                              Working...
                              X