April 3 thru 9, 2018 Daily Dev Videos
Updates!
I realized it takes me a long time to write blog posts because I have this idea in my mind of what a blog post should be in terms of what I think my audience might be interested in. But the original reason I write this blog is as a way to document the process so that I can look back on it in the future, or to get my thoughts down and sort things out from time to time.What I realized is that for the past month or so I've been capturing almost daily videos and started to get in the habit of writing my thoughts down in the description field of each video. So, maybe I should just start posting those things here and when I have a chance to write a more long-form article I can always release that when I'm inspired to do so.
I'm still stuck in a period of deep thinking about algorithms and learning and practicing new programming concepts. Most of my work has involved implementing all the little updates that improve memory management under the hood. I don't think they have resulted in much of a speed increase in the cutting operation, but I do think that the frame-rates have risen. Since I don't have a real benchmark test I can only go by the videos and how things feel when I'm playing in VR. I will say that now that there is so little garbage being generated there are almost no performance hiccups that cause the headset to freeze up. But strangely that doesn't always show up in the captured footage.
One thing I don't think I've mentioned a lot about is the weird thing made of boxes that's always bouncing around. It is named simply "rigged thing" in the test scene. I needed a stand-in for a character while I'm still just working on the mesh cutting scripts. It is extremely helpful to have that weird thing there because the parts you don't see are the number of times I've changed how I'm dealing with transforms and that thing exposed a problem. For instance, all of the other cuttable objects can be cut in local space, but all of the actions on the rigged objects have to be done in worldspace. Knowing this will help me when it comes time to build a robot and chop it up.
Anyway, here are a few videos I've captured over the past week and half...
April 3, 2018:
"added HUD-style fps display
tried to speed things up by removing Debug.Log() but I don't think it made much of a difference. I went back to prioritizing the cutting so I'm sacrificing fps to allow for better cutting behavior again"
April 5, 2018 Morning:
"morning update includes the new HUD style fps in a better location
and we are now collapsing the submeshes during cuts down into one submesh after the hot metal shader is done cooling"
April 5, 2018 Evening:
"This evening's test includes much more optimization in terms of sharing materials across multiple submeshes and across different game objects. The purpose is to reduce drawcalls and/or batches to speed up rendering. It certainly feels a lot better and I'm able to let more and more stuff pile up in the scene before I feel the urge to forcepush everything off the platform which is guaranteed to speed up the framerate. It's great that there are still so many tricks to boost performance. I'll exhaust every option if it results in having a more natural experience in VR. I tweaked the HUD to have a play timer so I don't end up playing too long when I'm having fun. And it will also keep my screen captures shorter and save disk space and shorten edit/render times."
April 9, 2018:
"I finally implemented prellocation of all of the gameobjects for the procedural meshes, i.e. I'm pooling about 250 objects and once they're used up I'm re-using ones that are live in the scene. The trick will be sorting through them to pick the oldest or smallest of them I guess...
What sucks is that during the testing of this build my machine crashed big-time, and then during the second test/capture the audio when the cuts happen stopped working. It's that annoying sound that only occurs when a cut finishes. It stopped playing at probably around the 5 min mark. I'm not too proud of the fact that I really hacked my way through this update in a pretty irresponsible way. I'll have to look over my code throughout the week and make sure it makes good sense. There is some kind of xform glitch that causes some of the pooled cuts to appear in the wrong location even though I thought I was resetting that data. This is where I think things got hacky. I think my reset code isn't getting executed on all of the objects before they get reused. Edit: I must be tired because I accidentally uploaded the unedited version, but that ended up being a good thing because the edited version was missing the audio. This one actually seems to have an audio track so things are a lot less glitchy than I had thought. It is also a sign that I better get some sleep ;) Check out the weird thing that happens at 6:02 where the giant cube appears out of nowhere LOL!"
So, to wrap up this post I forgot to mention that in the last video I enabled shadows on the light that is coming off of the blade. It's difficult to appreciate in these video clips but it helps ground you in the "reality" of the scene when you're in VR. I think I've already fixed most of the bugs that were in yesterday's video. I'm at the office now so I can't make a proper video. My video capture rig is at home so I guess I can post an update tonight.
Comments
Post a Comment