Hey guys,
I got a pretty big update for ya this month! But where do I even start? Well, I guess with the simple stuff...
New Avatars
The first bit of news is last month I licensed Ghostly's stallions and mares! So those will be going into the game soon. I was working on retexturing the important bits last month, and I've attached before and after preview images to this post!
New Animations
These are also not in the game yet, but the next bit of exciting news I've got for you is that I finally managed to sucessfully convert all 200 of those adult animations I licensed last year into a format which Unity can use without crazy glitches like torsos twisting 180 degrees!
It was not easy or straightformward to get this working, let me tell ya. But I took notes on what I need to do, so in the future if I license more animations from the same author I'll be able to convert those with relative ease now!
Menu
But before I could put either of the above into the game, I had one more important task I needed to complete. I had to get the menu working properly! And that turned out to be an even bigger pain in the ass than converting the animations was...
Blocky Text
The first issue I had of many was that when the player shrank below a certain size, all the text would turn to blocks. Long story short, I tried dozens of different ideas for how to resolve this. It's too complicated to explain them all, but in the end I ended up scaling the menu up by 10x, then lowering the resolution of my canvas and the scale of all the objects on it by 10x. This somehow resolved the floating point precision issue which was affecting TextMeshPro's rendering engine, and it didn't break CurvedUI which was another variable in this whole mess that was causing problems.
Near Clipping Plane
After I got that sorted, I was now able to scale the player all the way down to 0.025x. But a few issues persisted. The first was a relatively easy fix. The near clipping plane of the camera needed to be adjusted so that your hands wouldn't dissapear when small. But in the editor, it would only allow me to take bring that plane down to 0.01m from the camera. Thankfully Unity allows you to reduce that even further if you do it through scripting. So that's what I did.
Teleportaton
The next issue was that when the player got smaller than a certain size, if you teleported, you would be stuck and unable to move with the joystick until you returned to a larger size and teleported again. This turned out to be caused by the step size parameter on the character controller. The step size defines how large an obstacle the player will automatically step up onto when they approach it. Unity has a requirement though that this value not be larger than the player's height. If it is, the whole character controller just crashes. So the solution here was to scale this value down as the player shrinks. So now you can teleport without fear of losing your ability to walk!
Menu Interaction
Once that was fixed, the next major problem was that clicking on items on the menu was not working consistently. This one took a week to resolve. Some solutions I tried seemed to work initially, but then would randomly break.
It turned out the issue was a combination of several things. I don't recall if it was the Curved UI library or the Modern UI library, but one of the two had a bug fix in an update I hadn't applied, and that bug fix modified the pointer prefab on the player's hand, but because I'd modified the copy I had in my scene the changes weren't being applied, so it was using the old scripts. Once I figured that out, and talked to the creator of CurvedUI to find out why the list items on my Modern UI dropdowns weren't being curved like the rest of my menu items, I finally could click items on my menu consistently!
Once I had that working, it was time to set up the scripts needed to update the highlights when you selected different items on the scale toggle groups.
Scale Time + Smoothness
And once those were working, I was finally able to implement scaling over time!
Now, by default, when you select a new scale and close the menu, you slowly change to that new scale over the course of five seconds. You can adjust this time, making it longer or shorter, or even instant if the scaling causes motion sickness.
The scaling also has some acceleration and deceleration on it which I think feels good, but recognizing that that too might cause people motion sickness, I added a linear option so you can scale at a constant speed!
Movement Speed Adjustment
After I implemented that, I then decided to make it so your movement speed would be scaled by your height. But I found that doing a naive scale of speed with height didn't feel good. It felt like you were moving way too slow when you were small. This may be partially due to the level of detail, or lack thereof, in the floor textures, when you are that small.
But whatever the cause, I decided to try implementing a non-linear speed adjustment, and I settled on one where your speed is DefaultSpeed * Scale + Up to 25% of DefaultSpeed as you approach your minimum scale. So at 0.5x you run at DefaultSpeed/2, but at 0.025x you run at DefaultSpeed/4 rather than /40. This feels much better, preventing you from zipping about with little control while small, while not forcing you to move at a snail's pace either.
By the way, in case you never noticed, clicking the joystick in when moving makes you run!
Step Height Tweaks
While implementing the player speed adjustment, I also reduced the player's step height so they could walk up steps, but they won't step up onto the bed while you're trying to give BJ's!
As I mentioned in the Teleportation section above, I now scale this step height with the player. But, in the not to distant future I may implement a similar non-linear calculation for step height so you can step up onto rugs when at your smallest even though those are much higher relatively speaking than your normal step height.
Menu Following + Facing
After all that, the next logical step was to make the menu follow you as you move about the world so you can use these new scaling features wherever you are! This required setting up controller buttons which would trigger it to open and close, but I'd already planned for this, so I'd set the menu up with constraints that would make it follow the player and scale with them. There were just some bugs with the scaling where the menu would go below ground if you got small. I figured out what was causing those and resolved them.
And then while I was at it I decided to implement a Half-Life Alyx style function which rotates the menu to be back in the center of your view if you turn more than 60 degrees or so away from it. This way you'll never accidentally leave the menu open behind you, only to click to open it and have nothing appear to happen because you just closed it!
Menu Rendering Improvements
Another thing I implemented, which I actually set up way back when I was trying to figure out how to make the text not appear blocky at small scales (I thought it might help with that), is rendering the menu with its own camera.
Rendering the menu with its own camera provides two benefits.
The first is that the menu is no longer affected by, or affects, post processing and auto-exposure.
Previously if the menu had a dark background, because it took up much of the screen it would cause everything else to become over exposed. Meanwhile indoors, the menu would be super bright because the auto-exposure would bring its brightness up at the same time as it was increasing the brightness of your environment.
The second benefit to using another camera to render the menu is the menu now renders on top of everything, so you can see and access it even if you're in cramped spaces!
Also, unrelated to the camera thing, the rendering of the laser pointer you use to select things on the menu has also been improved. It now scales down correctly with you and the menu, so you can select things easily no matter what your size!
Lighting Improvements
Once again this month I played around with the exposure and light baking settings, still being unhappy with the way things often looked over or underexposed, and by god, I think I've finally cracked it!
After lowering the sky's exposure setting, adjusting the levels of the skybox itself in photoshop, increasing the sky light's bounced light multiplier to compensate for the reduced light coming from the sky, and fiddling with the auto exposure and post processing settings some more, things are now looking much improved! The skies are blue, even when indoors, and everything just in general looks more real, and less tiring on the eyes. It feels right, now!
There's a few visual artifacts here and there where you see bright light reflecting off the stone paths which are a result of the bounced light multiplier hacks, but those I'll just have to live with unless the creator of Bakery adds a parameter to adjust that on a per material basis.
Look At Me
One of the last things I tweaked in this update was the script which controls how the avatars look at the player. I noticed when scaling up that they wouldn't maintain eye contact. There were several things which were causing this. The amount of blending between the animation and script head movement, the angle of the head and neck bones that I'd set outside the animation, and the face tracking system's own built in limits on head motion. After adjusting these, the avatars will now look much more directly at you, regardless of your size!
This does lead to the occasional silly pose with the muzzle embedded in their neck fluff, but it's still a big improvement over what we had before!
Known Issues
You'll notice when you're very small the teleport laser isn't rendered as a smooth curve. I'll look into that at some point, but I'm not sure what I can do to fix it. Increasing the segments might resolve it, but it looks like a floating point precision issue that wouldn't be improved by that. In any case, it's only a minor visual glitch that doesn't impact your ability to teleport.
There are some unrelated and unresolved issues with regard to teleporting however. Somtimes you'll find you can't teleport somewhere you should be able to. I will look into those more closely when I have the time.
You'll also notice as you're running around while tiny that in certain places, parts of the world simply dissapear. This is a result of the occlusion culling system thinking you're inside a wall, and I have done everything possible to mitigate it short of replacing the entire system with a new one. That's a step I may take eventually, but the visual glitch only happens here and there, usually on sloped surfaces, so it's not a showstopper. Btw, this doesn't include sloped surfaces on avatars because avatars aren't part of the baked occlusion data, so walking around on someone will never trigger this glitch.
Disabling occlusion culling would resolve this, but of couse doing that would negatively impact the game's performance, so I won't be doing that.
Another issue you will undoubtedly encounter is that if you scale yourself up inside an enclosed space, you're gonna have a bad time. Eventually I'll add a test to determine if a change in scale will result in your head passing through the ceiling and stop you from getting larger, or I'll upgrade the player controller to a more advanced one which can make you auto-crouch when your head collides with something, and use that to give you a little more leg-room, but for now, you'll just have to be careful.
But know this! You can stop your scaling at any point simply by opening the menu! Closing it again after will keep you at that scale unless you then click a button to adjust the scaling. Clicking the same scale will also work to restart it!
The last thing I can think of which you might notice is that when you're adjusting your scale, your position changes. I'm not sure exactly why this happens yet, but it may have something to do with the player capsule colliding with the floor repeatedly. I need to run more tests, but this is definitely an annoying one if you're trying to scale up and down while standing next to a character.
Final Thoughts
That's all for this update! I've got another important annoucement that I'll be making in a seperate update, but I think that about covers all the progress I made on the game this month!
The link to this month's build will be posted shortly for the $5 and $10 tiers and don't forget to check out the screenshots below showing a before and after off my work retexturing Ghostly's stallion avatar! I'll be making multiple color schemes for that one as well as the mare.
Dinosorceror
2022-08-06 03:34:51 +0000 UTCDinosorceror
2022-08-06 03:15:17 +0000 UTCFurotic
2022-08-04 01:40:18 +0000 UTC