Results 1 to 3 of 3

Thread: Can we please get a shader node example for LW2018 LWSDK?

  1. #1
    Electron wrangler jwiede's Avatar
    Join Date
    Aug 2007
    Location
    San Jose, CA
    Posts
    6,162

    Can we please get a shader node example for LW2018 LWSDK?

    Title's pretty self-explanatory. While lwsurfaceshader.h APIs, etc. is included in LW2018 SDK, and bears similarity to lwshader.h APIs, etc. from prior SDK, it would still be quite useful to have a proper example of using the new lwsurfaceshader.h approach to implement a simple example (and ideally, a not-so-simple example, f.e. SSS, as well).
    Last edited by jwiede; 02-20-2018 at 04:16 PM.
    John W.
    LW2015.3UB/2018.0.5 on MacPro(12C/24T/10.13.6),32GB RAM, NV 1080ti

  2. #2
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,643
    Quote Originally Posted by jwiede View Post
    Title's pretty self-explanatory. While lwsurfaceshader.h APIs, etc. is included in LW2018 SDK, and bears similarity to lwshader.h APIs, etc. from prior SDK, it would still be quite useful to have a proper example of using the new lwsurfaceshader.h approach to implement a simple example (and ideally, a not-so-simple example, f.e. SSS, as well).
    What you have in lwsurfaceshader.h is for making "Shading Model", that you set in Surface Editor top most tabbed menu.. and then drop-down of them..

    Renderer asks for Material that user set in Node Editor, ATM built-in Principled BSDF or Standard are filling LWBSDF (created by LWBSDFFuncs by LW),
    then Photoreal Shading Model (or yours handler) is called with LWBSDF that has been returned.
    You analyze supplied LWBSDF using LWBSDFFuncs, and output something.

    Quote Originally Posted by jwiede View Post
    (and ideally, a not-so-simple example, f.e. SSS, as well).
    SSS node you should make using lwnodes.h

    If you have Material output, LWBSDF is already passed to your node.

    In Evaluate():

    LWBSDF bsdf = Output_GetValue( value );
    ( *m_BSDFFuncs->resetBSDF )( bsdf ); // just example
    // create LWBXDF and attach them to LWBSDF
    LightWave Plugins
    Global Materials for LightWave 2018!
    Custom plugin writing. Request a quote.

  3. #3
    Electron wrangler jwiede's Avatar
    Join Date
    Aug 2007
    Location
    San Jose, CA
    Posts
    6,162
    Thanks, I really appreciate the info! I have a few questions, but easier to give context, etc. in email -- probably won't get back to that project for a couple weeks, unfortunately, work's busy.

    Still, actual samples would be nice too.
    Last edited by jwiede; 02-28-2018 at 10:17 PM.
    John W.
    LW2015.3UB/2018.0.5 on MacPro(12C/24T/10.13.6),32GB RAM, NV 1080ti

Bookmarks

Posting Permissions

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