Page 308 of 830 FirstFirst ... 208258298306307308309310318358408808 ... LastLast
Results 6,141 to 6,160 of 16595
  1. #6141
    Member kram1032's Avatar
    Join Date
    Dec 2006
    Location
    near Vienna
    Posts
    3,234
    Node sharing would be great indeed. If not for anything else, it would be awesome for easily building up some nice material libraries - potentially bundled right into your Blender build in a special MatLib folder or something.



  2. #6142
    Member Joel_nl's Avatar
    Join Date
    May 2007
    Location
    Enschede, the Netherlands
    Posts
    610
    Some standard "node presets" would be good yeah, additional ones could be downloaded/imported later-on.
    My idea was to be able to export Frame nodes, saving people the time and effort of having to figure things out themselves.
    And ofcourse as shown many times on the forums, when people share shading/node setups other can improve them!

    And by doing this, we would gradually build a library of Textures/Shaders/etc in the form of different node setups.
    Last edited by Joel_nl; 06-May-12 at 10:57.



  3. #6143
    Member Farmfield's Avatar
    Join Date
    Dec 2011
    Location
    H'sing Island
    Posts
    1,759
    Originally Posted by mattebb View Post
    colour = exp( -absorbed colour * absorption factor * distance )
    LOL, kinda proves a point I make sometimes when I'm asked about what applications to learn to get a job working professionally with 3D...

    Mathlab...

    Originally Posted by kram1032 View Post
    Node sharing would be great indeed. If not for anything else, it would be awesome for easily building up some nice material libraries - potentially bundled right into your Blender build in a special MatLib folder or something.
    Mmm, I think it would be great for a specific material filetype in script form, kinda like 'export material as script' (with it's own filetype, like .bms - blender-material-setup - or something)
    Last edited by Farmfield; 06-May-12 at 10:29.



  4. #6144
    Member
    Join Date
    May 2009
    Location
    Odenton, Maryland, USA
    Posts
    186
    Originally Posted by blaize View Post
    Wouldn't it be cool if we were to be able to export certain node groups, and share them?
    If we were to make custom nodes for everything, things would get bloated very fast.
    Also, being able to export/import node groups would make it easy to tweak them later on.

    These node groups would then be shared using the blender plugin system(?) and be version sorted, to make sure they work as expected.

    thoughts?
    NOTE: I am not a programmer.

    This idea sounds so useful and obvious, I'm honestly surprised it wasn't implemented from the start. Are there technical challenges involved in making this idea difficult to write?



  5. #6145
    Member
    Join Date
    Dec 2004
    Location
    cph
    Posts
    836
    This is being worked on:

    http://wiki.blender.org/index.php/Us...e/AssetBrowser

    As I understand it, this will make it easy to reuse and share assets (including nodes).



  6. #6146
    Member niabot's Avatar
    Join Date
    Nov 2009
    Location
    Germany
    Posts
    310
    @Mattebb: I improved your shader a little, by removing some unnecessary inversions. Additionaly i put in some kind of pearl material. ;-)

    Improved file




  7. #6147
    Member Bao2's Avatar
    Join Date
    Aug 2009
    Location
    Galicia - Spain
    Posts
    4,832
    Originally Posted by mattebb View Post
    it's using beer's law:
    colour = exp( -absorbed colour * absorption factor * distance )
    Works much better than Agus3D formula. Very noticeable with high absorptions.

    I searched "beer's law" and nowhere I can find your formula. I find these ones (that don't work):

    C1 / C2 = A1 / A2 in one page

    A = e b c in other page (e=molar something...; b=length; c=constant something...)

    in other page (this is the only one showing the constant e (that exp thing)

    So: Where you found that wonderful formula?


    Originally Posted by blend_B View Post
    would it be possible to have a material that only raytraces the lights and ignores objects around it? sometimes you have a material where you see the specular but nothing else. could speed up the rendering for some materials.
    Fake specular is only able this way: (you need to move that sphere you see until it points to the light, so every object would need probably a different material if they need different placement of the specular):
    (change the power and multiply nodes values to get different shapes of the specular reflection)
    I think this was posted first by Sanne? here in this thread somewhere...
    (right click on the image and View image to see it fully)

    Last edited by Bao2; 06-May-12 at 15:17.
    >>> Neytiri WIP <<<
    When explanations are complex you know there is no Truth on it.
    Tangled Fan Art



  8. #6148
    Member NRK's Avatar
    Join Date
    Aug 2009
    Location
    Washington, USA
    Posts
    963
    Originally Posted by blaize View Post
    Wouldn't it be cool if we were to be able to export certain node groups, and share them?
    If we were to make custom nodes for everything, things would get bloated very fast.
    Also, being able to export/import node groups would make it easy to tweak them later on.

    These node groups would then be shared using the blender plugin system(?) and be version sorted, to make sure they work as expected.

    thoughts?
    Here is a python script that creates a node material in python, I also have a script that creates Node Groups. I reported several bugs and Campbell, Sergey and Brecht fixed them in order to be able to do this. Just run this script with any object selected and it creates the material. I have other scripts that create node groups. I have been working on this in my off time as an update for ANT landscape to auto generate cycles materials for the landscapes. It is theoretically possible to create an add on that will take any material and generate a script like this for you that creates the node group. We could easily create an add on that gives you advanced node groups from a library of these scripts.



    Code:
    import bpy
    
            
    def CreatMixShader(NodeTree,x,y,fac):
        MixShader = NodeTree.nodes.new('MIX_SHADER')
        MixShader.location = [x,y]
        for NodeSocket in MixShader.inputs:
            if NodeSocket.name == 'Fac':
                NodeSocket.default_value = fac
                print('found')
        return MixShader
    
    def CreateDotProductNormalNodes(NodeTree,x,y):
       #Dot Poduct Nodes
        Geometry = NodeTree.nodes.new('NEW_GEOMETRY')
        Geometry.location = [-550-x,y]
        MathLessThan = NodeTree.nodes.new('MATH')
        MathLessThan.location = [-200-x,y]
        MathLessThan.operation = 'LESS_THAN'
        MathLessThan.inputs[1].default_value = .65
        MathDProduct = NodeTree.nodes.new('VECT_MATH')
        MathDProduct.location = [-350-x,y]
        MathDProduct.operation = 'DOT_PRODUCT' 
        MathDProduct.inputs[1].default_value = [0,0,1]
        MathAdd1 = NodeTree.nodes.new('MATH')
        MathAdd1.location = [-x,y]
        MathAdd1.operation = 'ADD'
        MathAdd1.inputs[1].default_value = .189
        
        NodeTree.links.new(MathDProduct.inputs[0],Geometry.outputs[1])
        NodeTree.links.new(MathLessThan.inputs[0],MathDProduct.outputs[1])
        NodeTree.links.new(MathAdd1.inputs[0],MathLessThan.outputs[0])
        
        return MathAdd1.outputs[0]   
         
    def CreateRockTextureNodes(NodeTree,x,y):
        #Rock Texture
        Geometry1 = NodeTree.nodes.new('NEW_GEOMETRY')
        Geometry1.location = [x-180,y-110]
        Mapping = NodeTree.nodes.new('MAPPING')
        Mapping.scale = [1,.8,1]
        NoiseTex = NodeTree.nodes.new('TEX_NOISE')
        NoiseTex.location = [x+407,y-81]
        NoiseTex.inputs[1].default_value = 10.548
        NoiseTex.inputs[2].default_value = 4
        NoiseTex.inputs[3].default_value = .1
        MathMultiply1 = NodeTree.nodes.new('MATH')
        MathMultiply1.location = [x+600,y-91]
        MathMultiply1.operation = 'POWER'
        MathMultiply1.inputs[1].default_value = .01  
        
        NodeTree.links.new(Mapping.inputs[0],Geometry1.outputs[0])
        NodeTree.links.new(NoiseTex.inputs[0],Mapping.outputs[0])
        NodeTree.links.new(MathMultiply1.inputs[0],NoiseTex.outputs[1])
    
        TexCoord1 = NodeTree.nodes.new('TEX_COORD')
        TexCoord1.location = [x-180,y-310]
        Mapping1 = NodeTree.nodes.new('MAPPING')
        Mapping1.scale = [1,.8,.1]
        NoiseTex1 = NodeTree.nodes.new('TEX_NOISE')
        NoiseTex1.location = [x+407,y-310]
        NoiseTex1.inputs[1].default_value = 15
        NoiseTex1.inputs[2].default_value = 7
        NoiseTex1.inputs[3].default_value = .1
        MathMultiply2 = NodeTree.nodes.new('MATH')
        MathMultiply2.location = [x+600,y-310]
        MathMultiply2.operation = 'MULTIPLY'
        MathMultiply2.inputs[1].default_value = 12.33 
        
        NodeTree.links.new(Mapping1.inputs[0],TexCoord1.outputs[0])
        NodeTree.links.new(NoiseTex1.inputs[0],Mapping1.outputs[0])
        NodeTree.links.new(MathMultiply2.inputs[0],NoiseTex1.outputs[1])
    
        MathMultiply3 = NodeTree.nodes.new('MATH')
        MathMultiply3.location = [x+800,y-210]
        MathMultiply3.operation = 'MULTIPLY'
        
        NodeTree.links.new(MathMultiply3.inputs[1],MathMultiply2.outputs[0])
        NodeTree.links.new(MathMultiply3.inputs[0],MathMultiply1.outputs[0])
        
        return MathMultiply3.outputs[0]
                 
    def CreateSnowShader(NodeTree,x,y):
        #Snow Shaders
        MixShader2 = CreatMixShader(SnowNodes,-276,708,.3)
        Diffuse2 = SnowNodes.nodes.new('BSDF_DIFFUSE')
        Diffuse2.location = [-516,745] 
        Diffuse2.inputs[1].default_value = .336
        Velvet1 = SnowNodes.nodes.new('BSDF_VELVET')
        Velvet1.location = [-516,626]
        
        SnowNodes.links.new(MixShader2.inputs[1],Diffuse2.outputs[0])
        SnowNodes.links.new(MixShader2.inputs[2],Velvet1.outputs[0])
        
        return MixShader2.outputs[0]
    
    CreateNodes = True
    #scene = bpy.context.scene
    #bpy.data.materials.new("ANT_SnowyMountain")
    
    MatObj = bpy.context.active_object
    
    #bpy.ops.object.material_slot_add()
    
    mesh = MatObj.data
    
    #print(bpy.context.material)
    CreateSnowMat = True
    for Mat in bpy.data.materials:
        print(Mat.name)
        #if Mat.name == 'GoldenMaterial':
        if Mat.name == 'ANT_SnowyMountain':
            print("Mat Found")
            CreateSnowMat = False
            SnowMat = Mat
    
    if CreateSnowMat == True:
        SnowMat = bpy.data.materials.new("ANT_SnowyMountain")
    
    if len(MatObj.material_slots) == 0:
        bpy.ops.object.material_slot_add()
        
    Slot = MatObj.material_slots[0]
    Slot.material = SnowMat
        
    SnowMat.use_nodes = True
    
    SnowNodes = SnowMat.node_tree
    
    for Node in SnowNodes.nodes:
        print(Node.name)
        print(Node.location)
    
    if CreateNodes == True:
        SnowNodes.nodes.clear()
    
        SnowOut = CreateSnowShader(SnowNodes,0,0)
        
        for NGroup in bpy.data.node_groups:
            print(NGroup.name)
        #Dot Poduct Nodes
        OutNode1 = CreateDotProductNormalNodes(SnowNodes,550,400)
     
         #Dot Poduct Nodes Had to create two of these because of
         #python bug that doesn't let you tie two inputs to one output!
        OutNode2 = CreateDotProductNormalNodes(SnowNodes,550,100)
        
        #Create Rock Texture Nodes
        RockTexOutNode = CreateRockTextureNodes(SnowNodes,0,0)
        
        #Dot Product Texture Mix to Displacement
        MathMultiply2 = SnowNodes.nodes.new('MATH')
        MathMultiply2.location = [1300,34]
        MathMultiply2.operation = 'MULTIPLY'  
        MathMultiply2.inputs[1].default_value = 1.25
        MathPower = SnowNodes.nodes.new('MATH')
        MathPower.location = [1000,0]
        MathPower.operation = 'POWER'
        
        #SnowNodes.links.new(MathMultiply2.inputs[0],MathAdd1.outputs[0])
        SnowNodes.links.new(MathPower.inputs[0],RockTexOutNode) 
        SnowNodes.links.new(MathPower.inputs[1],OutNode2)   
              
        #Tie them All Together
        Diffuse1 = SnowNodes.nodes.new('BSDF_DIFFUSE')
        Diffuse1.location = [1000,266]
        Diffuse1.inputs[0].default_value = [.15,.15,.15,1]
        Diffuse1.inputs[1].default_value = .336
        Output = SnowNodes.nodes.new('OUTPUT_MATERIAL')
        Output.location = [1600,325]
        MixShader1 = CreatMixShader(SnowNodes,1200,349,.4)
        
        SnowNodes.links.new(MixShader1.inputs[1],SnowOut)
        SnowNodes.links.new(MixShader1.inputs[2],Diffuse1.outputs[0])  
        SnowNodes.links.new(Output.inputs[0],MixShader1.outputs[0]) 
        SnowNodes.links.new(MixShader1.inputs[0],OutNode1)   
        SnowNodes.links.new(Output.inputs[2],MathMultiply2.outputs[0])  
        SnowNodes.links.new(MathMultiply2.inputs[0],MathPower.outputs[0])
    We spend years in school to prepare for this life... how much time have we spent preparing for the next?

    My long term Film Project:Glasses the Movie



  9. #6149
    Member Jonathan L's Avatar
    Join Date
    Aug 2011
    Location
    Seattle, Washington
    Posts
    1,715
    Whoa, very cool NRK, that could be very useful because scripts shouldn't take up much space.
    Check out my portfolio and tutorials.



  10. #6150
    Member Ace Dragon's Avatar
    Join Date
    Feb 2006
    Location
    Wichita Kansas (USA)
    Posts
    28,021
    From the Sunday Meeting Minutes
    - Brecht is working on OpenImageIO image cache usage to load more image text ures than fit in memory (cpu only).

    He is also working on a light falloff node: that is a control for light falloff like blender internal has, constant/linear/quadratic, and an option to soften light near the light source.
    I'm crossing my fingers in the hope that the light falloff node will work with emissive mesh materials in general and not just the blender lamps, if so, this will be a powerful tool for tweaking how the lighting appears in the scene both for realistic and artistic purposes (like avoiding burnout for powerful lamps that need to go long distances)
    Sweet Dragon dreams, lovely Dragon kisses, gorgeous Dragon hugs. How sweet would life be to romp with Dragons, teasing you with their fire and you being in their games, perhaps they can even turn you into one as well.
    Adventures in Cycles; My official sketchbook



  11. #6151
    Member Meta-Androcto's Avatar
    Join Date
    Aug 2006
    Location
    australia
    Posts
    4,024
    hi, just aheads up in this thread too,
    I'm making a cycles material lib to replace my old Internal mat lib.
    The lib will be two fold.
    A physical .blend & an addon mat lib
    If you have any materials to submit, please let me know in the thread or pm.
    thanks.



  12. #6152
    Originally Posted by blaize View Post
    Wouldn't it be cool if we were to be able to export certain node groups, and share them?
    If we were to make custom nodes for everything, things would get bloated very fast.
    Also, being able to export/import node groups would make it easy to tweak them later on.

    These node groups would then be shared using the blender plugin system(?) and be version sorted, to make sure they work as expected.

    thoughts?
    I think it's not a big deal. For now we can share all good node groups on BlendSwap. It's easy and you can write about versions too.
    To take a node group just do "File, Append, .blend, Nodes". Works fine!
    _______
    P.S. So... I'm a bit late Meta-Androcto does nice things as usual
    Last edited by Moolah; 06-May-12 at 18:18.



  13. #6153
    Member NRK's Avatar
    Join Date
    Aug 2009
    Location
    Washington, USA
    Posts
    963
    Ah, I see, thanks for the info Meta, I got stalled on my project because I couldn't find a way to mix displacement by height. I got a mix shader by height working nicely, but the displacement mixer never worked all that great. My whole premise for making the ANT update was to be able to make materials that changed by height and normal vectors. Since I'm stalled on it I thought I'd post a script up for anyone that's interested.

    So anyway, it's good to hear you're working on the material library, feel free to add my snow and rock above if you wish (I know it's not all that great, but hey...why not). The whole reason I started writing python materials is because when I find something in blender is fairly undocumented and difficult to figure out, I make a python script to do it so I won't forget when I need it later(like what I did with volumetric clouds in BI). Cycles materials easily fall into that category, if I had your library and it had some complex stuff in it that was easy to find that would really fit the bill.... thanks.
    We spend years in school to prepare for this life... how much time have we spent preparing for the next?

    My long term Film Project:Glasses the Movie



  14. #6154
    Member
    Join Date
    Aug 2010
    Location
    Adelaide, South Australia
    Posts
    2,698
    To mix based on height you should be able to use the geometry node with position output, going into a separate RGB node, use the blue channel to get the Z position... then you can do math operations over the top of it.



  15. #6155
    Member NRK's Avatar
    Join Date
    Aug 2009
    Location
    Washington, USA
    Posts
    963
    Originally Posted by doublebishop View Post
    To mix based on height you should be able to use the geometry node with position output, going into a separate RGB node, use the blue channel to get the Z position... then you can do math operations over the top of it.
    Yeah, but if you use a color mix to force it from 0 to 1, and then you use a multiply node to try and mask off the bottom or top.... the part that is black or zero doesn't zero out an input that has been muliplied really large like you would expect it to. It works great as in input to a shader mix node for mixing shaders, but for displacement it's a no go.
    Last edited by NRK; 06-May-12 at 22:40.
    We spend years in school to prepare for this life... how much time have we spent preparing for the next?

    My long term Film Project:Glasses the Movie



  16. #6156
    Member
    Join Date
    Feb 2012
    Location
    Tartu, Estonia
    Posts
    542
    Ability to load and save node graphs as python scripts would be very welcome. Nuke works like that and it is very easy to save node groups and "gizmos" for reuse in different projects.



  17. #6157
    Member Bao2's Avatar
    Join Date
    Aug 2009
    Location
    Galicia - Spain
    Posts
    4,832
    Originally Posted by kesonmis View Post
    Ability to load and save node graphs as python scripts would be very welcome. Nuke works like that and it is very easy to save node groups and "gizmos" for reuse in different projects.
    I really don't understand why someone wants to create python scripts to store nodes.
    Just create a file with your materials and then you import them to your scenes. To avoid clicking on the F button on each material what I do is create a plane (Mesh/Add/Plane) and assign to it a material. Then in top view I see a lot of rows and columns of these planes. Each row is a type of material. So a row for glasses, other for woods, other for rocks, liquids,....
    If I need a material in blender I just append the material from that file.
    If you say to me I need do that with scripts and I can't do anymore as I do now, it would lead to a heart attack or something for me.
    >>> Neytiri WIP <<<
    When explanations are complex you know there is no Truth on it.
    Tangled Fan Art



  18. #6158
    Member NRK's Avatar
    Join Date
    Aug 2009
    Location
    Washington, USA
    Posts
    963
    Originally Posted by Bao2 View Post
    I really don't understand why someone wants to create python scripts to store nodes.
    Yes, but what if you want to create a new WAY of implementing nodes. Take this sentence: I want to mix material A and mix Material B by height at this level and I want to mix material C in below this level and finally I want water below this level. Simple sentence, fairly simple UI, but doing that in anything but python is a pain from libraries that aren't set up for it. People who use ANT_Landscape and Vue don't want to go off and learn a node system and it's foibles, they need a landscape for the back of their shot. They want to implement the above questions quicly without thinking, doing this with a library takes MUCH longer.
    We spend years in school to prepare for this life... how much time have we spent preparing for the next?

    My long term Film Project:Glasses the Movie



  19. #6159
    Member Bao2's Avatar
    Join Date
    Aug 2009
    Location
    Galicia - Spain
    Posts
    4,832
    My comment was not to what you are doing NRK. Of course you need scripts to create them. I was thinking/interpreting some people wants to store materials in scripts. And that is absolutely weird. For me a blend file with all my materials is the way.
    >>> Neytiri WIP <<<
    When explanations are complex you know there is no Truth on it.
    Tangled Fan Art



  20. #6160
    Member
    Join Date
    Feb 2012
    Location
    Tartu, Estonia
    Posts
    542
    For whole materials or groups this approach works so-so but for compositing...

    Python based node import-export is useful for operations like:
    - exchanging node setups without the need for .blend file. Right now if you have a large library file and you want to share one node setup or part of it you have to manually put it into separate .blend file and group it.
    - loading node setups without creating groups for linking. At the moment you can't load parts of node setups that contain mixed groups and single nodes because you can't group groups. You would have to either ungroup and regroup everything or load and reconnect multiple groups.

    Ability to store and load any arbitrary combination of nodes and node groups is very useful and you can't do that at the moment because of limitations with node groups.

    Material nodes would benefit also because they can be rather complex and some parts can be recycled in different materials. You can ofcourse group them but again, limitations with grouping groups etc make it a fuss.

    One very useful feature for node editing would be ability to copy-paste nodes from one material to another. If it is possible at the moment, I would be glad to know how to do it.
    Last edited by kesonmis; 07-May-12 at 09:35.



Posting Permissions

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