So, as first step, as discussed yesterday, I need to update my prototype project so that it uses URP and not the "built-in" render pipeline.
This kind of change usually means: breaking materials and post-processing effects, which are different for each pipeline.
Luckily, I have no post-processing effects and I have used until now some very simple unlit materials for most elements.
Before starting the transition, I did just a bit of fixing and clean up
removed unused/test materials
coalesced multiple materials done by mistake
renamed a few elements
fixed the bug that caused the mana pick-ups to remain under the head without being collected
I also added a bit of extra logic related to the debug visualization. I didn't want to leave this to the last minute, as it's trivial but leaving some visible debug element can really damage the perception of something (assuming I decide to publish a video of the final prototype).
I relegated the hand pose debugging panels and the head projection indicators (the blue stuff on the ground) to the debug mode, and hid the test elements I don't need anymore, like the "punching ball" sphere on the first platform.
I also changed the debug activation logic.
Previously:
left hand thumbs down: game over/restart
right hand thumbs down: debug element visualization, enemies stopping
These commands had two problems
sometimes, I restarted the game without wanting it, because a left hand thumbs down was briefly detected
sometimes, one wants the debug visualization with the active enemies, or the non-debug visualization with stopped enemies
So I changed to
left hand thumbs down: starts/stops the enemies AI
right hand thumbs down: switches debug visualization
both left hand and right hand thumbs down: game over/restart
Ok, that's it. Time for lunch, and then I'll start switching to URP. I'm a little nervous things could break in my local copy of the project (Unity Library folder etc), which even if not a serious problem (as, of course, all my code and assets are in a Git repository), would waste a lot of my (very limited) time. So, I might try the switch on my notebook first, and only if nothing bad happens I will proceed on my main development machine.
Lots of learning in the afternoon.
I followed a couple of tutorials about the VFX graph and played with it for a bit.
I'm still afraid that URP could give me some bad surprises, and I think it could be useful to have both "built-in render pipeline" (let's call it BIRP) and "universal render pipeline" (URP) versions of the project.
So, I did what I usually do, which is splitting projects in packages. I split the prototype into four packages:
com.binarycharm.particular-reality.gameplay
com.binarycharm.particular-reality.assets-shared
com.binarycharm.particular-reality.assets-urp
com.binarycharm.particular-reality.assets-birp
And I also have some generic stuff not specifically related to this project into another package,
com.binarycharm.sdk
The package names should be self explanatory: one for the scripts containing the gameplay logic, one for shared assets (like sound effects) and then two packages containing the assets that need to change depending on the render pipeline.
I then duplicated my original ParticularRealityPrototype
project as ParticularRealityPrototypeURP
. The first imports all these packages but not com.binarycharm.particular-reality.assets-urp
, while the second excludes com.binarycharm.particular-reality.assets-birp
.
This will also allow to keep two different sets of project and build settings, which is super useful in these circumstances.
For example, in the URP version I had to disable shader stripping: leaving it on, I got a broken build ("broken magenta" materials).
With a little care, it's possible to keep both versions of the project working, something that will enable to compare performances etc.
After packaging and splitting into two projects, I started working on my first VFX for the URP variant.
I decided to start from the enemy, which being basically a colored sphere should be relatively easy to make more interesting, but is also super important in terms of gameplay: it's the thing you will give greater attention while playing, except maybe for your hands.
But I feel like the hands could be a little harder to get going, considering the mesh skinning.
So, for today (yeah, it's getting late), let's see if we can do something to improve the visuals of the enemies.
I ended up with this:
It's not great, but it's encouraging because that's quite a lot of particles and the frame rate is not terrible, and all this without thinking about optimization. I changed the background environment colors to have higher contrast, but not sure I like this darker version that much.
Tomorrow I'll try to "wrap it up" doing VFX for all (hopefully) the core elements and, maybe, the hands. I would also like to make something for the portal, to make it more "understandable" by someone who watches a gameplay video.