3D space by @vveary on oncyber. Built in Annex1. 80 visits. Updated .
GM, Anon. It's time to learn how to !BUIDL a perfect loop.
Featuring TheWearyLuddite, vveary, !CAUTION: BUIDL IN-PROGRESS.
To keep things manageable, the multitude of cubes were joined into a single mesh before the final export. Since they were all created with a single material, if you alter that material, all of the cubes will reflect that change. With more complex meshes, it's typically best to make any changes to the materials before you join them together, as it can be a bit of a pain to do so after the fact. In this case, however, if you want to change the materials on individual cubes, you can do so fairly easily by separating the meshes.
There are different ways to make an A->B loop pair with "IRL" cognitive perception -- one of which is to simply have the looping portions that blip in (A) and out (B) of existence do so beyond the user's view. See that massive cube stream you just ascended through? That is a verrrry tall animation -- yet not tall enough to fade cleanly into the fog distance settings for this oncyber world without hiding the level's exit point. This is why I've blocked (A) and (B) from view instead.
An advanced method for a perfect A->B loop is to make an animation appear as though it's looping into itself. Visually, this is similar to a basic A->A rotation loop (which actually returns to its starting position before looping). This method is far more complex, however, because it is only creating an illusion of a return. For this to work, the frames need to be identical at least once in different points in time; this is where you loop.
Meshes that don't need to have collisions are parented to the "display" tree, which allows the user to pass through them. In this space, for example, the "beams" have been set to the display tree, while the "cap" at the top has been set to the "collision" tree. The cap, then, serves both as a place for the animation to loop where the "pop-out" is unseen, and a way to cut the gravity momentum from the player once they hit the top.
As demonstrated in the /ax0 tutorial, getting animations to work as intended outside of Blender can be... a process -- and .GLBs (the format 3D files need to be for oncyber) have their own set of quirks. Though this tutorial aims to eliminate some of the trial and error I had to do by piecing together different tutorials to get .GLB animations working in oncyber, this is not a "one size fits all" guide.
As a result, if you just added the .GLB-based access token for this tutorial through the front end editor, you would need to choose no collisions, or collisions that encompass the entire mesh. The mesh behind you was added in Blender, which is how I am able to use the top "cap" as a colliding object that cuts the ascension gravity, while leaving the cubes, lower platform, and "beam" collision free.
In most cases, you're going to want to use the "EZ" method for a perfect loop, where the Start End/A B segments of the animation blip in/out of existence out of sight. Take the capped ascension platforms you've been traveling through as an example: in these, the animation loop starts (A) in the platform, and ends (B) in the cap above, looping out of sight to avoid any jarring cube pop in/out.
Where animated loops begin to become infinitely more complex is when you need a sequence to go from A->B instead of A A in a seamless rotation. Consider the stack of ascending cubes behind you: animations play by different rules than reality, defined by code; if something moves from Point A to Point B "IRL," it doesn't just reappear at Point A instantly and start over.
Collisions in oncyber can be set in the core .blend file by parenting a mesh to either the "collision" or "collision_invisible" tree. If you parent a mesh to "collisions_invisible," that mesh won't be visible to the user, and the they won't be able to pass through it either. This is commonly used to create invisible railing (to keep the user from falling off a path).
One of the more mind-melting steps to creating a perfect A->B loop is figuring out when and where to loop your animation. This is because... well... Perfect loops are essentially time travel for animation: You need to find the >exact< point in time your animation must return to (in order to kill and replace itself) so it can "live" forever (in a looop) -- EZ, right?
An essential element of any interactive digital experience (whether that's a classic video game or a metaverse build) are known as "collisions" -- which are pretty much exactly what they sound like: A property that keeps object (X) from passing through object (Y); without collisions, we're all just ghosts. We'll start with the type of collisions you add in Blender.
In cases where you have an A->B animation that you want on a seamless loop, blocking off the end/start points outside of the user's view like this will likely be the easiest and most viable method. I'll briefly introduce a more complex method ahead, but a bit of creative blocking using this method for your A->B loops can save a lot of development time.