top of page
  • Writer's pictureGruz z

Ivy Generator w5

Splinemesh Bad, Instance Good

Instance Bad, Static Mesh Good


Starting this week I wanted to tackle my last most difficult task; creating child splines for branching.

I had a vagues idea for how the logic of my blueprint will be but i severely underestimated just how much of my previous code was exclusive for a single spline and conversion was a more complicated process than it needs to be. I had to do a lot more setup before spline generation making sure each value is reset and set up for each spline so that it's ready to be used by the next one in line.

Once that was done I focused on assigning meshes to each spline. By default I had all the leaves sprout out of the local origin of the blueprint which looked like some alien plant, but that was because meshes were calculated on the local space of the BP not its corresponding spline. Because of this I realized I will have to remake all of the calculation that I did in local space I will now have to do them in worldspace and then convert them into the local space of its spline origin. Approaching this task I dreaded how much I'll have to remake, but after finding an incredibly helpful inverse transform node I was able to create a few macros and streamline the process making the what would be a big problem an easy fix.

Here are some broken blueprints:


Next I shifted my focus away from the tech to make the tool look good. I first wanted to completely recreate a leaf generator in substance designer to go full procedural, but I w as ultimately unsuccessful in creating normal ivy leaves. This left me with taking a couple ivy leaf images from the internet and using a tutorial from substance academy I was able to understand the process a lot more and create something more usable.


Now that al the tech needed was done with the final meshes I took to creating an environment with the tool. I intended to go with paragon but after noticing the 17gb file I looked for other environments that were good enough and ended up with the soul cave. After placing a couple of my ivies around I found myself 10fps (at home) lower which was a lot more than what I anticipated. Turns out that the stem itself was the performance killer. In a worst case scenario I can have 99,999 leaves and nearly no performance drop but as soon as a stem is added it'll drop by 30-40 fps from 90. having a lot of leaves can completely hide the fact that there is no stem at all. You don't even need many leaves to hide it.

I remembered seeing an unreal livestream where they used a tool like mine to create different types of foliage in paragon, and what bothered me is that all of them were using splinemeshes and somehow didn't have a big performance hit. Knowing that there is a way to make it work I was determined to find a solution. A couple crashes later I figured out how merge actors work in unreal. What this does is it creates a single static mesh from whatever your blueprint creates. Splinemesh will cease to be a problem.

Learning this took a while to convert the ivy into static meshes so it could be merged, involving having to open the blueprint many times. This is something that cannot happen if an artist is supposed to use this tool. After making a mess of my mesh generation code I was able to streamline it into a single tick box that converts the mesh.


Having a single mesh is much easier on the computer, but that was when I noticed that none of my leaves were moving; andthe colours were the same. This was because my material was set up to work on per instance variations which now there were none. Then the idea of using vertex colours came back since now I know I can use them (I tried applying vertex colours to instances before) an this allowed me to emulate different instances by just applying random shades. I also used this opportunity to create the brightening young

er leaves I was unable to implement before since the values I needed were right there.





335 views

Recent Posts

See All
bottom of page