Siccity / GLTFUtility

Simple GLTF importer for Unity
MIT License
980 stars 217 forks source link

A solution not so quick to use in HDRP #152

Open Neogene opened 2 years ago

Neogene commented 2 years ago

A bit cumbersome but it worked i did to import a full scene with materials and textures (instead of recreating the materials/shaders from zero), if someone has a better solution i'm happy to learn something :

1) Creare a brand new Built in render pipeline project 2) Install https://github.com/jilleJr/Newtonsoft.Json-for-Unity if missing (i had this problem in 2019, dunno if 2020/21 don't have this problem) 3) Install GLTFUtility 4) Add any GLTF file to unity project 5) Install High definition RP using Package Manager 6) Use the Render Pipeline Wizard. and Fix All. 7) Using as reference the two URP shadergraphs (i use only the metallic worflow) create the HDRP (LIT) version of them using the same properties (Name and Reference too) and links of the URP shadergraphs 8) In the shader overrides settings of the GLTF file replace the metallic/specular with the HDRP brand new shadergraphs/shaders and Apply the changes to force the reload. 9) Explode the prefab scene if needed and create brand new prefabs (dragging in the project window one by one) to drag freely in the scene 10) To use editable materials: clone the original Materials (CTRL - D) found in the project window and replace them with the clones (which are editable) in the prefabs made in step 9 (i use the oldname_v2 naming to quick find them) 11) To change materials textures: clone the original textures(CTRL - D) found in the project window and replace the original with the clones (which are editable) in the editable material made in step 10

LaserYGD commented 2 years ago

I changed URP shadergraph target to HDRP and it works. But yeah I wish there was something for HDRP by default.