Results 1 to 4 of 4

Thread: GTR Reflection, anisotropic orientation?

  1. #1
    Join Date
    Dec 2004
    Location
    Moscow, Russia
    Posts
    682

    Default GTR Reflection, anisotropic orientation?

    Hi
    I'm trying to code anisotropic GTR reflection and faced with the issue of anisotropic orientation.
    Isotropic works fine.
    Please help. What's wrong with my code?
    Code:
    //vector to Cartesian
    H.x = SinTheta * cos( Phi );
    H.y = SinTheta * sin( Phi );
    H.z = CosTheta;
    
    mi_vector_normalize(dU);
    mi_vector_normalize(dV);
    
    //compute tangents
    mi_vector_prod(&TangentX, dV, rdir);	//tangent orthogonal to dV and mirror reflection
    mi_vector_normalize(&TangentX);
    mi_vector_prod(&TangentY, rdir, &TangentX);
    
    //apply transform matrix
    result->x = TangentX.x * H.x + TangentY.x * H.y + rdir->x * H.z;
    result->y = TangentX.y * H.x + TangentY.y * H.y + rdir->y * H.z;
    result->z = TangentX.z * H.x + TangentY.z * H.y + rdir->z * H.z;

    Last edited by Puppet; July 29th, 2015 at 13:05.
    Pavel Ledin

  2. #2
    Join Date
    Dec 2004
    Location
    Moscow, Russia
    Posts
    682

    Default

    Anyone please?
    Pavel Ledin

  3. #3
    Join Date
    Feb 2012
    Location
    Detroit
    Posts
    12

    Default

    Hey man!

    Can you share the code for how you implemented GGX in mental ray? I compile shaders myself and am interested in this. Is there a way to compile shaders to use with the mila library?

  4. #4
    Join Date
    Dec 2004
    Location
    Moscow, Russia
    Posts
    682

    Default

    Sorry for delay...
    You may download my shaders here: http://www.puppet.su/download/shaders_p_e.shtml shaders_p 3.5 beta 5, only for windows and without source code.
    If you need source code: https://sourceforge.net/projects/shadersp/

    If you interest in GTR(GGX) reflection, you'll need p_Sheet shader from this pack.
    GTR code is based on this paper: https://disney-animation.s3.amazonaw...f_notes_v2.pdf
    I develop this shader for our new project. Basicly it's in-house shader. I share it just for more testing before production. It is almost ready.
    p_Sheet works much faster than MIA or MILA in most cases.

    Happy testing! And please share your tests
    Last edited by Puppet; April 6th, 2016 at 22:30.
    Pavel Ledin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •