Jump to content
magneto

How can I reorient objects to face surface normals on a sphere?

Recommended Posts

I am trying to do simple projects off top of my head to learn more about copy stamping, but this problem I am not sure how to solve inside Houdini.

Basically I am creating 1000 Grid SOPs on the surface of a Sphere using the Copy SOP, and it works fine. But I want the Grids to be oriented so they face away from the surface normals of the sphere, like its own polygons.

I am stuck because I don't know how to get the normals info from the sphere.

Here is the pic:

TCPJq.png

Share this post


Link to post
Share on other sites

Make sure the normals exist first, right now it doesn't look like you sphere has normals. then make sure the grid is in the x/y plane, flat on the z. Basically what is pointing down positive z will be oriented pointing down the normal... create a cone (tube with one end radius = 0) to better understand how orientation works.. an up vector will also be be respected when using the copy sop...

Share this post


Link to post
Share on other sites

Thanks guys, I did what you suggested and it worked. It's amazingly cool.

Btw now I have another problem. I know how to do it but couldn't find if houdini has something to help with this.

Basically I want to color these Grid SOPs so that they show the whole color spectrum say from bottom to top. I know I can do it with HSV very easily but the Color SOP is using RGB which wouldn't be possible to linearly interpolate colors. Also I could sort the points using the Sort SOP so it's no problem in the order but the color.

Any ideas on this? :D

Edited by magneto

Share this post


Link to post
Share on other sites

id suggest fit() ;

so , in bottom to top case , fit ymin and ymax from 0 to 1 and assign that to the color channels .

or in general you can use a color ramp with BBY as a segment .

there might be other ways too .

--

im posting from a mobile so , sorry i couldnt post any file ..

Share this post


Link to post
Share on other sites

Thanks zarti, but do ramps allow HSV assignment? Because otherwise I wouldn't be able to generate an HSV spectrum using RGB values.

Edited by magneto

Share this post


Link to post
Share on other sites

afair , there is a Vop node which converts from hsv-rgb and viceversa .

so , there must be an Equivalent expression for that node too .

Share this post


Link to post
Share on other sites

afair , there is a Vop node which converts from hsv-rgb and viceversa .

so , there must be an Equivalent expression for that node too .

Thanks man, I will check it out :)

Share this post


Link to post
Share on other sites

I saw the VOP you are talking about but I don't know how to use it. I will try a different method as I am not familiar much with VEX stuff.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×