October 1, 2009

Grasshopper | image sampler



Image sampler나 graph 컴포넌트를 사용할때 x,y도메인의 범위가 0-1이 기본으로 설정되어있는데, 이 범위를 바꿔서 사용하게 되면 그 범위를 입력값에 따라 달라지게 하는 것이 힘들다. 이러한 경우 입력전에 리스트이 최대값으로 나눠주고 출력이후에 다시 곱해주면 된다. 아래 예제는 이미지 샘플러를 이용한 예이다.




definition file : image_sampler.ghx

6 comments:

Isaac said...

Hello, im new to grasshopper, just 1 day training but by now im dreaming about it...

I find this example really amazing. As much as i try to recreate your definition, im not able to do it, i get unexpected results.

I would be very grateful if you explained how to do it, or share a definition.

Isaac, Mexico City, Mexico

keep sharing your amazing work

yoon said...

Hi Isaac,
I'll upload the ghx file today.
have fun ;

Unknown said...

This is really interesting. Would it be possible to panelize any type of surface using the image sampler? Using surface UVs to panelize (thickness) based on image sample; I was able to achieve something similar using getpixel VB script plugging the luminosity values to Height of panels, but was very very slow.

Keep up the great work

yoon said...

MIG, you can achieve that with surface box component too. Why don't you make simple mesh from values instead of nurbs box? This will make it faster.

vern said...

Hi there, thank you for the awesome definition!!
however, when i try to use it, there is an error in the last component (mesh box) that says “Error: Solution Exception: Plane is invalid”

How can I solve this problem?

PS: Some of the components have the word “old” plastered across it, like the pointsXYZ and Multiplication components.

vern said...

Hi there, thank you for the awesome definition!!
It works well when i use the picture that comes with it “to hot to hold” but when i substitute the image with one of my own, there is an error in the last component (mesh box) that says “Error: Solution Exception: Plane is invalid”

How can I solve this problem?

PS: Some of the components have the word “old” plastered across it, like the pointsXYZ and Multiplication components.