we can write this in one line as a vector in shader code, since there's only one place they differ!
pd = 6a*o.uv*(√(u²+v²)-r)/r³
we can also simplify since √(u²+v²) = d:
pd = 6a*o.uv*(d-r)/r³
so what we have now, is the *slope* of this surface, along u and v, but we don't have the normal
now, whenever you want to convert from a slope to a vector, you insert the slope as components, while the remaining components equal 1
normal = normalize(float3(pd.x, pd.y, 1))
that's it! hell yea normals 💜
d = min( length(o.uv), r )
h = (a(d-r)²(2d+r))/r³
pd = 6a*o.uv*(d-r)/r³
normal = normalize(float3(pd,1))
also, here's an interactive version of this hump (in 2D instead of 3D) if you want to play with sliders 📈 desmos.com/calculator/aoq…
~FAQ~
Q: isn't it easier to just-
A: yes! this is the long way around. very slow to work with as you need to redo the math for every new input, but it's accurate as heck/not an approximation~
Q: what if my shape isn't a plane
A: transform this from tangent space or something idk
• • •
Missing some Tweet in this thread? You can try to
force a refresh
get your own lil snap-fit assembly kit!
👉👈 handedness agnostic
🔄 positive rotation direction markers
↔ move objects irl
🖨 janky 3D print vibes
🐱 may contain cat hair
there's a pretty limited amount for sale, so please don't get more than like 4 per person!
this was the initial stock:
200 🌹 viv long
200 🌹 viv mini
50 🌸 pst long
100 🌸 pst mini
the storefront shows current amount left for each of them
shipping will take a while - I'm still manufacturing the last 40% of parts, but I figured a pre-order would let me deal with shipping and whatnot in bulk and at my own pace, rather than sporadically!
I think part of why derivatives are hard to understand the first time you learn about them, is because they're introduced in 1D instead of 2D
the derivative is just the velocity of any given function!
to be more precise, given a function f(t):
f(t) = position at time t
f'(t) = velocity at time t
f''(t) = acceleration at time t
f'''(t) = jerk/jolt at time t
in physics, you learn about the velocity vector
this also works in 1D, but it's rarely presented as such. instead we talk about "slope", which is often completely unrelated to a physical slope in 2D space, it's just an artifact of mapping our input to x and the 1D output to y
my big takeaway studying quaternions a little closer as of late, is that interpreting them as a 4D object is a red herring
they make a lot more sense when you think of them as a special encoding of an angle-axis model with special multiplication rules, or, as rotors in the framework of geometric algebra
treating the xyzw components as the same type of element in the same type of space just isn't helpful (to me), because they operate with completely different rules
this offset seems to be completely hidden in the UI
basically, both transform and delta transform can be at (0,0,0), and yet the object is neither at (0,0,0) world space, nor at the parent position
what is that offset? *who knows* I couldn't figure it out and neither could chat
basically, this very specific option is the only reasonable parenting method to me
it makes me super uncomfortable that there even is an option to parent objects and then not being able edit or even see their relationship to each other ;-; ??