Hello
Thank you for your questions
Short answers
Q: “I’ve watched your video and am I right in observing you can place only one SM per spline section?”
A: Correct
Q: “Is there a way to get the above with the decorations you mentioned, or would I need multiple splines following the same path each with a different SM?”
A: Correct, you can use the decorations to do what your talking about, and correct you can still use multiple splines.
Long Answers
Note: Nothing that I say below that may seem to be “disparaging” of Epic Games or the UE4 Engine is meant to be,
it’s just acknowledgement of fact.
Q: “I’ve watched your video and am I right in observing you can place only one SM per spline section?”
That is correct, I have played with, putting more than one mesh per segment, and yet I ran into issues doing this.
Such that the Splmc (Spline Mesh Component) would appear to warp back on itself. Until the the next spline
point (i.e. we start at N, so spline point N+1) was a distance from the spline point N, such that
the distance was an integral of the static mesh size, in terms of X (X for a forward vector if you will).
I cannot say that I spent a lot of time looking into this, so do not totally understand the issue.
What I was after, was that a customer, could drag and drop a SM for that segment of the spline.
would then query the X length of the static mesh through the plugin, and “replicate”
the SM along the segment so there was no “scaling” going on, doing a “best fit”, with the
remainder evenly distributed among all the Splmc’s along that segment. Again though
I found I had the “warping” issues with that. But I dropped looking into this, because,
one may as well just create another point on the Spline, and allow that to
control the scaling. I have some code to finish, that will allow far more
automated generation of spline points. This is kind of a minefield as well, as UE4 engine
is very very touchy about having the spline messed with programatically.
I have no doubt, that I will be going back to look at the issue again, because of the
“transiting” portion of the product along the spline.
But your correct in stating what you saw, right now, it’s one static mesh per segment.
Q: “Is there a way to get the above with the decorations you mentioned, or would
I need multiple splines following the same path each with a different SM?”
I think this would work well for you (assuming I have in my head, what is in yours, in terms of your usage!).
Reason being, the Splmc, are being scaled, and deformed. Now for many things this is exactly what
we want. Yet, when I was thinking about it’s usage to generate Streets. If I’m say wanting a
Street Light at each intersection, or a street name sign. I don’t wish that really to be
scaled by anything to do with the spline. Hence, if we put in “decorations” (admittedly not the best name for this)
Those will just be your standard static mesh (or instanced), that I can have some rudimentary
controls for, such as rotation scaling, etc. Which for my example here, gives the desired affect.
For your hedgerows, it may not be such a big difference if a rock is scaled a little bit,
yet by using the decorations, it’s not a worry, because if you want it scaled, you can,
if not just don’t scale it. There are controls for each “decoration” to set the offset location from
the spline point for it’s generation, scaling, etc.
Now there is somehting I think you might like to be automatic? and it’s not…
Assume you have your hedgerow made of bushes, and now you decided that you want to pop in
a Rock, or rubble, or whatever. So you pop that in as a decoration, , generates it, alls well and wonderful!
Until you grab that end spline point, and hold down the alt key, and duplicate the point, dragging it out.
will then generate the static mesh, again, and it’s partially going to overlay the rock.
Can you control this? yes, by giving that Splcm for the segment a offset from the spline point to start at
where it’s not overlaying the rock. One can work around it, but to me it would be better
to be able to click a box, for say “automatic offset” for that segment. Letting
look at the “farthest” decoration, and adjust the starting offset of the Splmc on the
following segment, such that there was no overlap. Even this might not be good enough in
your case, because we really do not ever see a hedgerow in real life, where by the “hedge”
runs right up to each and every rock, and instantly stops on both sides, such that the hedge
isn’t overlaying the rock in some fashion.
The decorations though are a extremely powerful part of the product, in that you can
control exacty where the decorations are generated relative to the spline point
they are set up for. So to push the hedgerow farther, you have the “hedge” and
“rocks”, but let’s say you want to add “flowers” per say? You could drag over a few little flowers
control the generation point, etc.
Decorations allow the random generation of the location of the SM’s within a “cube” relative to
the spline point as well. This is how I create a “forest”. I assign rocks, debris, trees, flowers,
etc. then all those static meshes get generated at each spline point. Which allows me to make more
“dense” areas by just moving the spline points closer, or less dense by moving them farther away.
One of the fantastic things, about working withe splines, is that, when you wish to say move
your hedgerow, for whatever reason, it’s just a matter of selecting the entire spline,
and dragging it to where ever you want it. So for like me, that can save 10 minutes easy of
having to select all the assets, and then moving them. I also put in a check box, that you
can use, to tell “no construction generation”, hence when your dragging around
500 spline meshs, your not getting lag, because UE4 engine is calling the
construction script on the blueprint, for each pixel (not exactly but it’s close), that the
blueprint is moved.
I’m shooting to make , the essential purchase you spoke of. While I would readily
agree, that will not do everything that one may wish right now.
Some things that I know I’m going to do,
-
I know I will have to make a new slate interface to use it. There is just no other way,
and right now, having all the “controls” essentially being nothing more than controlling variables
in the blueprint, is cumbersome at best.
-
I would like to have , allow for the generation of two (or N) additional splines, one
to the right and left, of the main spline. Such that those two new splines, could be treated
independently, or the spline points could be locked to the “central” spline, hence one
could then start laying in “sidewalks” for a urban road. Or say you have a dirtroad, for your
game, then your “hedgerows” could be generated and locked to the dirtroad spline.
-
A seperate plugin, for working with the UE4 Editor, such that one can select, a decoration,
or actor that has been created, and drag it around directly, and have that selected at the same
time in the Slate interface, such that you have draggable movement, yet can still get right at
for specific input if you wish. With the biggest reason being, so that the customer has better control
of the generated decorations, and to keep the addition of new features, from feeling “clumsy” to use.
This is just 3 items, there are a ton of little things.
As it sounds like you are doing some of the same things in your game that I am. I definitly
appreciate your questions.
I hope I have answered your questions, and not further confused the issue!
Have a great day!