Is it possible to deform a prefab with multiple LODs along a spline?
For example I have a tree root prop that I want to curve throughout the level. The prefab consists of the root mesh with several LODs, and a separate moss & leaves mesh with its own LODs.
When I make a Generator with a Deform Gameobject template, the result generates a new mesh that combines all the meshes and lods together into a single object which is then repeated along the spine. While I do want the prefab to be repeated, I dont want everything to be combined into a new mesh like this. Is there any way to preserve the LODs?
If the whole root needs to lod at once I can live with that, but ideally each repeating prefab piece would lod individually so that a very long root can lod in segments as it trails away from the camera.
Yes, it is possible to combine mesh deformation of multiple objects and LOD. This is how I would make it:
Create a template generator that is setup to deform mesh along the needed path.
Supposing you have 2 meshes, and 3 LODs each, make 6 instances of this generator, one for each LOD level/mesh combination. The difference between these generators will be the input mesh. Provide the correct mesh LOD for each generator.
Export the result of your generators (see the "Save output to scene" button in the generator toolbar). This way you can delete the generators if you need to.
Create 2 gamebojects having the LODGroup component: https://docs.unity3d.com/ScriptReference/LODGroup.html
Setup the component to use the meshes from output of your generators.
I will try to make this process easier in the future, by providing for example a Create LOD GameObject, which would take multiple meshes as input, and generate a gameobject having a LODGroup using the given meshes. Any suggestion or feedback is welcome.
Have a nice day
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
I'm currently developing a vast rail network and considering utilizing the "GameObject to Mesh" script from your plugin. However, I've encountered issues with positioning and accidental duplication when attempting to preserve LODs during mesh generation. ( I tried to add the preserve LOD option myself) The process creates parts with LODs, but they're placed incorrectly and result in repetitive spawning.
I'm using an FBX model that contains LOD0 and LOD1 data, and it would be significantly beneficial if the plugin could support direct conversion of tileable LOD GameObjects into meshes. This feature would streamline the process for large-scale environments like the one I'm working on.
Here’s the FBX model I intend to use for further clarity: Link to FBX model.
https://transfer2.beyondfuture.de/s/KbFQxw998gsPXHN
Implementing a feature where users could input GameObjects and convert them directly to mesh while retaining LOD details (option to keep LODs) would be incredibly advantageous. This approach would eliminate the need for complicated workarounds and make the plugin even more robust for large projects.
I appreciate your plugin's current capabilities and believe this addition could enhance its functionality substantially. Given the tight three-week timeline for my project, I would greatly appreciate your thoughts on this potential feature.
Thank you for your time and the continuous development of Curvy.
This feature will definitely be useful, and I want to implement it in the next big update of Curvy Splines. However, this update is not planned for this summer.
In such cases, I usually suggest implementing the requested feature as a priority through contract work. Given the tight deadline, I am not sure I can implement the feature in under 3 weeks. I am not saying it is impossible. If you are willing to engage in contract work, please let me know so we can discuss this in more detail.
Besides implementing the feature, a workaround exists. To illustrate, please look at the attached scene first:
In it, you have two generators, one for each LOD. The workaround would be to make a script that iterates through both generators' generated GOs. For each pair of generated GOs, create a GO with a LOD Group attached to it, and set it up to use both GOs of the pair.
I hope this helped.
Please let me know if I can help further.
Have a nice day
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.