Jump to content

Subdivided sphere issue


Skybar

Recommended Posts

I got a couple of spheres I want to render with refraction. They are pretty low res, and I wanted to subdivide them at rendertime. However the poles get all screwed up (see pictures) and this is clearly visible in the refraction. I've noticed this lots of times before but it never really was an issue. 

 

Is there an easy fix for this? Probably a noob question but I have no clue really. I could go back and use the "polygon"-sphere (made up of only tris) instead, but then I'd have to resim and all that.

 

Cheers!

 

post-9276-0-61314300-1452516204_thumb.jppost-9276-0-21390100-1452516209_thumb.jppost-9276-0-82387500-1452516213_thumb.jp

Link to comment
Share on other sites

You can idealize bad-shaped sphere with something like this:

vector min, max;
getbbox(min, max);

vector center = avg(min, max);
float radius = avg(max - min) / 2;

// Spherify.
@P += center;
@P *= radius / length(@P);

// Spherical normals.
@N = normalize(@P - center);

Replacing geometry completely with NURBS sphere using Match Size SOP is the best solution, probably. Why have to resim?

spherify.hipnc

Edited by f1480187
  • Like 1
Link to comment
Share on other sites

When I want a sphere without pole issues I will use a sub-divided box.

or use a geodesic "Polygon" in Houdini sphere topology

 

 

if you want to subdivide afterwards,

I would still do this in combination with something like the vex wrangle mentioned before.

 

especially if you are using the subdivided cube approach

Link to comment
Share on other sites

  • 1 year later...

i gotta admit...noobs like me got it easy these days...just take a look how easy it is to Spherify something in H16...and set normals in the same node...but what if the object is not at Origin ? well dive in the file and see...

Spherify1.jpg

 

more shenanigans in video..

 

Spherify_H16.hipnc

Edited by Noobini
  • Like 1
Link to comment
Share on other sites

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...