Announcement

Collapse
No announcement yet.

SDK: Normals and BumpNormals

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

  • SDK: Normals and BumpNormals

    Hi,

    how do I set my BumpNormals, so they are outputted in the BumpNormals-RenderElement?

    Or do I just write them manually in the traceForward()-method?

    Aya~

  • #2
    Originally posted by Aya View Post
    Or do I just write them manually in the traceForward()-method?
    Yep. This is what VRayMtl does also. V-Ray itself is not aware of what normals you will be using in your material.

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

    Comment


    • #3
      Okay, but then I have an other problem..

      I wrote the material using Vray Sp2 for Max 2009.. I transformed my normals like this:

      Code:
      VR::BSDFSampler* VRayScanlineMtlBase::newBSDF(const VR::VRayContext &rc, VR::VRenderMtlFlags flags) {
      
      		Point3 bumpValue = bumpMap->EvalNormalPerturb(sc);
      		bumpValue *= ((float)bumpStrength * 0.005f);
      		sc.SetNormal(FNormalize(sc.Normal() + (sc.backFace ? -bumpValue : bumpValue)));
      
      //[... other BSDF Init Stuff]
      }
      and it works all fine.

      But in Sp3 now, when I connect an VRayDirt to my Diffuse-Color-Channel, the dirt is ignoring my normal-transformations... in Sp2 it's working, in Sp3 not... why? What's the difference?

      (With a normal Max-StdMaterial it's working in both.. Sp2 and Sp3)

      Aya~

      Comment


      • #4
        I'm not quite sure, but you have the sources of VRayDirt in the SDK, so you can debug it and see what happens.

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

        Comment

        Working...
        X