Shaders?

MADcello
2007-02-13
2013-05-28
  • MADcello
    MADcello
    2007-02-13

    There are a few more shaders in the "/sunflow/core/shaders" that are not implemented yet (in Blender exporter).

    What do the Uber shader do?

    Are the "Viewcautics" and the other "View.." a kind of a Yafray PhotonMap?

    Thank you!

     
    • The uber shader is alot like phong except it is controlled by a glossyness parameter which, if 0 replaces the specular with a straight reflection (like the shiny shader).

      It also allows texturing both the diffuse and specular colors, and even blending them with a flat color to easily tint the texture.

      The View* shaders are meant to be used as global overrides. They visualize those particular components of illumination and are usefull mainly if you are trying to tweak parameters for a specific thing (like gi or caustics).

      The other usefull shader is Wireframe which shows the tesselation of triangle models. It also is best applied as an override.

       
    • Eugene
      Eugene
      2007-02-13

      @MADcello
      Will you be updating the blender export script with the uber shader and wireframe?  We could probably add uber like the others, but for wire we could have the blender script write it as an override (Chris, I gather "override debug_wireframe false?) and use Blender's "Wire" button and sfwire like you did for the mirror and glass shaders.

      @Chris
      Three questions - sorry if I'm bombarding you.
      1)  I don't see the wire in SCParser, is the wireframe from the shader you did through janino?
      2)  I also see IDShader... what's that?
      3)  There are also Textured_X_Shader (where X is ward, phong, etc.).  Are these the same as if you took a standard shader and applied a modifier to it?

       
    • MADcello
      MADcello
      2007-02-13

      Yes, i am thinking of that (i'm having a full day, and tomorrow also).

      It is cool if the Wire overrides the other shaders!

      Let me see what i can get!

      About the Textured_X_shaders, there are already "sfsmbocc" and "sfdiffuse" Textured shaders in the code, but something doesn't seem so well (maybe repetition of shader names between normal and textured shader, but diferent parameters exported).

      What do you think about a View* shaders button (1 for each shader) appear when the respective GI is activated? Overriting, of course.

       
      • Buttons for the View* would be cool. Make sure the photon override is set to false so photon tracing still uses the regular shaders.

        About the Textured* variants: You are right, this is a bit weird at the moment. The idea is to eventually put in support for shader graphs so that arbitrary shaders can be combined freely (ie: plug a texture shader into a diffuse or phong shader). So don't worry too much about it for now.

         
    • MADcello
      MADcello
      2007-02-13

      There's nothing wrong about the already implemented Textured_shaders!
      i thnk i need some sfglasses :)

       
    • MADcello
      MADcello
      2007-02-14

      To late, they're already here (textured shaders).

      There's 1 shader and the respective textured that gave me error, the ShinyDiffuse (removed it again). I look at the SCparser.java and it seems the Shiny.

      Clean up a bit the mess i was introducing, "have created a function export_modifiers() instead of overloading the export_shaders()" and remove the repetition code for find an image texture with no image.
      Today i close the store. :)

      http://uploader.polorix.net//files/134/sunflow_export_merged_08.zip

       
    • Eugene
      Eugene
      2007-02-14

      @Madcello
      What do you mean by a "View* shaders button?"

       
    • Eugene
      Eugene
      2007-02-14

      Wait, I think I just figured it out.  Do you mean adding shader overrides to the export script?  Should we then add override buttons for gi and caustics?  I could do that in about a minute.