Announcement

Collapse
No announcement yet.

Complex V-Ray Shaders baking.

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

  • Complex V-Ray Shaders baking.

    Hey,

    Is there currently any script / tool that allow baking to texture all the v-ray shading parameters like IOR, reflect, refract itp ?

    Basically something that could bake down all the procedural noises / mixes / vrayblends / multisubs to set of textures (diff,refl,refr,fresnelIOR,reflGloss,refrGloss) that could be used on a single VRayMtl.

    This is for 3 reasons:

    1. Easier transfer to other applications.
    2. Usually single VRayMtl renders faster than many blends.
    3. Simple VRayMtl with textures would be easy to render in GPU RT.

    Best,
    Tomasz
    @wyszolmirski | Dabarti | FB | BE

  • #2
    You can render to texture an object with just that map assigned, use light mat and self-illum RTT element.

    Or use the render map option in the material editor when you're just using the default UV space.
    Rens Heeren
    Generalist
    WEBSITE - IMDB - LINKEDIN - OSL SHADERS

    Comment


    • #3
      What Rens said. Just make sure you save your RTT as floating point image, so intensity of reflected light is still there.
      Software:
      Windows 7 Ultimate x64 SP1
      3ds Max 2016 SP4
      V-Ray Adv 3.60.04


      Hardware:
      Intel Core i7-4930K @ 3.40 GHz
      NVIDIA GeForce GTX 780 (4096MB RAM)
      64GB RAM


      DxDiag

      Comment


      • #4
        I've been asking mainly to see what's the approach in this kind of situations. Basically I've wrote a script that automates that and creates simple VRayMtl that looks identical as before baking. But maybe there is some way to optimizing it, making things faster.

        It looks like this:



        Turnes this:



        Into this:



        Looks basically the same:




        We're doing this for ability to optimize render times... Less bercons, vraydirts, procedurals. Before script it took 2:30 min to render, after around 30s with 2k textures. At the end we also convert it to tiled exr/tx for better memory management.

        Also I wonder how useful would that be to anyone else ?

        Best,
        @wyszolmirski | Dabarti | FB | BE

        Comment


        • #5
          Originally posted by wyszolmirski View Post

          Also I wonder how useful would that be to anyone else ?
          Very useful!

          Comment


          • #6
            Yeah very nice, though the user would have to keep in mind that this would not work with for example view-dependent maps like Falloff.
            Rens Heeren
            Generalist
            WEBSITE - IMDB - LINKEDIN - OSL SHADERS

            Comment


            • #7
              Yes. It doesn't work with any camera-view dependent maps. And only on correctly mapped objects. No overlapped UVs no flipped geometry and UV (this will screw up normal bump). You have to know what you're doing and it will just automates some things to make life easier.

              The way I'm doing it is that It bakes whatever is possible by default through RTT, and the rest is baked by converting vray shaders in correct way so the reflection / fresnel IOR etc. will appear as DiffuseFilter map. So far it works very well. Probably quite buggy as we're just starting to test drive it and it will evolve over time.

              Cool thing is that we were able to easily render our older assets on RT GPU without difference in shading caused by all the procedural maps.


              Best
              @wyszolmirski | Dabarti | FB | BE

              Comment


              • #8
                I wonder is the hit because you've got three shaders being calculated as well as all the maps? As in if you could mix all of the maps and then feed them into a single vray material instead of using the blend material and thus calculate less rays?

                Nice results though!

                Comment


                • #9
                  I think you're right. If the maps would be mixed differently and fed directly to the VRaymtl, it would be faster than VRayBlend. It's just way more time consuming. But still, bercons, vraydirts aren't the fastest to render out and its best to bake them in most cases.

                  The aim we have now is to create library of shaders that could be reused for our models... Procedural, with tiled maps, vraydirts anything that gives fast results and look good. And than at the end baked down to single VRayMtl with proper maps. It also could be easily converted to VRayVRmatMtl and transferred to other apps. We are building big library of models for our internal use, and the pipeline is designed in the way that those models could be sold on Turbosquid later on.

                  Speed improvement is very nice side effect. I'm mainly after faster production and universal assets. Baked maps from this workflow did work quite well in Element 3D in After effects.

                  If anyone would like to beta test this script and have time to give me feedback, drop me an PM.

                  Best,

                  Tomasz
                  @wyszolmirski | Dabarti | FB | BE

                  Comment


                  • #10
                    I would love to!
                    It's been a while I was wanting/waiting for something like this.

                    I would appreciate if I could beta test this for/with you.

                    Cheers

                    Stan
                    3LP Team

                    Comment

                    Working...
                    X