Grasshopper

algorithmic modeling for Rhino

I need a tutorial about "sampler image". I need to generate a surface with a Territory photography.

I will appreciate your help.

Views: 1005

Replies to This Discussion

  • Create an image sampler and point it to the correct image file.
  • Set the Width and Height of the image to the size of the landscape you want.
  • Set the sampling type to Brightness instead of Colour.
  • You may also want to set the sampling accuracy to interpolated.
  • It's probably best if you set the tiling to Flip, this reduces potential problems when you sample at the image edges.
  • Next up create a Mesh Plane which starts at (0,0) and has the same width and height as the image.
  • The higher the density of the this plane, the more accurate your landscape will be, through there's obviously no point in having more mesh vertices than there are pixels in your image.
  • Deconstruct the mesh into separate Vertex, Face and Normal arrays.
  • Feed the vertices into the Image sampler.
  • Also feed the vertices into a Deconstruct Point component.
  • Add a multiply component after the sampler so you can adjust the vertical scale of the landscape, You may also want to insert an addition component so you can control the vertical placement.
  • Now define your landscape points by using the X and Y from the original mesh and use the scaled sampled values as Z.
  • Finally construct a new mesh using the new points and the old faces.

Thank you very much David!

I'm working on it.

I'll show you the results as soon as I finish the work.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service