rickvdvulkaan Posted November 30, 2021 Share Posted November 30, 2021 (edited) Was looking at this, under the heading "render" (scroll down) ; https://www.sidefx.com/products/houdini/houdini-indie/ I was just wondering, can you model on a plane/unfolded sphere first, and then "spherize" it? Or would you just model everything onto a sphere directly? what's the best approach here? Is there a neat trick? Edited November 30, 2021 by rickvdvulkaan Quote Link to comment Share on other sites More sharing options...
Librarian Posted December 1, 2021 Share Posted December 1, 2021 (edited) for roads dokaitutorials.. heightfield tutos you have on Sidefx details Google .. wrap with wrangle code @P= relpointbbox(0,@P); @P.xyz = @P.zxy; @P *= {1,1,1}; vector dir = {-1,-1,0}; @P = sample_direction_cone(dir,3.14,vector2(@P)); @P += normalize(@P)*@height *0.0014; @P *= 400; @P +={1000,0,0}; or this cvex //float x – X screen coordinate in the range -1 to 1 // //float y – Y screen coordinate in the range -1 to 1 // //float Time – Sample time // //float dofx – X depth of field sample value // //float dofy – Y depth of field sample value // //float aspect – Image aspect ratio (x/y) // //export vector P – Ray origin in camera space // //export vector I – Ray direction in camera space // //export int valid – Whether the sample is valid for measuring #pragma hint x hidden #pragma hint y hidden #pragma hint Time hidden #pragma hint dofx hidden #pragma hint dofy hidden #pragma hint aspect hidden #pragma hint P hidden #pragma hint I hidden #pragma hint side oplist #pragma choice side 0 "right" #pragma choice side 1 "left" #pragma label offest "Pupil Distance" #include "math.h" cvex paronamaLens( // Inputs float x = 0; float y = 0; float Time = 0; float dofx = 0; float dofy = 0; float aspect = 1; float offest = 1; int side = 0; // Outputs export vector P = 0; export vector I = 0; ) { float halfPI = 0.5 * PI; float xa = -PI * x; float ya = halfPI * y; float sx = sin(xa); float cx = cos(xa); float sy = sin(ya); float cy = cos(ya); //correspondent position for eyes float px, pz, rotation; rotation = lerp(-halfPI, halfPI, side); px = cos(xa + rotation) * cos(ya); pz = sin(xa + rotation) * cos(ya); P = 0.5 * offest * set(px, 0 , pz); I = set(cx*cy, sy, sx*cy); } Edited December 2, 2021 by Librarian 1 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted December 2, 2021 Share Posted December 2, 2021 Besides the code quality, simply wrapping a square grid onto a sphere would result in heavy distortions. Happens less with spherified boxes: Depending on the project, I would probably do the majority of work right on the sphere where every patch is connected, using its normals, surface distances and such. planet.hiplc 1 Quote Link to comment Share on other sites More sharing options...
vinyvince Posted December 3, 2021 Share Posted December 3, 2021 You might probably need to to use 2d voxel volume heighfield and so work on a plane so you might not always be able to work directly in the 3d sphere itself. (Projecting the heightfield to a sphere will only work for limited angle before the distortion start to become too important) You could use the patch node to work on the seam... I did that before. One other solution will be to work with polar UV no cubic and tweak with a mask to compensate for pole distortion. You need to treat the top and botton on your UV map separately. for these, you need to distort the noise/texture input with polar to cartesian interpolation. Then you comp the 3 parts of the 2d data together and you should get no seam. See what i mean? ________________________________________________________________ Vincent Thomas (VFX and Art since 1998) Senior Env and Lighting artist & Houdini generalist & Creative Concepts http://fr.linkedin.com/in/vincentthomas Quote Link to comment Share on other sites More sharing options...
rickvdvulkaan Posted December 3, 2021 Author Share Posted December 3, 2021 (edited) very interesting insights! To be clear, i was mostly wondering about the modeling "strategy", not so much these specific models that you see in the picture. For example, i can imagine that modeling some kind of simplistic city would be more comfortable doing it on a plane first, because it could make things like instancing buildings and creating roads easier, and then wrap it around a part of the globe. @librarian, did you come up with that code yourself? jeez I know the basics of the attribute wrangle, but how do i "apply" this cvex code? Edited December 3, 2021 by rickvdvulkaan Quote Link to comment Share on other sites More sharing options...
animatrix Posted December 5, 2021 Share Posted December 5, 2021 Another good ol' trick is to bend a grid twice to turn it into a sphere: 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.