Announcement

Collapse
No announcement yet.

shader writting

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

  • #31
    Hi Vlado,

    We've implemented a dependency node in Maya as a Maya plugin to dynamically create geometry at render time (similar to vrayplane in the sdk directory).
    However, we are unable to load our proprietary plugin on machines that don't have VRay installed (lack of vray.dll).
    Our proprietary node must exist in early stages (modeling, animation), and those machines don't need to install VRay.
    Is there a way to load our plugin without vray.dll?
    Thanks!

    Best regards,
    Gene

    Comment


    • #32
      Originally posted by genelin1211 View Post
      Is there a way to load our plugin without vray.dll?
      It depends on which functions are used from the V-Ray library, but in general such situations are solved by splitting the plugin in two parts - one is a V-Ray independent part; and the other part contains all the V-Ray related code and is loaded on demand when needed. Or if you only use several functions from the V-Ray library, they can be loaded dynamically only when needed - you can use the dependency explorer tool on Windows to find out which functions are needed.

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

      Comment


      • #33
        Thanks, Vlado.

        I ended up putting all V-Ray dependent part into another dll and use that dll to do the plugin creation and parameter assignment job.

        Best regards,
        Gene

        Comment


        • #34
          Hi Vlado,

          I've tried to export our custom geometry (with motion blur) to vrscene both in maya and mayabatch, but the exported vrscene are not identical that causes the scene exported in mayabatch rendered without motion blur.
          Here is the exported fragment using maya:
          Code:
          Node bigCatShape1@node {
            transform=TransformHex("0000803F0000000000000000000000000000803F0000000000000000000000000000803F00000000000000000000000000000000000000000000000000000000");
            geometry=bigCatShape1@geometry2;
            material=bigCatMtl1_bigCatShape1@renderStats;
            nsamples=interpolate(
              (14, 0)
            );
            visible=1;
            user_attributes="";
          }
          Here is the exported fragment using mayabatch:
          Code:
          Node bigCatShape1@node {
            transform=TransformHex("0000803F0000000000000000000000000000803F0000000000000000000000000000803F00000000000000000000000000000000000000000000000000000000");
            geometry=bigCatShape1@geometry2;
            material=bigCatMtl1_bigCatShape1@renderStats;
            nsamples=interpolate(
              (14, 1)
            );
            visible=1;
            user_attributes="";
          }
          The only difference is the parameter: nsamples=interpolate((14,1));
          If I set the parameter to nsamples=interpolate((14,0)), the scene will be rendered with motion blur.
          Any idea why nsamples is exported differently in mayabatch?
          Thanks!

          Regards,
          Gene

          Comment


          • #35
            It's different because Maya and V-Ray cannot detect that there is a change in your plugin from one frame to the next. In GUI mode, you probably have a changing viewport representation, the evaluation of which causes the object to be marked as "dirty" and animated. But in batch mode there is no GUI, and apparently nothing else indicates any change on the object. I will look if we can work around this, but for the moment, simply making the transform of your object animated (even if it doesn't really change) should solve the problem.

            Also, if you are generating the geometry yourself, then you should be able to generate motion-blurred geometry regardless of the node "nsamples" values (f.e. we do that for meshes that have velocity vectors), but I'm not familiar with your code.

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

            Comment


            • #36
              Thanks, Vlado.

              I ended up setting key on the "scale" attribute of the transform of our custom geometry with a tiny difference between two keys, and it worked!
              But it would be better if you have a "direct" solution
              What do you mean by generating motion-blurred geometry? Our code is based on the sample vray_geom_hair, how do you do that in the sample?
              Thanks!

              Regards,
              Gene
              Last edited by genelin1211; 17-05-2012, 02:39 AM.

              Comment

              Working...
              X