Transfer colour attributes of textures to points

It's just a easy way though, I actually wondered at this: How can I transfer colour attributes from textures to Points.

Yesterday I was taught a solution for it on Twitter. So I will note this.





Just prepare this network first.


Then lay down Point SOP and connect under Points form Volume SOP.
Add colour attribute to it then type expression into red channel parameter box :
tex( "$HIP/images/legoman.jpg", $BBX, $BBY, R )

and also blue, green channel:

tex( "$HIP/images/legoman.jpg", $BBX, $BBY, B )
tex( "$HIP/images/legoman.jpg", $BBX, $BBY, G )

This means tex ( filename or url, u, v, colour type )



If you decrease Point Separation in Points from Volume SOP, you will get more detailed image like this.



P.S. 2013/01/25

We can also apply image colours to points by using Point Map SOP.


Set up Image Map parameter in Point Map, then it will be done.


[References]
tex expression function : http://www.sidefx.com/docs/houdini12.1/expressions/tex
The Visible Lego Man | Badass Digest : http://badassdigest.com/2011/11/16/the-visible-lego-man/

コメント

人気の投稿