Results 1 to 8 of 8

Thread: Using nodes to control blending of two maps for the colour channel

  1. #1
    May the sauce be with you starbase1's Avatar
    Join Date
    Feb 2003
    Location
    London, UK
    Posts
    5,592

    Using nodes to control blending of two maps for the colour channel

    I'm looking to try applying the NASA Earth at Night texture to my Earth model, and I think its going to mean I have to go a lot deeper into nodes.

    My starting point is how to control which image is used for the colour channel - I want the earth at night image for the dark side, and the usual colour map on the bright, (with a small zone where they blend).

    My initial thought is to use a map which will target my key Sun light. Black for the night side, white for the day, and a moderately thin band for the disk / dawn areas. (Or perhaps the other way around).

    Is there a node or combination of nodes that will control image selection or transparency for me in this way?
    Or maybe the light-intenstity spot info could do the trick?

    I suspect the same method will then let me drivve luminosity, so I can also make the lights glow on the dark side.

    Nick
    Faith is the opposite of Intelligence.

    Touched by his noodley appendage!
    My Lightwave Graphics & Downloads!!!

  2. #2
    The simplest method to do this would be to use a mixer node and use a diffuse shader node (possibly with a gradient to tweak the falloff to suit), to mix the opacity blending the pair of them. You can likewise use the same output to drive the luminosity.

    Just a quick example, using some procedurals in place of actual textures
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	planet_at_night.jpg 
Views:	231 
Size:	514.7 KB 
ID:	109888  

  3. #3
    May the sauce be with you starbase1's Avatar
    Join Date
    Feb 2003
    Location
    London, UK
    Posts
    5,592
    Very helpful, many thanks for taking the time to put that together for me!
    Faith is the opposite of Intelligence.

    Touched by his noodley appendage!
    My Lightwave Graphics & Downloads!!!

  4. #4
    May the sauce be with you starbase1's Avatar
    Join Date
    Feb 2003
    Location
    London, UK
    Posts
    5,592
    Very helpful, many thanks for taking the time to put that together for me!

    Mixer node - thats the cookie. Difficult to lok things up in the manual when you do not know what to look for.
    Faith is the opposite of Intelligence.

    Touched by his noodley appendage!
    My Lightwave Graphics & Downloads!!!

  5. #5
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,897
    Quote Originally Posted by starbase1 View Post
    Mixer node - thats the cookie. Difficult to lok things up in the manual when you do not know what to look for.
    When LW v9.0 was released I added all one by one nodes to Node Editor to see what they do..

  6. #6
    Some of the maths nodes do baffle me because I am not a maths guy, but largely they are all self explanatory, if you understand what you want to do. The new search feature in 11 also makes it much easier to browse them, if you lose where they are (though I know it won't help if you don't know the correct word to use to search). I think most people get scared by nodes, because they assume they are going to be horribly complicated. In reality they are often quite simple and elegant, as long as you know what you intend to do!

    Thinking about it, it might also make more sense to do it this way:

    Make your 'day' image standard diffuse, but make your 'night' image just luminous, so you don't have to mess on with it's luminosity at all (plugging an image directly into the red-diffuse input would make it the same as if you had diffuse 0 luminosity 100). NB, for clarity, ignore everything I did to the left of the red line, since that's me just messing with procedurals to fake 'earth' textures You'd naturally be using your Nasa images instead.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	planet_at_night02.jpg 
Views:	155 
Size:	581.9 KB 
ID:	109889  

  7. #7
    May the sauce be with you starbase1's Avatar
    Join Date
    Feb 2003
    Location
    London, UK
    Posts
    5,592
    Thanks for the tips!

    Nodes almost always seem easier than I expected once I know the right key ones to use, or impossible! It's really nice the way you can build things stepwise, or disconnect a chunk while you try something different, very easy to experiment.

    I attach the node map I ended up with, which seems to work well, a combination of the mixer node and dot product did the trick. Also the cuirrent state of the image.

    Maybe I should start to think about a way to redden the light near the day/night boundary. Hmmm... Tricky...

    Nick
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	nodes-earth.jpg 
Views:	177 
Size:	152.7 KB 
ID:	109913   Click image for larger version. 

Name:	atlantic-lights.jpg 
Views:	155 
Size:	93.7 KB 
ID:	109912  
    Faith is the opposite of Intelligence.

    Touched by his noodley appendage!
    My Lightwave Graphics & Downloads!!!

  8. #8
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,766
    Dot product is the Cos Angle between Vectors, multiplied by the magnitude of each vector... If you chuck a normalise (which scales mag to 1) node on each vector going into the dot node, u can do away with your mult/clamp nodes operating on the scalar output there.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

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
  •