Weekly Update Oct 30, 2017 Bloody Halloween!
Late last week I had a burst of productivity and really dug into the technical & sometimes tedious side of development. I'm talking about bug fixes and code optimization but also some accidental performance boosts. Just in a nick of time I also came out with an "artistic" update which involves adding blood splatter to the ground plane! I guess that makes it timely since it's Halloween time here. Oh, and I guess it doesn't hurt that my ragdoll accidentally turned into The Slender Man! So spooky!
Steam VR [Camera] Rig & performance boost
After I brought the SteamVR "[Camera]" prefab into my scene I was having issues with the position and rotation of the camera which is how I discovered that I was ostensibly using the Oculus VR SDK which I assume was interfering with SteamVR and/or OpenVR. Or, maybe not. Specifically, what I did to fix the problem was to prioritize the OpenVR SDK over Oculus SDK in the Player settings panel. After restarting SteamVR in addition to fixing the camera I immediately noticed a major increase in performance. I haven't really been measuring these metrics but I was inspired to build an FPS display that I can bring into a VR scene for easier benchmarking on the fly.OpenVR Input Manager "button mapping" oddity
A strange side-effect of using OpenVR is that my button mapping has changed. Unity's Input Manager's default "Fire1" button was previously mapped to the "A" button on the Oculus Touch controllers. After switching over to OpenVR it is now mapped to the "B" button. Eventually I'll get away from the Input Manager and take over the mapping myself but for now I will tolerate the button change.A new doctor character:
This week I added a female doctor character which I created using Autodesk's Character Generator to test out that workflow and get some variation from the mixamo characters I've been using. In retrospect I think her chest is larger than I intended and I apologize for that. You really notice scale when you put on the VR headset!Scale Change and "Slender Man" ragdolls
After bringing in the SteamVR rig I realized the scale of my characters was double real-world scale and I didn't want to scale the [Camera] prefab so that meant I had to scale down everything else. This resulted in a funny side-effect with some of the ragdolls. I have since fixed the Derrick zombie character and the new female doctor character but Malcolm is still broken. I'm too lazy to fix it but I also think it's pretty funny.Annoying Frustum Culling Fix
I discovered what was causing the characters to disappear and suddenly awkwardly reappear as I was turning my head. Apparently it has to do with the Animator Component's "Culling Mode" which for some damn reason was set to "Cull Update Transforms". I think they came in this way when they were imported from fbx. I set them all to "Always Animate" and now no more zombies popping up in front of my face scaring the shit out of me.via GIPHY
Blood Splatter!
So, I mentioned the blood splatter. This is one of my on-going pet projects, a system that detects particle collisions and draws blood directly onto the existing texture map. The version I was using in the bees game drew directly onto the groundplane texture:This updated version draws spots onto a transparent "splatter plane" that renders in front of the existing ground plane which in this case is a tiled texture on a terrain object:
Performance concerns: Right now the texture map updates whenever a particle collision is detected. This causes the frame rate to drop whenever a ton of particles are colliding in a short interval, and this is amplified if multiple planes are affected at once. To alleviate the bottleneck, I plan to schedule texture updates one-at-a-time instead of allowing them to update whenever they want.
Things I'm watching:
This rig looks amazing! Active ragdoll with authentic balance.
Help Save Glove And Boots! My favorite Youtube Channel!
It was another great week of dev! Yeah, I'm posting this on a Monday because I was devving all weekend. No, I wasn't binge-watching Stranger Things 2, but now that I think of it that's not a bad idea ;)
Comments
Post a Comment