[MOD] l3lessed Enchanted Compass
-
- Posts: 1409
- Joined: Mon Aug 12, 2019 4:32 pm
- Contact:
Re: [MOD] l3lessed Enchanted Compass
3.8 is up.
I apologize if you noticed a large slow down in 3.7. This was a result of the materials and how they were being created/loaded. This should largely be remedied now. If it isn't, let me know.
I apologize if you noticed a large slow down in 3.7. This was a result of the materials and how they were being created/loaded. This should largely be remedied now. If it isn't, let me know.
My Daggerfall Mod Github: l3lessed DFU Mod Github
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
- King of Worms
- Posts: 4753
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: [MOD] l3lessed Enchanted Compass
Lovely, you are really doing great job here man. Big respect.
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
-
- Posts: 1409
- Joined: Mon Aug 12, 2019 4:32 pm
- Contact:
Re: [MOD] l3lessed Enchanted Compass
There is still a noticable drop on low end systems, especially systems not designed with GPU use in mind.
The previous builds were less fps intensive because my coding error caused all the building instances to use a single material, set once at creation with its color set on creation. This pulled all the mesh GPU calls into a single call under the one material shader setup on the main script file, but broke the ability to update individual building material colors after generation since there wasn't any shaders for the individual buildings.
The new code fixed this, as stated above, but in the process, it now has restored all the individual materials to the markers, with transparencies. As a result, the GPU calls are up again.
There is one last option I'll look into over time, and there are people saying you can create a shader, assign it to as many meshes as you want, and then just adjust the property of that individual mesh instance. I need to mess around some more with instancing or custom shader setup to try and pull these meshes back into a single gpu drawcall that only updates their color.
The previous builds were less fps intensive because my coding error caused all the building instances to use a single material, set once at creation with its color set on creation. This pulled all the mesh GPU calls into a single call under the one material shader setup on the main script file, but broke the ability to update individual building material colors after generation since there wasn't any shaders for the individual buildings.
The new code fixed this, as stated above, but in the process, it now has restored all the individual materials to the markers, with transparencies. As a result, the GPU calls are up again.
There is one last option I'll look into over time, and there are people saying you can create a shader, assign it to as many meshes as you want, and then just adjust the property of that individual mesh instance. I need to mess around some more with instancing or custom shader setup to try and pull these meshes back into a single gpu drawcall that only updates their color.
My Daggerfall Mod Github: l3lessed DFU Mod Github
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
-
- Posts: 1409
- Joined: Mon Aug 12, 2019 4:32 pm
- Contact:
Re: [MOD] l3lessed Enchanted Compass
4.0 is coming sometime this week. I just finished creating a successful mesh combiner. I just need to apply it to each building marker type, and the minimap will go from having hundreds to thousands of submeshes and materials to 7 meshes and materials (one for each group type).
This should provide a large gain in FPS for everyone, but especially for low end systems that tend to skip on GPU memory and power.
4.0 should be the final major release. There is no more optimization to do at this point. CPU and GPU processes have been profiled, torn apart, and reduced to as few memory and cpu stores/calls as possible.
This should provide a large gain in FPS for everyone, but especially for low end systems that tend to skip on GPU memory and power.
4.0 should be the final major release. There is no more optimization to do at this point. CPU and GPU processes have been profiled, torn apart, and reduced to as few memory and cpu stores/calls as possible.
My Daggerfall Mod Github: l3lessed DFU Mod Github
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
-
- Posts: 1409
- Joined: Mon Aug 12, 2019 4:32 pm
- Contact:
Re: [MOD] l3lessed Enchanted Compass
Okay, finished optimizing all the differing systems.
Everything has now been converted to simple quads that use a basic sprite shader and textures to free up as much memory and tris as possible.
Also, all meshes that can have been combined and any unneeded shaders/meshes are removed during this process.
Created custom shader for the mesh icons, so all mesh icons are combined under a single optimized mesh and the icon texture rotation is shader controlled itself.
All shaders that can be have been converted into a single instance and shared across any objects that use that same shader. Aka, same building types and npc types.
Number of other things, I can't remember.
It should drop by Friday.
Everything has now been converted to simple quads that use a basic sprite shader and textures to free up as much memory and tris as possible.
Also, all meshes that can have been combined and any unneeded shaders/meshes are removed during this process.
Created custom shader for the mesh icons, so all mesh icons are combined under a single optimized mesh and the icon texture rotation is shader controlled itself.
All shaders that can be have been converted into a single instance and shared across any objects that use that same shader. Aka, same building types and npc types.
Number of other things, I can't remember.
It should drop by Friday.
My Daggerfall Mod Github: l3lessed DFU Mod Github
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
- King of Worms
- Posts: 4753
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: [MOD] l3lessed Enchanted Compass
Nice progress, good to see you back!
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
-
- Posts: 1409
- Joined: Mon Aug 12, 2019 4:32 pm
- Contact:
Re: [MOD] l3lessed Enchanted Compass
The one thing holding back the drop at this point is a weird bug I am encountering with the mod builder itself.
Anytime I try to build my mod as a dll, it says it failed. When I check the mod directories, it is clear the dll is not being created or saved during any of the process.
Any ideas what would cause this? I've setup a whole new DFU build with the newest build files and resetup my mod from scratch to recompile it, and I'm getting the same issue. Nothing I know of on my mod side changed that should cause this issue.
Anytime I try to build my mod as a dll, it says it failed. When I check the mod directories, it is clear the dll is not being created or saved during any of the process.
Any ideas what would cause this? I've setup a whole new DFU build with the newest build files and resetup my mod from scratch to recompile it, and I'm getting the same issue. Nothing I know of on my mod side changed that should cause this issue.
My Daggerfall Mod Github: l3lessed DFU Mod Github
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
- BadLuckBurt
- Posts: 948
- Joined: Sun Nov 05, 2017 8:30 pm
Re: [MOD] l3lessed Enchanted Compass
What does the Unity console spit out as an error?l3lessed wrote: ↑Mon Mar 14, 2022 7:44 pm The one thing holding back the drop at this point is a weird bug I am encountering with the mod builder itself.
Anytime I try to build my mod as a dll, it says it failed. When I check the mod directories, it is clear the dll is not being created or saved during any of the process.
Any ideas what would cause this? I've setup a whole new DFU build with the newest build files and resetup my mod from scratch to recompile it, and I'm getting the same issue. Nothing I know of on my mod side changed that should cause this issue.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt
.
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt
.
-
- Posts: 1409
- Joined: Mon Aug 12, 2019 4:32 pm
- Contact:
Re: [MOD] l3lessed Enchanted Compass
Okay finding the possible issue here.
Upon compile failure, this error is provided in the console:
However, if I remove that file with my new mesh combiner code/optimization, I then get this error upon trying to compile.
Top of my head is to see if there is a way I can just package the TMP_FontAsset.cs file right into my mod and call it that way some how, but I don't think it works that way or is that easy. I'll keep at it, there has to be a solution to this.
Upon compile failure, this error is provided in the console:
That file is added when I click "collect dependencies." Before my use of submesh and mesh combining, I could remove the file and have it still compile just fine. None of the mod code actually needed it, despite it being a collected dependency.error CS2001: Source file 'C:\Games\daggerfall-unity-master 13.4\Assets\s\com.unity.textmeshpro\Scripts\Runtime\TMP_FontAsset.cs' could not be found.
UnityEngine.Debug:LogError (object)
However, if I remove that file with my new mesh combiner code/optimization, I then get this error upon trying to compile.
This tells me the mesh combiner is needing the TMP_FontAsset.cs to run properly on the stand alone build. Any ideas on solutions?Assets\Game\Mods\Minimap\Scripts\BuildingManager.cs(435,62): error CS0121: The call is ambiguous between the following methods or properties: 'Minimap.MeshExtension.GetSubmesh(UnityEngine.Mesh, int)' and 'Minimap.MeshExtension.GetSubmesh(UnityEngine.Mesh, int)'
Top of my head is to see if there is a way I can just package the TMP_FontAsset.cs file right into my mod and call it that way some how, but I don't think it works that way or is that easy. I'll keep at it, there has to be a solution to this.
My Daggerfall Mod Github: l3lessed DFU Mod Github
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
-
- Posts: 1409
- Joined: Mon Aug 12, 2019 4:32 pm
- Contact:
Re: [MOD] l3lessed Enchanted Compass
Here is the exact code causing the error complaining about the ambiguous reference:
This line is the specific line causing the issue. It is the .GetSubmesh call that is complaining about the ambiguous reference.
Code: Select all
MeshFilter markerMeshFilter;
markerMeshFilter = markerInstance.marker.attachedMesh.GetComponentInChildren<MeshFilter>();
Material[] buildingMaterials = markerMeshFilter.GetComponent<MeshRenderer>().materials;
for (int j = 0; j < buildingMaterials.Length; j++)
{
string textureName = buildingMaterials[j].name.Split(new char[] { ' ' })[0];
CombineInstance combineMarker = new CombineInstance();
switch (textureName)
{
case "markerMaterial":
Mesh NewMesh = markerInstance.marker.attachedMesh.GetComponentInChildren<MeshFilter>().mesh;
combineMarker.mesh = NewMesh.GetSubmesh(j);
combineMarker.transform = markerMeshFilter.transform.localToWorldMatrix;
combineMeshLister.Add(combineMarker);
break;
}
}
Code: Select all
combineMarker.mesh = NewMesh.GetSubmesh(j);
My Daggerfall Mod Github: l3lessed DFU Mod Github
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.