Jump to content

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


magneto

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

Link to comment
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...

Link to comment
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
Link to comment
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 ..

Link to comment
Share on other sites

  • 6 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...