Announcement

Collapse
No announcement yet.

SDK: Applying a texture map problem

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

  • SDK: Applying a texture map problem

    Hello,
    I am trying to apply a texture map to a BRDF material, but in the VRF, the object just looks white...
    Below is what I tried. Could anyone point out what I did wrong please?



    TexBitmap tx = renderer.NewPlugin<TexBitmap>();

    BitmapBuffer bb = renderer.NewPlugin<BitmapBuffer>();
    bb.File = @"C:\Users\xxxx\Desktop\Image Data\Brick2.jpg";

    tx.Bitmap = bb;

    BRDFDiffuse newBRDF = renderer.NewPlugin<BRDFDiffuse>();

    newBRDF.ColorTex = tx;

    MtlSingleBRDF newMaterial = renderer.NewPlugin<MtlSingleBRDF>();

    newMaterial.Brdf = newBRDF;

    ​​

  • #2
    Hi, juhun_lee

    I don't see issues in the code you sent, although you may try the recommended BRDFVRayMtl instead of the BRDFDiffuse plugin, as it is in the texture\01-bitmap from the examples.
    Code:
    BRDFVRayMtl brdf = renderer.NewPlugin<BRDFVRayMtl>();
    brdf.Diffuse = tx;
    If this doesn't work again, you could send us a minimal code example or vrscene to reproduce at our side.

    Comment


    • #3
      plamen.grozev
      Thank you so much!
      It didn't work out though, unfortunately...

      Code are in Rhino/Grasshopper C# componant and not sure how to share that... and this forum doesn't allow me to upload scene file...
      But I do have a log file. Hope this helps...
      Thank you for your help.
      Best
      Attached Files

      Comment


      • #4
        Hi, juhun_lee
        I don't see anything suspicious in the log, you could try updating the NVIDIA driver to version 536.40, as the colleagues from the GPU team suggest - https://www.chaos.com/vray-gpu

        If the issue is still there, you could send us a vrscene file exported from your Rhino integration with - renderer.ExportScene("exported.vrscene"), plus the asset Brick3.jpg
        Just for information, does the issue occur if you don't render on GPU?
        E.g. renderer.RenderMode = RenderMode.PRODUCTION; or renderer.RenderMode = RenderMode.INTERACTIVE;

        Comment


        • #5
          Hi plamen.grozev
          Thanks for your attention.

          Last few days, I have tested many different cases:
          1. My own scene and geometries -> No texture shows up... Only I could see some color-bleeding from the colors of texture image file.
          2. Copy & pasted codes from SDK examples to populate geometries with texture and a scene -> No texture shows up with the color bleeding
          3. Loaded scene (material.vrscene) from SDK examples. AND TEXTURE SHOW UP. I could change texture map files and the scene correctly renders various texture files.

          BTW, I can't upload a scene file here though... the forum says, it doesn't allow that.
          I can also try to update my driver and see... but considering the Blogs works, I feel that it is something else with scene settings?

          Best,

          Comment


          • #6
            Hi, juhun_lee
            If the forum blocks some attachments, you could email us at vrayappsdk@chaos.com

            BTW, there's also a handy function in VRayRenderer, which sets various plugin parameter values with 5 diffrerent quality presets, before you start rendering:
            SetImprovedDefaultSettings(DefaultsPreset preset=DefaultsPreset.Medium)

            Comment

            Working...
            X