Results 1 to 14 of 14

Thread: Rendering normal and relief maps in LightWave

  1. #1
    Registered User aphalien's Avatar
    Join Date
    Jul 2010
    Location
    Russia
    Posts
    32

    Rendering normal and relief maps in LightWave

    I know there are many awesome plugins designed for this purpose.
    But this funny method allows you to render normal maps directly in LightWave without installing additional plugins or applications.
    And i'm also quite sure that some of you have already been using similar technique. Anyway i find it amusing enough to make a thread.

    First, get yourself a relatively flat geometry to render a normal map from.
    (In his example i used a bunch of different objects) Load it up into Layout.

    Create an orthographic camera (you may choose any type of camera you want, but i personally think that orthographic is the most suitable one)
    Add three distant lights (for each of the three channels accordingly) and name them "red", "green" and "blue"
    Locate these lights in relation to your active camera view as three conditional light directions of a typical normal map image X(R) Y(G) Z(B)

    Now for the very important step, shut ALL the lights down!!! Go to the light properties and enter the intensity value of "0%" for all your lights, and for the ambient light intensity as well.

    Then go to the surface editor and do this network.

    Of course it wasn't necessary to create distant lights and the 'light info' nodes to provide a proper vector input for the incidence nodes, i simply found placing distant lights more 'visually clear' to myself.
    Three important things here to pay attention to:
    (!)-set the incidence range to 180
    (!)-set the '128,128,128' RGB value for the gradient position of '0.5' to avoid wonky normals
    (!)-set the luminosity value to 100%

    Now turn the AA on and hit the F9 key.
    You should see something like this:

    If you are about to create a relief map then simply save the depth buffer and use this image as an alpha channel.


    !that's it!
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	normal-mapped_polygon_02.jpg 
Views:	376 
Size:	579.8 KB 
ID:	91913   Click image for larger version. 

Name:	normal-mapped_polygon.jpg 
Views:	303 
Size:	539.1 KB 
ID:	91914   Click image for larger version. 

Name:	relief-mapped_polygon.jpg 
Views:	347 
Size:	585.7 KB 
ID:	91915  

  2. #2
    Professional Newbie funk's Avatar
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    777
    This is really cool! Thanks for sharing
    Win7 64/Core i7-975 3.33GHz/12GB RAM/GTX 670 2GB/Wacom Intuos4 M
    I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

  3. #3
    Registered User
    Join Date
    Feb 2003
    Location
    Cumbria UK
    Posts
    393
    Great idea, really simple, and should have been quite obvious!

    One tweak - you set a key in the gradient at 128 / 128 / 128 and 50% to "avoid wonky normals" - would setting the gradient interpolation on the keys at 0% and 100% to 'linear' not do the same thing?

    But I can definitely see me using this trick from time to time. Thanks for sharing.

    Derek

  4. #4
    Registered User aphalien's Avatar
    Join Date
    Jul 2010
    Location
    Russia
    Posts
    32
    You are welcome) Have fun)))
    Quote Originally Posted by kyuzo View Post
    One tweak - you set a key in the gradient at 128 / 128 / 128 and 50% to "avoid wonky normals" - would setting the gradient interpolation on the keys at 0% and 100% to 'linear' not do the same thing?
    O_O
    oh dear) Yes, you are right! I wonder why didn't i pay attention to this gradient type. I'm sorry)

    In fact i have even fUnNiEr method for creating normal maps.
    But(!) it implies you to use photoshop (also with NO additional plugins installed, such as nvidia's normal map filter for instance)
    And i'm just afraid that i will probably get banned if i post something like this here.

    BTW, i forgot to ask you something -does LW10 have a native relief map node now???

  5. #5
    Professional amateur Amurrell's Avatar
    Join Date
    Dec 2005
    Location
    Lincoln, NE
    Posts
    1,350
    Banned why?
    --Andrew
    Bono Animo Esto


    Intel Core i5 3570k
    nVidia GTX 970
    8GB DDR3 1333MHz
    Windows 10 Pro 64bit

  6. #6
    Registered User aphalien's Avatar
    Join Date
    Jul 2010
    Location
    Russia
    Posts
    32
    Quote Originally Posted by Amurrell View Post
    Banned why?
    well, you know...posting any Adobe PhotoShop tricks here on NewTek Lightwave forums. Didn't sound like very a good idea to me)))

  7. #7
    Registered User aphalien's Avatar
    Join Date
    Jul 2010
    Location
    Russia
    Posts
    32
    Quote Originally Posted by chunderburger View Post
    I assume its the layer technique.

    check this:

    http://www.cgted.com/
    Not exactly) It may be not as advanced and geometrically accurate as the 'layer based' one, but it is definitely easier and -FunNiEr-.
    I personally call it the "emboss per-channel method" (Please forgive me my clumsy english)))
    In general it is more suitable for converting bump/height maps to normal maps.


    - All you need is a grayscale bump map like this for example.
    - Convert it to RGB
    - Select the red channel first and go to 'Filter->Stylize->Emboss...Enter '180' degrees for the angle value. As for the rest of the filter parameters, in most cases i personally use the following settings: Height=2px, Amount=125%.
    - Select the green channel now and do the same, but this time enter '90' for the angle value (or '-90' if you are going to use this map in LightWave only. In this case you won't need to enable the 'invert Y' check-box when setting the 'normal map' node in the node editor)
    - Select the blue channel and go to 'Filter->Stylize->Find Edges' The result will appear to be too dark and contrast, and you should lighten it right away. Go to 'Levels' and simply change the shadow output level from '0' to something much greater like '192' or so)))

    That is it, You're done with the basic part now.
    !!!BUT!!!
    You will notice that your normal map is too 'flat' and too boring, and it is not as bumpy-lumpy as you probably expected it to be.
    All you need to do now is to blur it in a special manner:
    Go to the channels tab and select first two channels, red and green.
    Now go to 'Filter->Blur->Gaussian Blur' Enter the radius value you find more suitable for your current image size and detail, and fade it using the 'overlay' blending mode ('Edit->Fade')

    I would also recommend you to make several blur passes with different radius values and different fade opacity percentage in order to achieve more 'suitable' result (but remember not to change the blending mode to something else when fading)

    Thanks for reading this delirium

    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	normal-maps-2.jpg 
Views:	178 
Size:	777.9 KB 
ID:	92006  

  8. #8
    Super Member wyattharris's Avatar
    Join Date
    Jan 2008
    Location
    LA, USA
    Posts
    447
    Ha, clever. I like it. Don't know why I didn't think of that before.

  9. #9
    Member
    Join Date
    Sep 2006
    Location
    Goteborg, Sweden
    Posts
    207
    Thanks aphalien!
    Great idea. I can easily see some nights pass here, without sleep.

    Very interesting.

  10. #10
    Newbie Member
    Join Date
    Sep 2010
    Location
    Smith River, CA
    Posts
    83
    Great thanks! I have been looking for a good way to get some nice normal maps from lightwave geometry to use with game textures, I'm none too bright so I couldn't figure this out on my own.

  11. #11
    Thanks for the info.

    To create normal maps in Photoshop, best option (and free) is to use nDo. Great plugin.

  12. #12
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,799
    Holly molly.. How could you complicate so trivial task..

    - using Luminosity 100% and Color input, and setting up all lights to 0% have exactly the same effect as just plugging color to Diffuse Shading..

    - there is no need to make three lights at all.. You can replace these Light Info, by Constant > Vector 1,0,0, 2nd one 0,1,0 and 3rd 0,0,1 or negative.. You're interested in just directions (vectors), not whole light item in scene..

    - setting up gradient is completely not necessary - you're converting 0.0 to white and 1.0 to black, and then plugging color to Make Color (so go back from color to scalar, loosing GB components) - so it'll have exactly the same effect as using Math > Scalar > Subtract, and subtracting 1.0-input (0 -> 1, and 1-> 0 )

    - why to convert from 0->1 and 1->0 in the first place, when Incidence has trigger Invert in its GUI.. Reversing directions (writing -1,0,0 instead of 1,0,0) has also the same effect.

    not to mention that the whole network can be replaced by using Spot Info, connecting Normal output to Math > Vector > Add -1,-1,-1, then to Divide -2,-2,-2 and output to Diffuse Shading (or without minuses, to reverse)
    Last edited by Sensei; 01-21-2011 at 01:55 AM.
    LightWave Plugins
    Global Materials for LightWave 2019
    Custom plugin writing. Request a quote.

  13. #13
    the escapist zarti's Avatar
    Join Date
    Mar 2003
    Location
    above the ecuator, then, on the right, but not too much
    Posts
    2,651
    Quote Originally Posted by Sensei View Post
    Holly molly.. How could you complicate so trivial task..


    ...
    there is an easier way than yours too ...

    > post the .srf file here




  14. #14
    Registered User aphalien's Avatar
    Join Date
    Jul 2010
    Location
    Russia
    Posts
    32
    Quote Originally Posted by Sensei View Post
    Holly molly.. How could you complicate so trivial task..

    - using Luminosity 100% and Color input, and setting up all lights to 0% have exactly the same effect as just plugging color to Diffuse Shading..

    - there is no need to make three lights at all.. You can replace these Light Info, by Constant > Vector 1,0,0, 2nd one 0,1,0 and 3rd 0,0,1 or negative.. You're interested in just directions (vectors), not whole light item in scene..

    - setting up gradient is completely not necessary - you're converting 0.0 to white and 1.0 to black, and then plugging color to Make Color (so go back from color to scalar, loosing GB components) - so it'll have exactly the same effect as using Math > Scalar > Subtract, and subtracting 1.0-input (0 -> 1, and 1-> 0 )

    - why to convert from 0->1 and 1->0 in the first place, when Incidence has trigger Invert in its GUI.. Reversing directions (writing -1,0,0 instead of 1,0,0) has also the same effect.

    not to mention that the whole network can be replaced by using Spot Info, connecting Normal output to Math > Vector > Add -1,-1,-1, then to Divide -2,-2,-2 and output to Diffuse Shading (or without minuses, to reverse)
    wow!Thanks a lot!
    I knew about not having to place lights, as i wrote above. And i had in mind exactly the same solution to use vector constants.
    But i didn't even think about the rest of the nodes here...I wonder now how easier and logically clear can this network be without all the unnecessary stuff i did!

    Again, thanks for a lot for pointing that out. You are a truly Sensei!

    Excuse me now, I think i need to go back to my printed manuals for a while)))

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
  •