Results 1 to 5 of 5
  1. #1
    Member uriel's Avatar
    Join Date
    May 2006
    Location
    Mexico DF (MX)
    Posts
    251

    Scripting a new type of cycles material node, how to start ?

    Hi everyone,
    i was wondering how to start coding new material node, i need actually to do some coding for our work to simplify the on-going process.

    my first need is a cycle material node (type image texture) that include several images inputs and mixing factors...

    Well, i can do this using a group but i would love to learn to code a specific node for that purpose that serve our team !
    iīm used to script python for blender but i have never looked at the node tree and its caracteristics..

    can you help here to look at the correct doc pages and tutorials ?
    i have been looking over youtube and others sources but not finding the correct answers.. thanks
    uriel
    Location: Mexico City - MEXICO | Resume: Linkedin
    Art:CG Portfolio | FOSS Trainer



  2. #2
    Member uriel's Avatar
    Join Date
    May 2006
    Location
    Mexico DF (MX)
    Posts
    251

    Node scripting versus NodeGroup... for udims textures

    Recieving some help from friends, i came up only with a nodegroup system, quick to setup.
    I found the solution adapted at our challenge, using the so called UDIMS uvmap (multiple uv images/object), to be able to unwrap a large scale model with small textures formats.

    nodepreview.png

    using a 5x5 grid, with color tester and images ready
    Here is the file if you want to look at the various tests (2.79)
    UDIM_5x5.blend

    But still... is there an other way to get this result with a script ?
    Location: Mexico City - MEXICO | Resume: Linkedin
    Art:CG Portfolio | FOSS Trainer



  3. #3
    take a look at this blender branch. Udims are already working with image textures there in a way simpler way. just plug the first udim in the imagetexture nodes and it will automatically work and in uv image editor you can choose the tiles under display for unwrapping. the only real thing missing now is a good glass shader with caustics.

    https://blenderartists.org/forum/sho...Blender-builds



  4. #4
    Member uriel's Avatar
    Join Date
    May 2006
    Location
    Mexico DF (MX)
    Posts
    251
    Thatīs a good news ! in some cases, it is really needed...
    I do understand that the feature will come soon , but somewhere, i suppose there is also a way to get it with python or osl script ?
    and that is what i was looking for

    I anyone can show me where to look closer, i would be happy !

    first, Python or Osl ?
    Sec. python, i know how to do it, but it may take some times to adapt to this situation, and osl, i donīt know where to look to learn how to do this task, i found basic shader samples, but nothing really clear on textures and uvs... thanks a lot if you have some information for me...
    Location: Mexico City - MEXICO | Resume: Linkedin
    Art:CG Portfolio | FOSS Trainer



  5. #5
    Member Secrop's Avatar
    Join Date
    Dec 2011
    Location
    Berlin
    Posts
    1,981
    Originally Posted by uriel View Post
    Thatīs a good news ! in some cases, it is really needed...
    I do understand that the feature will come soon , but somewhere, i suppose there is also a way to get it with python or osl script ?
    and that is what i was looking for

    I anyone can show me where to look closer, i would be happy !

    first, Python or Osl ?
    Sec. python, i know how to do it, but it may take some times to adapt to this situation, and osl, i donīt know where to look to learn how to do this task, i found basic shader samples, but nothing really clear on textures and uvs... thanks a lot if you have some information for me...
    If what you want can be created with nodegroups, you can use Python nodes for adding more functionality to it. All you need is to encapsulate the node_tree into a NodeCustomGroup..

    You can check some examples in my github.



Posting Permissions

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