Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deforming prefabs with LODs along a spine
#1
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.
Reply
#2
Hi
Sorry, I couldn't answer you today, was very busy with the Spring Sales. I will answer you tomorrow. Sorry for the delay.
Have a nice day.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Hi again,

Yes, it is possible to combine mesh deformation of multiple objects and LOD. This is how I would make it:

  1. Create a template generator that is setup to deform mesh along the needed path.
  2. 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.
  3. 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.
  4. Create 2 gamebojects having the LODGroup component: https://docs.unity3d.com/ScriptReference/LODGroup.html
  5. 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 will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#4
Thanks, I will give this method a try.
I'll post again with suggestions and feedback once I work out a method that works for my project.
Reply
#5
You are welcome, and thank you for planning to share suggestions and feedback.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Issues when working with in-place prefabs Sacryn 4 6 02-27-2024, 04:08 PM
Last Post: _Aka_
  Custom CurvySplineSegment prefabs Lupos 1 10 10-02-2023, 09:36 AM
Last Post: _Aka_
  Using Prefabs with transformations reset to original state when using Deform mesh danne_lindwall 3 6 04-28-2023, 01:35 PM
Last Post: _Aka_
  Input Spline Shapes from Prefabs destroys graph tairoark 5 7 11-24-2022, 05:08 PM
Last Post: _Aka_

Forum Jump: