New Video

•16/06/2022 • 8 Comments

I thought it was time for another video.

There’s missing sounds, placeholder models and textures and only a few objects have basic collision sounds, as I’m yet to work on the real physics based impact sounds for everything. That includes footsteps, decals and particle effects when shooting things.

The location of the backpack isn’t final, I just thought it would be cool to give you an excuse to have a swim. The functionality of the backpack and holsters is default Hurricane stuff, I’ve got plans to change a few things there.

All hand poses are dynamic and adjust based on the shape of the object your holding. I’ve chosen this method as it allows you to grab any object from anywhere and not from predetermined grab points. It can lead to some moments where the hands might clip or look a bit goofy, but I’d prefer the freedom to grab the object exactly where your touching it.

VR footage is notoriously jittery, I tried to smooth it a little but it didn’t help. I upscaled it to 4K in the hope the bitrate might save some details.

It’s hard to gauge the performance from this video, the recording robbed a few frames but in regular gameplay it’s running at an almost locked 90hz. There’s a few ways I could gain some more performance, but it would mean disabling the ocean or really cutting back on vegetation draw distance or shadows. I think it’s in a good place now.

I’ll try to record a side by side stereo video so those with VR can see how it actually looks in 3D.

Just before I recorded this, I tried enabling motion reprojectioning for the first time. I’ve never actually been using it, I never want to rely on it and instead want to optimise as much as I can. I found I actually had worse performance with it turned on, with jittery motion when waving the hands about and when moving. Not sure what’s going on there, maybe when your frames are already so high it doesn’t help. I’ll have to look into it, try some other games and see what effect it has there.

Anyway, it’s time for sleep.

Coming together

•12/06/2022 • 6 Comments

Man, it’s almost 3am as I begin to write this, but I won’t be able to finish it, I need sleep. I’ve been up nearly 24 hours, but I couldn’t pull myself away. Things are really starting to come together, it’s not only looking, but also sounding really good. There’s been a bunch of new things added, lots of changes and lots of updates. I’ll try to make this quick, but there’s a lot to talk about.

I’ve changed the physics interaction system, I’m now using Hurricane VR. This allows for much higher quality interactions with accurate hand poses when grabbing objects, as well as defining weight and velocity limits, so when you pickup something big or heavy, it’s actually slow to move around and throw. The old system didn’t support this stuff, and it felt and looked really goofy one-handing a big heavy fuel barrel and then throwing it 20 metres as it spins 200 times. It also didn’t allow for accurate dynamic 2 hand placement, it was very hit and miss, often just ignoring some inputs altogether.

From the author of Hurricane VR is another new addition, HexaBody VR, which is a player controller with a physical body and lots of nice physics based interactions. Your hands are solid objects that you can place on top of anything in the world and climb by tucking your legs up (crouching) then pulling your hands down quickly to vault up. You can also define grabbable surfaces for traditional climbing using the grip buttons, but it’s nice this just works on anything you can rest your hands on. It feels really good to run and leap off a ledge and reach out to grab the lip of the next ledge and climb up. It has some nice little details such as variable height for crouching, so you can slowly crouch up and down at the perfect height. Your body interacts with physics based objects properly too, which is something the old system didn’t do.

Right now the movement and interaction feels almost perfect. Interacting with objects feels a lot like Trespasser, except you’ve now got two hands and it feels so much more natural with motion controllers.

I’m constantly impressed by how good the original game was and how far ahead it was in so many ways. I’ll start to work on something new and I find myself struggling to find a solution to what I thought would be a pretty simple task, such as assigning sounds to physics objects for collisions. My programming and scripting abilities are very limited, I can study code and make some changes here and there, copy and paste code from different scripts and get things working that way, but I can’t write code from scratch. I’ve been putting together simple scripts to handle the voiceovers, but once I started working on the sounds for the physics objects, I realised I needed to do a lot more to get it sounding right. There needs to be a variety of different sounds, the volume of which must be determined by the velocity of the impact. Trespasser not only did this, but it also had sounds for dragging and possibly even rolling. I came across an asset that does all this and more, it’s called Impact – Physics Interaction System. It’s a a material based system that allows you to define all the properties of certain materials so they respond accurately when you walk on them or when hit, producing sounds, particle effects and even leaving decals. I’m yet to actually begin working with this one, but it looks amazing.

Another new sound asset is an Ambient Sound system that allows you to create sequences made up of all the sounds you want to play in that area. You can then create the sound volume around that area and set fall offs so the sounds gently fade as you approach. It’s made a huge difference to the world hearing the ocean and gulls, the wind blowing along the cliffs, birds and insects etc, it’s really starting to feel alive.

Another nice little detail is particle effects such as falling leaves and subtle dust particles that gently float through the air. When combined with butterflies and birds flying about and now all the sounds, it’s just amazing to stand there and stare at it. Video coming soon.

When I first started working with Hurricane VR, I decided to take another look at HDRP in the latest 2021 version of Unity and see how things have progressed. I was seriously impressed with the performance, but once you start to take advantage of the benefits of HDRP, such as TAA, motion blur etc, it really starts to crawl, even in the small Hurricane VR demo scenes there would be 10-15 fps drops just from enabling TAA, and this was with DLSS enabled. Things got even worse when venturing inside the rooms of the demo scene, where a large room is divided into 3 sections, with two long glass divider walls, which caused the game to slow to a sickening level. It took me a while to realise it was the glass doing it, apparently DLSS just can’t handle multiple transparent surfaces and it kills the frames. With DLSS off it was much improved, but then TAA slows it down from over 90fps to under 80, sometimes dipping into the 70s. No TAA and with DLSS enabled is a strange one, I may be CPU bound here as I seen absolutely zero performance increases with DLSS enabled. HDRP also supports Fidelity FX, but enabling that actually sees a drop of about 20-25 fps. WTF? Bizarre. I did consider it still a worthwhile upgrade to potentially future proof the project so one day those features would be available, but the upgrade process to HDRP is terrifying as your world turns pink as incompatible materials fail to load and you spend the next 8 hours trying to convert your projects shaders and materials to work. In the end I had to purchase some add ons for existing assets to get HDRP compatible shaders, but in the end the results were nowhere near acceptable, it was incredibly slow, to the point where I suspect the conversion process doesn’t quite work properly, because I expected it to be much better. I can return to this one day and try again.

I have however updated to the 2020 version of Unity. This was brought on by the need to use OpenXR to get the most out of Hurricane VR. I was previously using SteamVR / Open VR with an old version of Unity and the now deprecated Single Pass rendering in my search for performance. OpenVR allowed me to use the AMD fidelity FX stuff (via a modded OpenVR plugin), but switching to OpenXR means that’s no longer useable. It’s not a bad thing though as I hadn’t been using it for a while anyway, as performance is so high now, it wasn’t ever needed and the trade off of visual quality simply wasn’t worth it. After coming back to the project after the summer break, I had been playing a bit of Skyrim VR, which I use with the AMD fidelity mod, along with super sampling and TAA. It looks super sharp and it highlighted just how much aliasing was in my game, especially with the Fidelity FX enabled. The latest version of AMDs tech is something that has to be done at engine level, it can’t be injected using the OpenVR plugin, so don’t get your hopes up with that. I had made so many other changes and optimisations that the game now runs at 90+ fps for about 95% of the time. The few places there are drops are where the draw distance is it’s longest and I’ve got a whole bunch of temporary assets not being culled and no occlusion objects are in place, so it’s overdrawing like mad. I’m confident I’ll have that under control soon enough and FPS will be locked at 90+ everywhere. I need to remind myself I’m running the game at essentially 4320×2160 on an i5 10600k and an RTX 2060, anyone with higher specs and lower res won’t have any trouble.

I scrapped the idea of a seperate tech demo. I just don’t have the time to work on something else that’s not essential to the project. I’m instead just going to release a demo of the Beach level once I’ve got it to a state I’m happy with. I need to sort out interactions between the player and dinosaurs so you can kill each other. Right now the Dino’s just kill each other, but they do chase you down and try to bite you. I’ve been in contact with the author of the Dino’s and he’s provided code to get it all working, I just haven’t had time to play with it yet. The plan is to kind of replicate the Pine Valley demo and have a Rex near where the Brachiosaurus were who hunts you down as you get closer. I can’t imagine you’ll get too far as these guys are fast, brutal and fucking terrifying. I can’t describe just how scary it is to have the Rex come after you in VR. I hadn’t actually set this up until just recently and I wasn’t sure if the Rex would hurt me or not, so I played seriously as if I was, trying to avoid him and survive and it just about gave me a heart attack.

Future playable releases will come as new areas are completed, eventually allowing you to explore the entire island. I can’t commit to a date, but it’s close.

Some Shots

•01/06/2022 • 8 Comments

Nothing too new, but they show some progress and also some setbacks.

A slip in concentration and I clicked YES on a prompt when quickly importing a new asset. Unity asked if i wanted to update some outdated API stuff and some shit went sideways. I managed to get most things restored and working but the grass system is not happy. Something somewhere is still not right and its stopping the grass from functioning properly, so i’ve reverted back to the old style of grass. Its not such a bad thing though, it actually looks damn good and runs amazingly well. It’s a lot denser and allows for a greater variety in styles.

Looking back towards the beach construction site. Old temporary Tres models, they still looks pretty good!
New monorail station closer to the beach resort. It never made sense that they’d make guests travel so far to get on the monorail. That entire structure is climbable.
Most of these assets are just placeholders.
Along with placeholder models, all textures are heavily compressed and downscaled. Quality will be increased later wherever possible.
There’s more life everywhere now, seagulls roam the beaches and land in different places to help make it feel more alive.
I would like to expand on this area, but im not 100% sure how yet. It’s an iconic area, so I don’t want to mess with it too much.
Not a lot has changed here. The box and Compys wont be here in the final game. The ocean has been swapped out for a very fast simple version.
Remember I said you can climb every tree? Every tree you see you can climb (except the banana trees and short palms). You can climb all that scaffolding around the construction site too.

Yes, I’m working on this ;-)

•28/05/2022 • 5 Comments

The weather is lovely and cold, so the office is not a sauna. Yay, no foggy lenses!

Ive been working on some optimisation again, looking into more ways to squeeze more performance out if Unity. I don’t really want to lower the detail level, or split the island up into individual levels. I think there’s gains to be had with the ocean, it’s a bit overkill considering there won’t be much (if any) swimming.

Also looking at ways to improve the quality of the visuals, reduce aliasing etc for a cleaner image.

Will post new shots soon.

Hot Hot Hot

•15/02/2022 • 2 Comments

Sorry for the lack of updates, i just haven’t been in my office.

I took a little break leading up to christmas, but then the heatwave hit and i’ve extended that break a bit longer. With a big monitor, my PC and lousy air conditioning, it gets super roasty in my office, and with a VR headset on, the sweating begins and foggy lenses are soon to follow.

Once the cooler weather hits, i’ll be back in the office more often.

Hope everyones xmas and new years was good.

Was it worth it?

•05/11/2021 • 6 Comments

I decided to take one last look at importing my project into the older version to see if I could fix the script errors and save myself the hassle of remaking so much. After plenty of googling and downgrading some packages, I managed to fix the errors and almost retain everything except the terrain texturing.

An hour or so later after getting everything configured and compiled, what was the result? Was it worth the hassle?

About a 75% increase in performance!

That’s pretty huge and makes for some pretty darn smooth gameplay.

I’m currently playing about with the ocean and sky system as there’s some worthwhile gains there too.

I’ll try to get the texturing finished over the weekend and get the test sorted.

I was thinking of replicating the pine valley demo scene?

Some results

•04/11/2021 • 2 Comments

Okay so early testing is showing the Single Pass version is running up to 50% faster. Pretty impressive, but it’s really hard to know if that improvement will level out as more assets are added. I think it’s worth having a closer look, I’ll post results when I can.

The need for speed

•04/11/2021 • Leave a Comment

So today I’ll finish up some testing that will decide if I revert to an older version of Unity or continue with the current version. It’s always difficult learning something late in its life as you end up discovering things that are common knowledge, but thankfully it’s not too late as I’m still quite early in the games development. A lot of the time spent so far has gone into learning Unity and setting up and configuring the assets, as well as optimising them.

It’s a bit of a long and boring topic, but I’ll do my best to explain it as best I can without sending you to sleep.

There are 3 different VR rendering methods in Unity.

Single Pass. Single Pass Instanced and Multipass.

In the current version of Unity I’m using there is only Single Pass Instanced and Multiplass. Single Pass was dropped a while back in favour of the Instanced version.

A couple of recent developments have inspired me to take a closer look at the earlier versions that support Single Pass. The author of the AMD FidelityFX mod for OpenVR made some changes to his mod after i told him it did not work in my Unity game unless ran in Multipass. He got to work and fixed it, so now it works in Single Pass and Single Pass Instanced.

During past testing, switching to Single Pass Instanced didn’t yield any worthwhile performance increases, there were more cons than pros, with deferred rendering not working in Instanced and the grass asset I’m using does not render correctly, it only renders to the left eye. The grass not rendering is a big one, I love this grass.

This grass asset is so good looking and easy asset to use, I’m not prepared to use anything else. It can be very quickly and easily painted on the terrain, with size, colour, density and flatness all adjustable with very fine detail, across the entire island. The grass is rendered with individual blades that blow realistically in the wind. It’s something you simply can’t replicate with regular types of vegetation without serious performance costs.

I had a look at the included source code to see if I could perhaps make the changes needed to support Single Pass Instanced, but it’s beyond my abilities. I did get in contact with the author and he too said it would be a significant amount of work to do, but it should render just fine in Single Pass. Unfortunately only older version of Unity support Single Pass, so that’s why I’ve been playing about with an older 2019 release.

It took some time to learn how to setup the VR stuff in the older versions, as there are things not compatible with the newer XR packages. I’m essentially just running OpenVR with some XR stuff for controller input.

Another setback is that opening my project in the older version results in some issues with incompatible scripts, so some things don’t compile and the project can’t be built or tested. It means almost starting fresh in an older version, but like i said earlier, about 80% of my time so far has gone into learning Unity and setting up and configuring assets. In about 30 minutes I had my island imported, textured, ocean and sky setup, grass imported 100% as it was and dinosaurs walking around. The placement of other assets will be pretty easy as I can have both versions of Unity open and can simply copy and paste transform information to get everything into place quickly.

Tests so far are really promising, but I don’t want to get too excited yet because I need to strip back the project in the newer version and compare performance between them to see how much faster it is. I’m also not sure how Single Pass will perform when more assets are introduced. It may turn out that it’s slower to render the vegetation assets and it evens out, but I still have to try as there could be some serious gains.

Once this is done, I want to put together a very basic test so you guys can test it on Oculus and other types of headsets. I’ve got a HP Reverb Windows Mixed Reality headset and the controls work just fine, but I need to know if it’s going to work with other headsets now. When I say basic, I do mean basic, it will be an almost empty terrain with ocean, sky and some grass. I’ll include a few basic objects to pickup and climb and maybe a pistol and some stuff to shoot at. I just want to gauge performance and be sure the XR input is working across multiple devices. The AMD FidelityFX files will be included along with the original, so you can swap between them and see the difference.

I was hoping to post something other than testing or optimising, but I need to look into everything while it’s still early, as it will be next to impossible to make changes like this later on as it would be too much work.

I have made some great progress over the last week with new vegetation assets allowing me to finish some areas I haven’t shown yet, as well as getting a new river and water asset working that looks fantastic. I’ll be sure to post some new shots once I’m done with what is hopefully this final journey into optimisation.

Ups and Downs

•27/10/2021 • 7 Comments

Just when I think I’m getting a handle on things, I discover something that confuses the hell out of me.

I finally figured out why it runs better in deferred multipass, it’s because Steam VR / Open VR runs slower in Single Pass Instanced. I tried removing Steam/OpenVR and revert back to Forward rendered Single Pass Instanced and sure enough there was a jump in performance, but..

At the cost of around 5-8 fps, multipass deferred rendering and Steam / OpenVR allow the use of the AMD FidelityFX and MUCH improved hand tracking latency as well as properly aligned hands. There’s also a bunch of assets that require either multipass or deferred, so there’s more pros than cons. The benefit of the FidelityFX alone is worth it.

Another strange thing I discovered is the way Steam tracks my super sampling settings. I noticed at 100% it was showing a value much higher than my headsets native screen resolution. It seems if I change my SS settings while testing in Unity, they are baked into the build and they are then multiplied further by the settings inside the build. Once I figure this out and set them correctly I was back to silky smooth frame rates and was able to use 250% SS at a respectable frame rate.

I’ve spent more time with the new grass and managed to increase the density while improving performance. It took a while to nail down the best performing shader for the settings i wanted and then adjust the chunk sizes and lod settings. If you have the bent grass shown below, it will cost a few frames but it looks pretty nice.

I got the GPU Dynamic Occlusion Culling working and its saving anything from 5-10fps depending on the scene. So that’s another nice little fps boost.

Just out of curiosity, what are peoples PC specs and what type of VR headset?

Optimization

•24/10/2021 • 6 Comments

I had planned to just focus on filling out the island and have a break from testing and tuning things, but I couldn’t ignore the drops in performance or the lack of satisfying lighting.

I decided to stick with the Global Illumination a bit longer and tested a whole bunch of different methods. I even managed to get a real time voxel based GI system called SEGI working, but it had a bit of a performance hit and there was a strange shimmering double image artifact I couldn’t fix, almost like a distorted cube mapped reflection over dark surfaces. There’s potential there for a smaller scale VR game to use it, but when the precomputed options are so much more reliable and performance friendly, its really only suited to something that is procedurally generated at runtime, where precomputed lighting wouldn’t work.

I’ve sorted out a really fast and good looking GI solution which I just bake whenever I add a new asset that needs darker interior lighting. Light probe groups allow moving objects to have real time lighting so you can take objects from outside inside and they’ll be dark and lit correctly. The light probes also apply much more realistic lighting throughout the entire island. It means i have to place a shit tonne of them throughout the entire islands playable area, but I’m not after accuracy outdoors so its pretty quick to duplicate a few of them and spread them out fast.

I fell into another rabbit hole, this one filled with Instancing, Batching and Occlusion options. Boy this week had some late nights as I tried to figure out when to use GPU instancing, static batching and how to properly setup occlusion culling. Unity is pretty shithouse with occlusion culling, there’s no easy way to just flick on the switch and it will accurately draw the world, ignoring what cant be seen. The occlusion system doesn’t play nice with the terrain so you need to place large occlusion objects under the terrain that block the engine from seeing other areas, otherwise it will just draw whatever is on the other side of a hill. I’m still trying to figure out what types of geometry works best, but results have been very good so far.

I’m not an expert on these topics so I wont attempt to explain them thoroughly, but GPU instancing will group the same objects that share the same material and render them in a single batch. So 7 big statues that are the same would be rendered as one mesh instead of 7. There are drawbacks and it can actually cost performance sometimes depending on what you’re applying it to, so you need to be careful how you use it. Static Batching will do a similar thing to GPU instancing, but only to static objects, they cant be moving. I’ve had mixed results with this so far, batching trees and rocks sometimes shows jumps of 20-30 fps in areas, yet with GPU instancing I’m seeing savings of hundreds of batches. Unitys fps counter has a mind of its own at times so im not sure i can trust it. A funny issue I had was some of the vegetation I use have different shaders that don’t anchor the vegetation to the ground like the SpeedTree assets do, so when I batched them I seen good FPS increases, so I batched everything and jumped in for a test only to see all the non-speedtree trees had disappeared. They hadn’t disappeared though, they were all in the sky flying around! This had me stumped and it was of course once I’d gone to bed way too late that I read on a blog a similar issue and that they solved it using a custom vegetation shader that had a “baked pivots” option. I had studied the shaders all day and hadn’t seen anything like that, so I had another look and still didn’t see anything, so I just started fiddling with different bits of code that was different between the shaders and boom, it worked. No more flying trees and apparently about 20 extra fps, but I’ve since gone back to GPU instancing vegetation as i feel like its running better and is saving a lot of batches.

I’m still stumped as to why my project runs faster using deferred multi-pass rendering instead of forward single pass instanced. Everything I’ve read since i started working with Unity VR says Single Pass Instanced and Forward is faster. I’m wondering if its because a lot of the shaders used in my project aren’t optimised for Single Pass Instanced so they just perform better under multi, i’m really not sure. I’m not too worried about it though, as it allows the use of the AMD FidelityFX upscaler, which allows for some incredible boosts in performance.

I’ve also played around with the post processing, doing some actual colour grading to get the colours and levels looking nicer. The colour grading combined with the nice reflections the light probe groups provide, allow for some nice shiny surfaces on the broadleaf jungle plants and palms. Its probably not a huge change to notice in a single image, but its certainly made it nicer when looking around in real time.

So the results of all this is that even though i haven’t added occlusion objects to anywhere but the starting beach section, my frames are now super smooth with almost zero judder when slowly turning. VR users will know what i mean by this, when you slowly turn with your analogue stick and the world moves 100% smooth, as if its locked at 90hz. It looks beautiful. Its only looking in the direction where there are no occluders that the engine is probably rendering the entire island terrain that it starts to stutter, but ill get onto that soon enough.

The next task is sorting out my grass solution, which I’m in the middle of right now. Traditional methods are working okay, but they’re very limited visually and can be a performance hit if not used carefully. You cant place small tuffs of grass everywhere because your instance count goes through the roof. You need to place larger patches containing multiple tuffs of grass so a single instance contains 20 tuffs of grass. This as you can imagine presents some issues when placed on angled terrain. It aligns to the center of the patch so can often result in the outer tuffs floating in the air or under the terrain. So you need to place them carefully and fill in the gaps with smaller patches. This works okay but isn’t ideal and is certainly not the quality I’m after or very fast to produce. When I get to areas like The Plains, I want it to look like nice fields of grass and not patches of obvious clumps with draw distance issues.

I’m currently testing a really nice dynamic shader grass asset that’s gpu instanced and runs amazingly well for what its doing. Its costing a few frames but I feel its worth it. Lucky i did a lot of optimizing this week otherwise it wouldn’t be viable option at all. Its not exactly the most realistic looking grass, but the way every individual blade waves in the wind is beautiful and it renders for as far as I need it. Its also super easy to paint everywhere and because it uses colour maps you can paint it any colour you want across the entire terrain and you can also set the height and wind influence too. It looks too good to go back to the regular grass!

I can increase the density as much as i want, but it really kills the frames.

I got a couple more Dinos too, the Para and Stego.