Advertisement
BobTheHunted

Heighmap + Bump Map Tutorial

Feb 11th, 2018
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. Process to add detail of a bumpmap to an existing heighfield with World Machine
  2.  
  3.  
  4. 1. Write down the following values of your heightfield: (Can be found in L3DT under Operations > Heightfield > Change Vertical Range)
  5. a = Minimum Altitude
  6. b = Maximum Altitude
  7. c = Full Altitude range
  8. d = Cell size/Horizontal Scale
  9. e = Heightfield resolution
  10. f = Heightfield scale (Can be calculated manually with: d * e = f)
  11. g = Bump map detail depth (in meters)
  12.  
  13. (Replace these letters with their corresponding values in the following steps, if that wasn't obvious)
  14.  
  15.  
  16. 2. Create a new world machine project and set the project settings as follows: (World Commands > Project World Parameters)
  17. - Start with the third tab: (General Setup)
  18. - Set 'Dimensionality to' Kilometers
  19. - Set 'Maximum Elevation' to 'b'
  20. - Set 'Base Elevation' to 'a'
  21.  
  22.  
  23. - First tab: (Render Extents ....)
  24. - Width: 'f' (In KM)
  25. - Height: 'f' (In KM)
  26. - Normal Build Resolution: 'e' (You can set this lower initially for testing purposes)
  27.  
  28.  
  29. 3. Create 3 new 'File Input' devices: (Devices > Generators > File Input)
  30. - File Input #1:
  31. - File details: Load your bump map image that you want to apply
  32. - Width: 'f' (In KM)
  33. - Height: 'f' (In KM)
  34. - Altitude Scaling: 'Specific Elevation Range'
  35. - Elevation Span: ['a'] to ['a + g'] (You want the bottom of the bump map at the bottom of the worldspace, and it's max height at whatever your detail depth should be.)
  36.  
  37. - File Input #2:
  38. - File details: Load your heightmap. (Not in image/raster format)
  39. - Width: 'f' (In KM)
  40. - Height: 'f' (In KM)
  41. - Altitude Scaling: 'Specific Elevation Range'
  42. - Elevation Span: ['a'] to ['b'] (Same as using full range option)
  43.  
  44. - File Input #3: (Optional)
  45. - File details: Load your mask image
  46. - Match the rest of the settings to the main heightfield file input
  47.  
  48.  
  49. 4. Create 1 'Constant' device: (Devices > Generators > Constant)
  50. - Height: ['a + g'] (This is so you can subtract this amount of the terrain so it's elevation stays the same as it was on input)
  51.  
  52.  
  53. 5. Create 3 'Combiner' devices: (Devices > Combiners > Combiner)
  54. - Combiner #1:
  55. - Connect 'File Input #2' primary output to the top input of the combiner
  56. - Connect the constant's only output to the bottom input of the combiner
  57. - In the device's settings, set the method to 'Subtract
  58. - Set the strength to 0.50000
  59.  
  60. - Combiner #2:
  61. - Connect 'File Input #1' primary output to the top input
  62. - Connect 'Combiner #1' output to the bottom input
  63. - Method: Add
  64. - Strength: 1.00000
  65.  
  66. - Combiner #3: (Controls the strength of the bump-mapping with strength value, also use with mask, optional)
  67. - Connect 'File Input #2' primary output to the top input
  68. - Connect 'Combiner #2' output to the bottom input
  69. - Method: Average
  70. - Strength: 0.50000
  71.  
  72. 6. Create a 'Height Output' device: (Devices > Outputs > Height Output)
  73. - Connect 'File Input #2' bottom output (File Metadata) to bottom input
  74. - Connect 'Combiner #3' (Or #2) output to top input
  75. - Edit export settings
  76.  
  77.  
  78. (What my final layout looked like: https://i.imgur.com/xFW2MUV.png)
  79.  
  80. 7. Build and write output to disk (Once results are satisfactory of course)
  81.  
  82.  
  83. My results:
  84. Bump map used: https://i.imgur.com/asYKRNt.png
  85. Before: https://i.imgur.com/kEsNhUs.png
  86. After: https://i.imgur.com/mD8ezml.png
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement