Announcement

Collapse
No announcement yet.

Open EXR metadata from 3dsmax

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

  • Open EXR metadata from 3dsmax

    Hey gang,
    Im seeing that 3ds max saves metadata to the EXR file format. Does anyone know how that is done? I saw a value of exr/cameraTargetDistance and it seems to get that information from the vray render settings, not the max camera. Is this coming from vRay? How can I add my own EXR meta data to the image sequence?

    Fred

  • #2
    If you are save through the 3ds Max frame buffer, then you can define your own metadata, I think. If you save through the V-Ray VFB, then for the moment this is not exposed in the UI.

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

    Comment


    • #3
      Ah perfect - I was just talking to someone in here about that - using a position pass and camera data to allow multiple layers of vray renders to automatically go in front and behind each other correctly. This is available in vray for maya as far as I know but you're saying if I render another blank pass from the main render buffer and not the vray version, it'll allow me to save the camera data as a workaround?

      Comment


      • #4
        If all you need is the camera target distance, enable DOF for a moment, turn on the "Get from camera" option, and then disable DOF. Then V-Ray will write the correct camera target into the file.

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

        Comment


        • #5
          On the other hand, if you need arbitrary data, look in the MaxScript help - it should say how to specify additional metadata for the standard 3ds Max OpenEXR saver.

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

          Comment


          • #6
            Hmm, it might be a bit more than that. I think this is tool people in here are looking at - http://www.vfxtalk.com/forum/nuke-pl...ed-t22969.html

            Comment


            • #7
              Yep, you get the exact same info from 3ds Max - the only caveat is the camera target distance, which I explained how to get out properly. The Y and Z axes of the camera transformation might also need to be swapped, but that can be done in Nuke.

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

              Comment


              • #8
                Brilliant. Off to do some testing, much appreciated for the confirmations!

                Comment


                • #9
                  Additional data can be injected via automated post processes if needed. Which is what we do here for quite a lot of info. When swapping Y and Z mind you that rotations are a tad more complex then just exchanging them :P

                  btw...that was a short visit on irc :P

                  Thorsten

                  Comment


                  • #10
                    Hi Vlado, you mention the V-Ray VFB exr settings are not exposed via UI currently. Are they available through scripting / vray sdk?

                    In particular, we would like to control the compression method (currently uses block zip, we would like to have zips), and also add our custom metadata pre/post render, potentially mid-render too. Currently we use custom render elements for this, but its very clunky.


                    cheers,
                    laszlo

                    Comment


                    • #11
                      Vlado mentioned in another thread about adding options to the vrimg2exr that the internal vray builds can now write directly to scanline exr files, so hopefully if it uses the data window too we'll have nice nippy files in nuke / fusion!

                      P.s. give lele a punch in the beard.

                      Comment


                      • #12
                        Originally posted by laszlo_sebo View Post
                        Hi Vlado, you mention the V-Ray VFB exr settings are not exposed via UI currently. Are they available through scripting / vray sdk?
                        They are available from C++ by modifying the V-Ray sequence data structure, for example from a render element, a V-Ray settings plugin or any other V-Ray plugin that has access to this structure. The code would be something like this:
                        Code:
                        void setupSequenceData(VR::VRaySequenceData &sdata) {
                          sdata.params.vfb.exrCompression=(VUtils::ExrCompression) compression; // Set compression method
                          sdata.params.vfb.exrUseHalf=(bitsPerChannel==16)? true : false; // Bits per channel
                          sdata.params.vfb.extraAttribStr = extraAttributes.empty() ? NULL : extraAttributes.ptr(); // Additional metadata attributes
                          if (autoDataWindow) sdata.params.vfb.modeflags|=VM_EXR_DATAWIN; // Automatically compute data window from the alpha channel
                        }
                        The VM_EXR_DATAWIN flag is only available in the latest nightly builds. For the format of the additional attributes, see the Open EXR options section in the V-Ray for Maya help index here: http://www.spot3d.com/vray/help/maya...#image_options

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

                        Comment


                        • #13
                          This is beautiful Vlado thank you! I'll give that a try right away.

                          joconnell: Ill make sure to punch Lele somewhere He shaved his beard (for the ladies i think), but his head has plenty of hairy spots left.


                          Originally posted by vlado View Post
                          They are available from C++ by modifying the V-Ray sequence data structure, for example from a render element, a V-Ray settings plugin or any other V-Ray plugin that has access to this structure. The code would be something like this:
                          Code:
                          void setupSequenceData(VR::VRaySequenceData &sdata) {
                            sdata.params.vfb.exrCompression=(VUtils::ExrCompression) compression; // Set compression method
                            sdata.params.vfb.exrUseHalf=(bitsPerChannel==16)? true : false; // Bits per channel
                            sdata.params.vfb.extraAttribStr = extraAttributes.empty() ? NULL : extraAttributes.ptr(); // Additional metadata attributes
                            if (autoDataWindow) sdata.params.vfb.modeflags|=VM_EXR_DATAWIN; // Automatically compute data window from the alpha channel
                          }
                          The VM_EXR_DATAWIN flag is only available in the latest nightly builds. For the format of the additional attributes, see the Open EXR options section in the V-Ray for Maya help index here: http://www.spot3d.com/vray/help/maya...#image_options

                          Best regards,
                          Vlado

                          Comment


                          • #14
                            Golden! Great stuff. Thanks for bringing that up! Will definitely have to look into that

                            Comment


                            • #15
                              How does this actually work Vlado - is it a case where the vrimg is being held in memory or on disk as the buckets write to tiles of the image, then the lot is converted to a scanline as a final post process on the render?

                              Comment

                              Working...
                              X