Home Creators Posts Import Register Favorites Logout

Content

Sigh... seems like it will have more than 1 WIP post.

This week I spent most of the time working on this animation.

I've reworked the lighting, added some variations to the anim, and replaced the cube below her.

Environment

A life-pod chest

Another subproduct of this project is a life-pod chest model. This is my first hard-surface model, which made me question my modeling skills. Like the drop-pod itself, it is based on a sprite from the original game. The sprite itself is very basic, literally a rectangle with rounded edges and a "handle" in the middle. So I was required to improvise with details, as making it a cube with smoothed edges won't look good in 3D. After looking at other similar hi-tech crates/chests, I've decided to just add handles on the sides and a few HI-TECH (TM) creases in a few places.

The model itself is a mess. It does its job, but the quality of the model is worse than I would like to see. I guess I'll be able to make good-quality models after creating a few failed ones.

I may make other props from the game in the future, as I plan to make future Expie-related projects outside of the drop-pod. But first, I need to figure out how to create cave systems you can see in the game.

A bit of storytelling

One of the things I like to do in my projects - add a bit of storytelling to the environment. This one isn't an exception.

First shot with future details circled

In the first shot, I plan to add a few details that will tell a small story of how she got into the drop-pod and what she did here.

Cyan outline - Glass shards
Red outline - E-PDA
White outline - Broken lamp

For those who played the game, you understand what was done here. To those who didn't play, I'll explain.

While exploring the cave, you sometimes find drop-pods with traders or a chest. Quite often, they are stuck inside cave walls, leading to a few entrances being blocked. In this case, the door on the left was blocked by a hard rock, but the window above it was open. The door on the other side is open, but she couldn't use it as the space above and below the drop-pod is filled with rock, and she was on the other side. To get inside, she broke the window, leading to glass shards scattered on the drop-pod floor.

Inside the drop-pod, she found a life-pod chest and an E-PDA without a battery. In the game, you can use an E-PDA to get some INT experience and to read a bit of lore. But to do this, you need to power it first. It's done by placing a small battery inside. Luckily, every drop-pod has a lamp with an almost-discharged battery. She broke the lamp, leaving the screen as the only source of light in the scene. She got a battery and put it inside the E-PDA. Soon after, she dropped E-PDA on the ground as something more interesting caught her eye.

Yet another genitals solver

Warning - a TON of technical stuff is coming, feel free to skip this part if you aren't interested in how it works.

After seeing how well @Slad's new penetration system works, I threw my previous solver into the trash and went on to create a new one based on his system.

What is the difference between my old implementation and his? - My system works by using proxy geometry that deforms the original mesh by wrapping around a cylinder. His system utilizes volumes to deform the original mesh (not entirely true, but close enough).

Why do I see his approach as better than mine? Because using volumes as a deformation guide yields a lot cleaner and smoother result. But one of the downsides is that it's less accurate.

How it works

I guess I'll begin by explaining how my old solver worked. In my solver, you need to select 3 edge loops - inner hole, small lips, and big lips. Each frame, all 3 edge loops were shrink-wrapped onto a penetrator and moved forward/backwards depending on the direction the penetrator moves. In the end, you get a point cloud (points from these edge loops), which is then used to deform the original mesh. It's an accurate way to shrinkwrap genitals onto the penetrator, but it's quite complicated to set up and isn't that performant. One of the major downsides - it heavily relies on the Delta Mush node (Corrective smooth modifier). The resulting deformations using this approach look distorted and broken. It basically isn't usable without smoothing. Also, as the delta mush tends to move points closer to their original position, you need to spend some time adjusting values to make sure the lips accurately touch the penetrator.

Now to the Slad's approach. I should admit that I don't fully understand how his system works, but after talking with him, I kinda understood what his goal was. The idea is to deform the original mesh using volumes. Volumes - In 3D software is a 3D grid where each "voxel" holds some value. In our case, the value is how deep the voxel is inside the penetrator mesh. Due to the limited capabilities of the volumes in Blender, he used a workaround to emulate how volumes should work.

I'll try to explain the difference, and hope you understand what I mean.

  • In my old solver points work as hooks that move the original geometry. The points themself are pushed/pulled onto the penetrator surface. Works similarly to bones deforming the mesh.

  • In his system, the penetrator volume pushes the original geometry outside. Imagine a thin stick that gradually increases in radius and softly pushes the original mesh outside.

I wanted to make a picture that shows the difference, but I failed to make it.

With the theory ended, it's time to actually make it.

As always, the solver was made inside Houdini. The solver itself is relatively simple. As Houdini has a lot of tools to work with volumes, it will make the task a lot easier.

The start is already a lot simpler than my previous one solver, as only the inputs required are an isolated mesh (genitals) and a penetrator.

Now I make a basic tree to solve one frame. I need to make a base that can solve one frame correctly. The algorithm looks like this:

  1. Convert penetrator mesh to a volume.

  2. Using this volume, calculate how deep each point (vertex) on the genitals is.

  3. Now each point has its "depth" attribute. We strip positive values and set them to 0 (The depth attribute is the distance to the volume surface. If the point is inside the volume, it will get a negative value)

  4. We blur (smoothly expand) the depth attribute. Points that were slightly outside the volume now have a similar value to those inside.

  5. Calculate the vector to the middle of the volume and store it in a new vector attribute. This one checks in which direction the depth value will increase the most and gives a normalized vector in this direction. This step seems to be hard to implement inside Blender

  6. Now with two attributes, we move points in the vector attribute direction for a value of the depth attribute.

After doing these steps, we get a decently looking genitals wrapped around the penetrator, while retaining all the details on them. As a side effect, it emulates a soft-body behavior without actually simulating it.

To make it look more accurate and better, it can be done multiple times in one frame, but with limited movement each time. Basically, doing the same algorithm multiple times, so the points were moving by a small bit each time.

But there is a lot simpler way to ensure the correct first frame - simply wrap the genitals around the penetrator inside Blender on the first frame. It can be done using Shape Key, which is turned on the first frame and slowly turns off after a few frames. This is one of the requirements for the genitals mesh in this solver.

Great, now just do it on each frame... It does work, but it's quite shaky, and it's missing one critical thing I'll tell you later.

Looking back on how Slad's system works, I notice one thing - it is a simulation, where the previous frame affects the next frame. Not a big deal... Yes?

You see, simulations take one frame as an input and then use it for the whole duration of the simulation. The same way works the "Solver" SOP inside Houdini (A node where you build your own simulations). You may think about just updating the input with data from the current frame. Yep, it will work, but it will be the same as just not using the "Solver" SOP and feeding each frame directly into the algorithm. Remember that you feed the original (unaffected) mesh inside the solver each frame. The previous frame with the solved mesh won't affect the next one.

Now, there is a problem to solve - How to gather changes from the previous frame and apply them to the current frame?

The solution

This is the reason why I love Houdini and working in it. The amount of control you have over ALL DATA in the scene is just... wow.

You see, in Houdini, each point can work as a bone. Like literally, every point in the mesh is a bone (even if it's a 100k points model). This got me thinking - In Blender, all bones move/rotate/scale relative to their original (rest) position/rotation/scale values and the parent bone. If you move the parent bone, its child bones will move with it, but the values on them won't change. On the other hand, if you move the child bones, their values will change. This is called the "Local space" transforms. In most cases, you have a "World space" where transform values are relative to the world origin, and the "Local space" where transform values are relative to the parented object/bone.

Now, what if we take the solved mesh and compare its point positions to the original mesh? We'll get an "Offset position" attribute. (A bit of explanation - each point on the original mesh is a parent of the same point on the solved mesh. The "Offset" attribute is a "Local space" transform relative to the parent point/bone. This and "points as bones" will become important soon).

Great, now we can use this "Offset" attribute to move points on the input mesh in the next frame (in this case, on each frame, the input mesh changes to the mesh in the current frame). One small test - yep, it's working. *Character begins to rotate his/her hips*, "What the? OH!".

Sadly, there is a limitation. You see, this way you change the location of points using "World space" axis, not "Local space". Yes, it does move the points relative to the original position, but it does it without looking at the rotations that were made.
(For example: take the plane which lies flat on XZ axes, let's say its "Offset" value is 1 on the Y-Axis (Up). If you apply the "Offset" value to the points on the plane, they will move up by 1 unit. Seems good. Now, rotate the plane by 90 degrees on the X-axis and apply the "Offset" value. Oops. All points still move up (on the Y axis) despite the plane looking in a different direction. This is the issue with this approach).

This is how changes in the previous frame are transferred to the current one in Slad's system. According to what he told me, this isn't that critical. As long as the character's hips don't quickly rotate or change their position in space, this won't be noticeable.

I wasn't pleased with this and wanted a more accurate way of transferring the offsets from the previous frame. Now this is the point where everything I wrote about thinking about points as bones becomes the key to solving this problem.

Each point has the "Normal" vector. If not, it can be easily calculated. This is our Y (Up) axis.
Each point has the "TangentU" vector. If not, it can be easily calculated if the model has a UV Map. This is our X axis.
Each point has the "TangentV" vector. If not, it can be easily calculated if the model has a UV Map or by doing a cross-product of two other vectors. This is our Z axis.
(Note: "TangentU" and "TangentV" are vectors you usually don't see together in other software. In most cases, you deal only with one of two tangent vectors. Usually, it's called just the "Tangent" vector. If you have access only to two vectors, you can easily calculate the third one.)

Great, now we have 3 axes. Hope you understand where it goes. These 3 axes are the rest rotation of each point. Now replace the word "point" with "bone", and suddenly, you have a rest transform for each bone in the mesh (location and rotation). Now we calculate the offset relative to the bone and apply it to the next frame using our "Local space" relative to the rest bone on a new frame.

This approach covers 99% of cases and gives accurate offsets for each next frame. What is 1% which isn't covered? - Cases where the hips greatly change their size for some reason.

Phew... Now we can continue working on the solver.

Next steps

After solving the problem and putting the algorithm inside the "Solver" SOP, we now get a smoother result without jittering and sharp movement. The next step is to slowly move points back to their original (rest) positions. And the final step - add some stretch so the parts of the mesh touching the penetrator move with it in the same direction. This will add some feel of tightness and friction.

The stretch effect was done similarly to how the penetrator volume pushes the points. But this time, we use the velocity volume. Its difference is that instead of each voxel containing a float value of "is it inside the mesh?", it contains the velocity vector of the mesh. To make the mesh move with the penetrator, we just apply the velocity vectors from the volume on nearby points.

Now it's done. At least the first version.

The solver result on isolated mesh

The whole character with solver results

Note: the sharp movement is because I messed up with the input mesh. The colors on the first GIF show how deep the points are and how much they need to move. The rapid color change is because it fits the minimum and maximum values to the 0-1 range. Minimum and maximum values change each frame.

I would like to tell a bit more, but it's already a huge wall of text. I'll tell a bit more in the next WIP's where this solver gets updated.

Files

Comments