Announcement

Collapse
No announcement yet.

Send details to render

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

  • Send details to render

    Hello everyone,

    I am new to VRay.

    We have created a plugin in 3ds Max which deals with model and cloth. We are planning to give VRay render option to customers. For that, we need to send our model and cloth mesh details to render along with some other details like lights, camera position, etc.

    I went through VRay SDK and samples, got some ideas also. But, I am still confused where to start for rendering.

    can anyone suggest, from our plugin, how to send mesh details VRay and start rendering.

    Thanks in advance.

    Regards,
    Gopinath.

  • #2
    Hello,

    Could you elaborate a bit more on what details do you want to send to V-Ray. Ideally if your geometry provides a Max Mesh object V-Ray should just render it.

    Best regards,
    Yavor
    Yavor Rubenov
    V-Ray for 3ds Max developer

    Comment


    • #3
      Hello,

      Thanks for your reply.

      Yes, our geometry provides max mesh object (edit mesh).

      We have our own render UI dialog in our plugin, in that we are doing some settings and passing to renderer. current renderer, User can select renderer available from the list. This is rendering fine with selected renderer includes VRay too.

      But, we are facing some issues when we are rendering with VRay.

      Like, the colors which we are applying on the cloth mesh, is reflecting over the model also. Check attached image file

      And, with Ortho view, some zoom settings are not working properly (one of our colleague already made a request also about this). please download the video from the below link for the issue.

      https://we.tl/t-p7ZM5Cp3mQ

      Some of the settings which is available in max render, we need to do that through code without opening max render dialog, for eg, sampler is setting to progressive by default, we need to change that Bucket.

      just need to check whether these can be solved through SDK.

      Regards,
      Gopinath.

      Comment


      • #4
        For the color issue - is it possible that this is some kind of GI bleed from the cloth material. What is the cloth material and what are your render settings ?
        For the Ortho view issues - it is a known issue with V-Ray GPU (internal number VMAX-8968 ). I've bumped its priority a bit.

        To control the various render settings through code you don't need to use the V-Ray SDK - all the settings are in ParamBlock2 of the render object and you can control them with the Max C++ access. That would be something like this:
        Code:
        Renderer *renderer=.../*get the renderer - for example GetCOREInterface()->GetProductionRenderer();*/
        if (!renderer)
           return;
        
        Class_ID classID=renderer->ClassID();
        
        if (Class_ID(0x698a4b98, 0x4edd05f5)==classID) { // V-Ray GPU class ID
           // V-Ray GPU has only one param block
           IParamBlock2 *gpuPBlock=renderer->GetParamBlockByID(0);
           if (gpuPBlock) {
              gpuPBlock->SetValue(93/*id of the sampler type parameter*/, TimeValue(0), 0 /*0 - bucket, 1-progressive*/);
           }
        } else if (Class_ID(0x73bab286, 0x77f8fd0c)==classID) {
           IParamBlock2 *pblockIS=renderer->GetParamBlockByID(2 /*V-Ray has multiple blocks, ID 2 is the id of the Image sampler settings pblock*/);
           if (pblockIS)
              pblockIS->SetValue(361/*id of the sampler type parameter*/, TimeValue(0), 0 /*0 - bucket, 1-progressive*/);
        }
        Yavor Rubenov
        V-Ray for 3ds Max developer

        Comment


        • #5
          Hello Yavor,

          Thanks for your quick reply and suggestions.

          cloth material is multi / subobject, in which each piece is applied with double sided material, and each of them are standard material. Default render settings of VRay.

          Thanks for pushing up zoom issue.

          will try with the paramblock method as you suggested.

          Regards,
          Gopinath.

          Comment


          • #6
            Hello Yavor,

            When i tried to get the names of each paramblock items using id, i am getting more empty names. i am attaching the file which i got the details, can you please provide me a complete list, so that i can look into other sections for what to use.



            Regards,
            Gopinath.
            Attached Files

            Comment


            • #7
              You seem to be using V-Ray GPU as your production render. It has some specific set of options in addition to the standard V-Ray options. What you've got in the text file are the V-Ray GPU options. To get the regular V-Ray options you need to do:
              Code:
              if (Class_ID(0x698a4b98, 0x4edd05f5)==classID) { // V-Ray GPU class ID
                      Renderer *vrayRenderer=static_cast<Renderer*>(renderer->GetReference(1));
              and then the vrayRenderer will contain the rest of the options.
              Yavor Rubenov
              V-Ray for 3ds Max developer

              Comment


              • #8
                Hello Yavor,

                Thanks for your reply with details. Using this, i got the required information.

                Also, I would like to set "Start Interactive Render" option always on. I can click on the option available in the render window. But, is there anyway to do this through code, so that user doesn't need to click on that manually?

                Please see the image file for which i am asking.

                Regards,
                Gopinath.

                Comment


                • #9
                  You can use the following function to start interactive rendering:
                  Code:
                  vrayStartIPR()
                  and the following to stop it:
                  Code:
                  vrayStopIPR()
                  Yavor Rubenov
                  V-Ray for 3ds Max developer

                  Comment


                  • #10
                    Thanks Yavor, will give it a try.

                    Comment

                    Working...
                    X