Circular Gradient!

   1249   4   0
User Avatar
Member
14 posts
Joined: 3月 2023
Offline
Does anyone have any idea on how to create a circular gradient? I found the tutorial, but I think the process might be outdated, because I got a different result.
Edited by Mrmichaelt - 2023年12月27日 22:28:08

Attachments:
Gradient_Circle.hipnc (690.4 KB)
Test.png (1.3 MB)

User Avatar
Member
1788 posts
Joined: 5月 2006
Offline
Your setup works fine, what you're lacking is uv's.

The material will fit a circle in the 0:1 region of your uv's. Because your grid doesn't have any uv's, karma will go 'ok, I guess I'll just treat each polygon square as a little uv region, and fit the circle into there.'.

If you go back inside the wall sopcreate, append a uv texture sop, projection axis as 'z axis', you'll get one big circle that fills the wall.
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
8034 posts
Joined: 9月 2011
Offline
uv aren't required for an planar projection on axis. The two orthogonal axes to the projection axis can be shuffled into a vec2 and used with the circle formula.

for radial (phi):
(r1 - length(x,y))/(r1-r2)

for radar sweep (theta):
n*atan2(y,x)/2PI % 1

Attachments:
Gradient_Circle2.hipnc (781.5 KB)

User Avatar
Member
14 posts
Joined: 3月 2023
Offline
Thank you, Thank you, Thank you. I was seriously loosing my mind as to why this was not working.

Attachments:
Circular_Ramp.png (473.9 KB)

User Avatar
Member
14 posts
Joined: 3月 2023
Offline
jsmack
uv aren't required for an planar projection on axis. The two orthogonal axes to the projection axis can be shuffled into a vec2 and used with the circle formula.

for radial (phi):
(r1 - length(x,y))/(r1-r2)

for radar sweep (theta):
n*atan2(y,x)/2PI % 1

jsmack,

Unfortunately, I am not that advanced yet! I am still a super-newb to Houdini, learning the lingo and my way around. I appreciate the help and will save this file for when I become more knowledgeable.

Thanks
  • Quick Links