Is there an easy and automated way of converting a project from HDRP to LWRP?
I started my project in HDRP and now that it’s getting further along i have realised i don’t quite need HDRP and LWRP will suit my needs better, but there doesn’t seem to be a way to convert from one to the other.
I’ve tried just changing my renderer to lwrp and now everything is pink. I can’t even seem to find a way to convert my terrain shaders from hdrp to lwrp.
How would I go about recreating the terrain materials and applying them to the terrain? I tried and I couldn’t work out a way it seemed that terrains had their material and I couldn’t change it.
For manually recreating all materials. I’m up for that. Any tips on going through this?
Also, is this something you guys are working on? An automated process of switching between the two?
I don’t know. I suppose you can try asking this question in a separate thread
AFAIK no, we’re not. The choice of the render pipe affects too much on the asset side of things, so I think the promise was that there won’t be any automatic conversion between SRPs.
I think it’s a loss not to be able to go between Render pipelines, as Unity targets multiple platforms and some would be best off with LW and other with HD. If most materials are the same just for example HD needs raytracing you could make and Hd version with as the only extra raytracing.
From my HDRP experience, it seems possible to write an automatic converter from HDRP materials to Built-in ones. You’ll have to specify in it what shader replaces what shader, and convert the texture & color names, but it seems technically possible, with all the limitations on the missing extra stuff that HDRP offers, of course ; ie: you can cut off ~90% of the manual work.
Writing the converter might take some time, though.
For sure, there will be people starting a project using one render pipeline and at some point wanting to change. Look at all the games released on PC and consoles and now getting a switch version. Or mobile games getting a PC version.
Even if the converter cannot convert 100% of the settings, Unity should provide something for the developer. Otherwise I dont see how using RPs will be more convenient than the built-in pipeline. And if I had to upgrade, in the future, one of my projects to URP or HDRP without any way to make it easy and without the possibility to change the render pipeline, clearly it feels like a huge downgrade. Cross-platform game will become a huge nightmare in Unity.
One way is completely manual. The other way is use Shadergraph shaders. They seem to convert much easier than the standard ones that do not. Give it a try with one material and see what happens. Create a basic Shadergraph shader similar to the standard and then switch to URP/LWRP.
I had a look at the Unity Built-in → HDRP material converter.
Like I thought, it’s relatively trivial. It’d take literally less than 1 hour for the Unity Dev who wrote it to make it work in the other way.
I guess a good coder knowing well the Unity material system can get a 1st working draft in a couple hours, by checking what has been done in the Unity converter. The average coder might need a couple of days. And the beginner coder who doesn’t know Unity well might not want to try to do that…
One of the main complaints about the new SRP model is how it asks you to commit to one of these render pipelines when none of them are even feature complete and it may take years for them to become production ready. So it makes me wonder why Unity devs don’t spend some effort to make it easier to transition from one render pipeline to the other.
Anyway, it took me a couple of hours to create a HDRP to Universal RP material converter. It’s not perfect by far, but it makes it way easier to ‘downgrade’ from HDRP to URP after months of waiting for HDRP to be production ready and finally giving up and converting to URP. /rant
You need to have both URP and HDRP packages installed, then go to Edit/Render Pipeline and there will be 2 new options to convert HDRP to URP materials. Tested it with HDRP/Lit to URP/Lit.
This is a major design flaw IMO, and one that keeps a lot of people from even bothering with the SRPs due to the gigantic commitment.
Basic shaders shouldn’t be so deeply tied to the selected pipeline, since all their do is output renderer-agnostic data like albedo, normals, etc, where the renderers should consume into their own internal shader generation process.
But of course, nobody makes actual games at Unity, so nobody there is aware of how harmful this is, specially when that other engine can use the same shaders all the way from mobile to ray-tracing.
I wish the HDRP is more production ready, but since we need to release during this year I don’t feel that it will be stable enough, so I need to test the 3 render methods to see which one is a better fit.
Normally with these changes I use a copy of the project that later on I discard and just copy the asset folder, input manager and other project files in a fresh Unity project. It has the downside of the import time, but apart from it, it normally works as expected.
Have you tried deleting the library folder and reimporting the project? At least for my shadergraph shaders, this is the only way to get them to actually successfully compile (I also have to open each one individually once by hand
I also recently ended up making basically the same conversion tool you made as I was getting frustrated being “stuck” on a render pipeline when I ran into a new issue after upgrading. I want to target HDRP, but having the option to “easily” fallback to URP when I hit a roadblock has been a comforting safety net.
The only issues I really encountered were needing to rebake the lighting, otherwise the light probes don’t work.
When they said that it wasn’t possible to switch between URP and HDRP with the same assets, I assumed it was some sort of technical limitation. But when I started digging into each render pipeline and understanding the differences, I kept facepalming because of how similar the two actually are. Its mostly just slight naming differences (and HDRP has some extra features)
the Render Pipeline teams could really use a joint meeting where they agree to certain terms (bump vs normal, emissive vs emission, baseMap vs unlitColorMap, etc. Its pretty braindead code to actually get it converted between the two, surprised they haven’t done that as a nice safetey net for their users.
I believe copying the full Assets folder to a new Unity project to replace the old one would break Source Control… as “all files” would change in the project. It’s also not feasible when working with big teams working on the same codebase.
Honestly, I’m only trying to create an empty project with URP and convert it to HDRP, or the other way around. Had no success so far… so that means that every developer is locked onto a single Render Pipeline when starting a project? You can’t ever change to a different Render Pipeline? Sounds like a huge issue… let’s say I’m working on a project for PS5 with HDRP, but in a year or two I want to downgrade the game to URP to port it to mobile or Switch… you are telling me there’s no way to do it?