Home Unreal Engine

using splines to create roots in an environment?

polycounter lvl 5
Offline / Send Message
b0lly polycounter lvl 5
Hey guys!
I'm currently working on an environment that is set under the ground in a catacomb/cellar. I want to make roots come down from the cieling and cling to the walls and pillars in the room. I'm looking for a way to avoid modelling every single root in Maya and placing them on the exact correct spot in Unreal depending on the mesh they're modeled after, so I've been looking into maybe using splines to place the roots in engine instad. Although, I'm finding it hard to make it look atleast decent.

I'm somewhat used to working in Unreal, but a real novice when it comes to blueprints and coding in general. I've followed a tutorial and managed to set up a spline system that is meant to be used for pipes and similar things. As you can probably guess its not giving me the desired organic result. Mostly because there is no way to scale the different nodes in the spline so the root has the same thickness which gives it a very mechanical feel.

So I guess my question is, is there a way to modify the blueprint without it getting too advanced for me, and if not, is there another workflow for making some sort of spline based roots in Unreal? Or should I just bite the bulllet and build a bunch of different root meshes for my scene?

Any help or feedback is greatly appriciated!

here are some pics to go along with the wall of text:

My BP:


My reference:


My "root" with my current BP :neutral:

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    You can't really make this looking decent without making it "too complex". There are several ways to generate very complex splines automatically but you would need like a 20x bigger script. The very first thing that you could do is to reduce the thickness of the spline mesh as it gets closer to the end. Linearly reducing the thickness is very easy, breaking it up a little bit by using random additions is still fairly simple. This would still only give you one spline mesh and to get it looking good, you would need some branches. Look into "L-system", this is a common concept for generating plant-like structures. You could also make them automatically sticking to walls and ground, even all of them at the same time, by doing ray traces towards surfaces and placing the points at the hit locations with an offset value of the current thickness. You could also apply random local x or y offsets on the spline points, to make them uneven, wavy. 

    However, If you don't want to go this much into details, I would recommend just buying an existing one from the marketplace. There is also tutorial about snapping splines and L-systems on youtube, it was streamed by Epic. Its this - around 1 hour:
    https://www.youtube.com/watch?v=4gBAOB7b5Mg

    They did the same thing basically as what I described here.

    It also worth mentioning that recently I just discovered a huge disadvantage of splines, when I was trying to debug an issue of another user from here. It is impossible to apply vertex shader animation on them, because of the way they have their bounds. All spline meshes will have their own bounds, instead of having one shared for the whole structure, even when you enable inherit parent bound. This is a big problem , because a math with the bound is an analythical solution to create movement weights for vertex shader animations, ie. slight swinging in wind.

    Good luck. 




  • b0lly
    Options
    Offline / Send Message
    b0lly polycounter lvl 5
    Thanks for the tips! I'm gonna look into those things.
    I don't want to buy things from the marketplace for this project, I'm buildning a scene for my portfolio :)
    I've been tinkering with some set scale nodes thanks to my friend that knows more about blueprints than me but even with the simplest changes errors occur, probably because I am in way over my head :D
    Been spending hours now trying to get a not-horrible blueprint to work but since even that seems impossible I might just throw in the towel and build the meshes from scratch, old school style.
  • b0lly
    Options
    Offline / Send Message
    b0lly polycounter lvl 5
    I would love to get the spline system to work, if not for actually buildning things but so I can block out where and how I want my roots.
  • b0lly
    Options
    Offline / Send Message
    b0lly polycounter lvl 5
    I got some help from a friend to fix the BP a bit, and now it actually looks good enough for what I'm going for!
  • b0lly
    Options
    Offline / Send Message
    b0lly polycounter lvl 5
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Cool. Did you get the snapping and branches to work as well, or do you have to do that part manually?
  • Eric Chadwick
    Options
    Offline / Send Message
    You could also go with a more modular approach. Here's a shot from a level I did in the Titan Quest engine. Their roots models were nicely made and very reusable.


    Walkthrough video here
    http://ericchadwick.com/img/custommap.html
  • b0lly
    Options
    Offline / Send Message
    b0lly polycounter lvl 5
    @Obscura they don't snap and the branches are just scaled down versions of the roots. its not optimal, but it will do for now. I might swap the small branches for static meshes later if i have time :)

    @Eric Chadwick wow cool, is there any way for me to see the modules and how they work? i've been thinking about trying this approach also but im having hard time visualizing how to actually build the modules so that they work well.
  • Eric Chadwick
    Options
    Offline / Send Message
    It's only about $12, and the PC version comes with the editor to examine all the assets.
    https://www.amazon.com/Titan-Quest-PC/dp/B000FNH6OK

    $20 on steam for the remastered version
    http://store.steampowered.com/app/475150/Titan_Quest_Anniversary_Edition/

    I don't gain anything from selling it. I used to work with some of the original devs, so I bought and studied the game before working with them.
  • harry1511
    Options
    Offline / Send Message
    harry1511 polycounter lvl 5
    Don't know if you have seen this, but I also recently look into using spline for roots, I think this stream from epic will address the issue of thickness and width:
    https://www.youtube.com/watch?v=wR0fH6O9jD8
Sign In or Register to comment.