I don't actually think a triplanar projection is exactly the correct approach for this. The log's exterior itself should probably be textured normally. The interior can be custom planar projections, or maybe a 3D volume texture. https://simonschreibt.de/gat/metal-gear-rising-slicing/ …https://twitter.com/mattstark256/status/1218583432789463041?s=20 …
-
0:46 -
A log especially you have the expectation of the rings being at least mostly centered. The volume texture approach is difficult to generate, takes quite a bit of memory and/or is blurry, and is extremely bespoke to each individual log mesh, but it's relatively cheap to render.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
The custom projection method is a bit more manual work to setup, but you could potentially reuse the same "inside" texture for a lot of different meshes meaning it's a lot more memory friendly. For Revengeance they're doing mesh splits & UVing on the CPU.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
It's at least plausible to have something like a set of points w/ radii you define per-mesh that would control the center line and main axis of the projection direction, and then in the shader find the nearest line segment and reconstruct the appropriate projection.
2 vastausta 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjälle @bgolus
I was thinking that you could tri-planar map in object-space, so that you can assume the z axis is always the "inside" axis, and oriented around 0. You just have to model the log correctly. I really like the volume texture idea.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjälle @tloch14
If the log in question is straight, sure. You weren't specific in your original post.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjälle @bgolus
Even as I was replying, I realized that it'd be nice to be able to bend the log somewhat. Hm.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjälle @tloch14
See the Revengeance stuff, both that
@simonschreibt link above, and the (now deleted) article it references (which can still be found on http://archive.org ) https://web.archive.org/web/20130220061154/http://platinumgames.com/2013/02/13/a-cut-of-the-characters/ …2 vastausta 0 uudelleentwiittausta 1 tykkäys -
It shouldn't be too hard to define a dominant axis for projection, and then skew the center line and scale the projected UV to support at least some level of undulation and size difference across a log. A circular log is a bit harder.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
You'd need to define a spline, and calculate the UVs from that, which gets into fun gimbal lock-like issues unless you define each point with a quaternion for orientation.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä
If I get far enough in the experiment where I'm happy with a mostly straight log enough to even consider a looping log, I'll consider it a success and probably call it good. =P If I generate the mesh from spline data though, the spline data is already good to go... Hmm.
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.