Advertisement
Guest User

MR surface approximation

a guest
Dec 5th, 2012
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | None | 0 0
  1. link "contour.so"
  2. link "base.so"
  3. $include <contour.mi>
  4. $include <base.mi>
  5.  
  6. options "opt"
  7. samples -1 2
  8. contrast 0.1 0.1 0.1
  9. jitter 0
  10. contour store "contour_store_function" ()
  11. contour contrast "contour_contrast_function_levels" (
  12. "zdelta" 100.0,
  13. "ndelta" 180.0,
  14. "diff_index" on,
  15. "max_level" 1
  16. )
  17. object space
  18. end options
  19.  
  20. camera "cam"
  21. frame 1
  22. output "rgb" "out.rgb"
  23. output "contour,rgba" "contour_only" (
  24. "background" 1.0 1.0 1.0 1.0,
  25. "glow" off,
  26. "maxcomp" off
  27. )
  28. focal 3
  29. aperture 1
  30. aspect 1
  31. resolution 1024 1024
  32. end camera
  33.  
  34. instance "cam_inst" "cam"
  35. transform 1 0 0 0
  36. 0 1 0 0
  37. 0 0 1 0
  38. 0 0 -14.5 1
  39. end instance
  40.  
  41. light "light1"
  42. "mib_light_point" (
  43. "color" 1 1 1
  44. )
  45. origin 50 150 400
  46. end light
  47.  
  48. instance "light1_inst" "light1" end instance
  49.  
  50. color texture "pic1" "textures/tex_wave.rgb"
  51.  
  52. declare phenomenon
  53. color "displace_sh" (
  54. color texture "texture"
  55. )
  56. shader "coord" "mib_texture_vector" (
  57. "select" 0,
  58. "selspace" 1
  59. )
  60. shader "remap" "mib_texture_remap" (
  61. "input" = "coord",
  62. "repeat" 3 3
  63. )
  64. shader "tex" "mib_texture_lookup" (
  65. "tex" = interface "texture",
  66. "coord" = "remap"
  67. )
  68. root = "tex"
  69. end declare
  70.  
  71. material "mtl"
  72. opaque
  73. "mib_illum_phong" (
  74. "ambient" 0.3 0.3 0.3,
  75. "diffuse" 0.7 0.7 0.7,
  76. "ambience" 0.3 0.3 0.3,
  77. "specular" 0.2 0.2 0.2,
  78. "exponent" 50,
  79. "mode" 1,
  80. "lights" ["light1_inst"]
  81. )
  82. contour "contour_shader_simple" (
  83. "color" 0.0 0.0 0.0 1.0,
  84. "width" 0.05
  85. )
  86. displace "displace_sh" (
  87. "texture" "pic1"
  88. )
  89. end material
  90.  
  91. object "plane"
  92. visible trace shadow tag 1
  93. max displace 1.0
  94. basis "bez" bezier 3
  95. basis "lin" bezier 1
  96. group
  97. -2 -2 2 -1 -2 2 1 -2 2 2 -2 2
  98. -2 0 -4 -1 0 -4 1 0 -4 2 0 -4
  99. -2 2 -10 -1 2 -10 1 2 -10 2 2 -10
  100. -2 4 -16 -1 4 -16 1 4 -16 2 4 -16
  101.  
  102. 0 0.99 0 0 0 0 0.99 0.99 0 0.99 0 0
  103.  
  104. v 0 v 1 v 2 v 3 v 4 v 5 v 6 v 7 v 8 v 9 v 10
  105. v 11 v 12 v 13 v 14 v 15 v 16 v 17 v 18 v 19
  106.  
  107. surface "surf" "mtl"
  108. "bez" 0 1 0. 1.
  109. "bez" 0 1 0. 1.
  110. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  111.  
  112. texture "lin" 0. 1.
  113. "lin" 0. 1.
  114. 16 17 18 19
  115.  
  116. #approximate surface parametric 10 10 "surf"
  117. #approximate displace parametric 1 1 "surf"
  118.  
  119. #approximate surface parametric 4 4 "surf"
  120. #approximate displace length 0.412 1 5 "surf"
  121.  
  122. #approximate surface parametric 4 4 "surf"
  123. #approximate displace view length 22.5 1 5 "surf"
  124.  
  125. #approximate surface parametric 4 4 "surf"
  126. #approximate displace distance 0.119 1 5 "surf"
  127.  
  128. #approximate surface parametric 4 4 "surf"
  129. #approximate displace view distance 6.86 1 5 "surf"
  130.  
  131. approximate surface parametric 4 4 "surf"
  132. approximate displace angle 38.4 1 5 "surf"
  133.  
  134. end group
  135. end object
  136.  
  137. instance "plane_inst" "plane" end instance
  138.  
  139. instgroup "rootgrp"
  140. "cam_inst" "light1_inst" "plane_inst"
  141. end instgroup
  142.  
  143. render "rootgrp" "cam_inst" "opt"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement