I realized sampling multiple octaves of noise per step is way too computationally intensive so I gotta first cache my perlin noise by unwrapping the 3D perlin noise that lies on the spherical surface into a cylindrical 2D map I can sample while raymarching
https://twitter.com/Enichan/status/1342747094168309761

I dunno quite what the best thing to do with the Y axis is while unwrapping a spherical map into a cylindrical map. Anyone got any thoughts on that?
nice
i dunno if this is actually right, but it /looks/ convincing and it was a lot easier than i thought it would be
i dunno if this is actually right, but it /looks/ convincing and it was a lot easier than i thought it would be
oh hey i bet i can stick the heightmap and the normal map into a single texture by putting height into the alpha component, NEAT!
ah damn now im at the raymarching/sdf stage and my brain broke :(
maybe i will do a first attempt by just rendering a quad and tracing orthographically so i can't botch it by messing up my view angles and such
holy crap it took me all day to get the normals from the cylindrical map lined up with actual sphere normals but i did it! now i can go from sphere->map, and from position->map, which is key for the raymarching lookups
Obviously I won't keep the normals in the cylindrical map the same as a sphere, thats just for testing, I'm going to replace them with the normals of the deformed geometry
... but thats a lot of math I dont wanna do right now
... but thats a lot of math I dont wanna do right now
okay well this is going all kinds of wrong so i guess i'll have to cave and use cube maps, bleh
ok well :| i wish i knew this existed yesterday. this is perfect and i already have it working thanks to stack overflow https://twitter.com/tom_forsyth/status/1343294132198858753
okay cool we're back in business! heck yeah!
i did have to switch to a glsl implementation of simplex noise because in true 3D my "fake 3D" perlin noise had some uhh, banding issues >_>
i did have to switch to a glsl implementation of simplex noise because in true 3D my "fake 3D" perlin noise had some uhh, banding issues >_>
so turns out there's an easy way to compute tangent space normals for a spherical heightmap, offset the position along each axis by a fixed increment, get the height value at the normalized position, then add twice the original normal times the offset, then normalize
not gonna lie i was stuck on that for a while :D
okay break time. next step is actually doing some raymarching to get the shape