Unreal How to Make a Mesh follow a SPLINE

Поділитися
Вставка
  • Опубліковано 26 гру 2024

КОМЕНТАРІ • 160

  • @meowu-i9l
    @meowu-i9l 3 місяці тому +7

    Thank you for nice tutorial :) I share this for people who have had the same problem as me.
    1. Connect the white arrow connection between ‘Set Static Mesh’ and ‘Set Start and End’ in Script.
    2. If you do not see the spline white control point on the engine screen, press the 'G' to activate game mode. Then you can check the control points, and clicking and dragging will stretch the mesh.

    • @oo_ashton_oo3897
      @oo_ashton_oo3897 3 місяці тому

      Thanks for that! For some reason I completely forgot to connect the last two function nodes

  • @Mr_Fortnite_007
    @Mr_Fortnite_007 Місяць тому +1

    Thank you mister. It's so useful. If I had come across this video earlier, I wouldn't have struggled with creating roads in my Project last year.😅
    I will use this technique in my next projects where I know for sure that it will be useful..
    Thank you mister❤

  • @lukecoles2003
    @lukecoles2003 7 місяців тому +1

    Just finished following it. It works perfectly. When it did, I made an audible gasp in the middle of my college class.
    This has been such a headache for me. Thanks, mate!

  • @vortex3264
    @vortex3264 4 місяці тому +5

    Thank you for tutorial!
    I got some issues with mesh not repeating like other people. Probably bc on 6:42 most of us MISSED put 1 value in ADD function, i miss it few time even with rewatching

    • @jorgegomez7633
      @jorgegomez7633 2 місяці тому

      ty, this work for me

    • @retrodave4
      @retrodave4 Місяць тому

      Cheers mate! it's always the little details XD

  • @seanposkea
    @seanposkea Рік тому +16

    Thanks. Couple of quick comments. Your edit cuts are very fast after you have connected nodes. If you just paused for 1 or 2 seconds before jumping to the next cut it would be much easier to follow. Offsetting or using node reroutes would make following the long chain of targets coming of the Add SMC return value easier to read as well. You have them all perfectly lined up so its just one long blue line running behind that top row of nodes. Thanks.

  • @mayaivanova7645
    @mayaivanova7645 Місяць тому

    Thank you so much for mentioning that the model should be more high poly! For the last 2 hours I was wondering why my mesh was not following the curve properly when it actually was way too low poly :D.

  • @thegreatSalu
    @thegreatSalu 8 місяців тому +12

    I followed your tutorial from start to finish..I don't know what happened..but my mesh is not multiplying or following around spline..

    • @notcrazy
      @notcrazy 4 місяці тому +1

      Same here. I run the project in 5.3, every step the same as in the tutorial, but my mesh stays at the starting point and does not follow the spline :(

    • @thegreatSalu
      @thegreatSalu 4 місяці тому +2

      @@notcrazy I wasn't able to resolve the issue, so I took a different direction.

    • @temimitsu
      @temimitsu 4 місяці тому

      yep same here

    • @antb7792
      @antb7792 3 місяці тому

      Check to make sure your diving the spline length by the xlength, and not the other way around

  • @fullspectrumtuning8814
    @fullspectrumtuning8814 2 місяці тому

    Ok I'm basically day two in UE5, I attempted this tutorial at 7am and it didn't work. So I went and did another tutorial and it kind of worked but I realized the things I had missed in this tutorial. Also I came back and read the comments here. Making sure white flow is connected is crucial. Holding left alt to move your final spline. And also I didn't hear you say hold control key when dragging mesh or spline from sidebar. Anyways, I'm here to report that on the same evening, I have made the blueprint successfully. I used the lopoly railroad from CG trader and it looks great and even tho I just followed the tutorial I'm very proud of my little looping track.

  • @blacktecno
    @blacktecno Місяць тому

    I might have missed something I cant seem to figure out. Followed the tutorial, got it working except for one thing, the model seems streched and like its repeating way more than it should. I clamped the vector tangents, I've set the X length and connected the due nodes (as far as I can see) but it's still not repeating as it should. Any ideas guys? Im at a loss.
    Edit: It also seems to be mirroring the mesh, putting 2 walls in parallel instead of one. I must be missing something dang it.

  • @prashanthc.m7147
    @prashanthc.m7147 7 місяців тому +3

    i completely follwed your tutorial but i am not getting the mesh after adding mesh to blueprint in the detail panel

    • @hidezen387
      @hidezen387 6 місяців тому

      make the variable of your mesh public

  • @Mihacappy
    @Mihacappy 26 днів тому

    I wanted to make a road but unfortunately the end point of each sector does not rotate, meaning that instead of a smooth turn i am getting no turn at all + snake-like mesh components.

  • @sebastianjoseph8238
    @sebastianjoseph8238 25 днів тому

    after the completion of blue print am not able to see the static mesh option in details panel

  • @klutzydragon
    @klutzydragon 8 днів тому

    My "Get Bounding Box" only has 1 Return Value. Is there a way to fix this?

  • @JeRicotta
    @JeRicotta 25 днів тому

    Nice tutorial, i got it working fine but i still have a problem.
    When i try to move a dot from the spline the engine freeze, and resume my movement after a bunch of second, it make it really hard to use with precision. Any idea why its acting like that ?

  • @Alex-eu6rw
    @Alex-eu6rw 10 місяців тому +1

    So how would you do this but alternate the mesh? Like if you had a road that was dirt and pavement so you could place it and have dirt, then pavement, then dirt again.

  • @youngjojo3052
    @youngjojo3052 2 місяці тому

    Man I don’t know if you can save my project but I have a box collision I want it to stretch with the spline how can I achieve that.

  • @vehiclesunlimitedreviews
    @vehiclesunlimitedreviews Рік тому +4

    spline isnt working at all im not sure what i have missed... the mesh just stays on the original spline point when i drag it into the level but doesnt continue with my spline or other spline points.. maybe you might know my issue? if you can help thatd be awesome great video!

    • @vehiclesunlimitedreviews
      @vehiclesunlimitedreviews Рік тому

      basically the mesh wont repeat, i just get the originale point and mesh and wont spawn any more on the spline lol

    • @thegamedevcave
      @thegamedevcave  Рік тому +1

      probably part of the math of setting the mesh's location along the spline is going wrong, I would guess that it's just spwaning the new meshes on top of the previous ones without setting them to a new position along the spline. but without seeing your blueprint of course I can't be sure

    • @vehiclesunlimitedreviews
      @vehiclesunlimitedreviews Рік тому

      hmmm okay i will check it out and see if i can figure it out thank you tho!
      @@thegamedevcave

    • @tedats
      @tedats Рік тому +1

      Any luck? I have the same issue.

    • @tedats
      @tedats Рік тому +8

      I forgot to hook in set start and end into the other notes with the white input output arrows/lines

  • @omerturk7475
    @omerturk7475 3 місяці тому

    Hello, When I compile the blueprint and drag it to the scene, I dont have a "default" option(the place where you selected your mesh) in the detail part. can anyone help me?

    • @elliein3d
      @elliein3d 3 місяці тому

      You may have figured it out already but in the track blueprint click on the Mesh variable and make sure it is se4t to "instance editable". That way you can change the mesh in the scene and it can be different with each new spline

  • @minimoves7069
    @minimoves7069 5 місяців тому

    hi, thanks for the video. but I wonder what if I need some overlap? lets say I want to make cliff with this blueprint and I need the cliff go one anothr so that there is no gap and its mixed in between. How do I do that?

  • @DeadRabbitCanDance
    @DeadRabbitCanDance Місяць тому

    Nice! How i can change pivot points spline curve in runtime ?

  • @mindped
    @mindped 8 місяців тому +1

    my mesh sometimes twists in on itself on the end point.. is there a way to make the last part stretch to fit the spline in the end rather then twist in on itself?

  • @AlmazovS
    @AlmazovS Рік тому +2

    How to release instanced meshes and combine them into 1?

  • @albertusbodenstein1976
    @albertusbodenstein1976 5 місяців тому

    Thanks. Is there a way to convert the meshes? I use a scattering plugin 'Dash' but cant apply the scatter objects to the mesh..

  • @FPChris
    @FPChris 4 місяці тому

    On 5.4 Mine works but won't update until I recompile the blueprint every time I move a spline point. ???

  • @LambVisionStudios
    @LambVisionStudios 4 місяці тому

    how can i rotate this spline it only lets me on the x axis i need to be able roll... also if you try to make a loop with it it reverses to the other direction. any ideas?

  • @DatPhan-uo7ep
    @DatPhan-uo7ep 5 місяців тому

    how could I add multiple meshes to add variation? like some broken tracks

  • @miniponti
    @miniponti 10 місяців тому +1

    Hi guys I used to have trouble with this because I followed every step but in the end only one mesh was added and I didn't know what was wrong. BUT I FOUND THE SOLUTION!!! I rewatched the video carefully watching all steps and I found that I HADN'T DIVIDED CORRECTLY!!! I wanted my graph to be clean and not crossed, so instead of dividing the Spline Length by X_length, I did it the other way round. I hope this helps if you run into the same problem!! Solution: Spline length / x length

  • @KeWinn
    @KeWinn 11 місяців тому

    Thanks for the tutorial mate! Works flawlessly! This deserves way more views.

  • @ScottWrightPhotoCinema
    @ScottWrightPhotoCinema 2 місяці тому

    This is amazing. All set up and working great. I have an additional object that i want to follow the same spline. I created in the blueprint... How can I duplicate this or access the spline by another object.

  • @ToriPham
    @ToriPham 6 місяців тому

    Hello, thank for the guide, it very cool, but I dont know why my mesh dont duplicates but stay a same place.

  • @ZappaTheToaster
    @ZappaTheToaster 2 місяці тому

    The spline is working great except that I have issues detecting it with raycasts or sphere casts, even though physics collision works without issues. The mesh I'm using has simple collision set up and I set the spline mesh colision as Collison Enabled. With the sphere cast I tried setting it to both simple and complex, tried the Visibility and Camera channel. I tried setting different collision modes on the spline mesh, using a different base mesh but all of this was without luck.

    • @ZappaTheToaster
      @ZappaTheToaster 2 місяці тому

      I spent half a day on the issue before asking and I of course found the solution soon after. The collision channel for the mesh doesn't get set, so you need to set it yourself in the construction script using the "Set Collision Profile Name" node and entering the name of the channel you want.

  • @OMGITSGB
    @OMGITSGB 7 місяців тому

    im confused, my rail does not stay in the center :\ would you know why this is?

  • @kriswintf2027
    @kriswintf2027 2 місяці тому

    So how do i scroll those mesh along the spline? i want to make a tank tread.

  • @B.BiStudios
    @B.BiStudios 7 місяців тому +1

    Not working, it only works in viewport mode, but there is no on-stage editor in the editor itself. what needs to be done?

    • @B.BiStudios
      @B.BiStudios 7 місяців тому

      in general, I fixed this problem, I had to delete DefaultRoot and then yes, now it is updated both in the editor and in the view port in Blueprint

  • @athanjohn9458
    @athanjohn9458 10 місяців тому

    Amazing tutorial! Thank you. I am using this to add track static meshes to a spline loop for a tank track. I can populate the instance static meshes perfectly around the spline loop in an actor, then add that actor twice to my tank bp for the two tank tracks. (That’s a mouthful!)
    Now I would like to move the static meshes around the spline loop to “animate” the tank tracks when the tank moves…. How would I go about doing this?
    When I add the instance static mesh to the spline, I also added it to an array of statice meshes…. But that’s as far as I got 😞

    • @thegamedevcave
      @thegamedevcave  10 місяців тому

      well, at far as moving actors along the spline goes, i do have a video about that too! ua-cam.com/video/I7vg-WXBtXY/v-deo.html

  • @alinarangi7826
    @alinarangi7826 4 місяці тому

    Hi man thanks for tutorial. im new to unreal, i want to create my cable and use this technic and add 2 object in first and last point of itm can you please help me? thanks in advance

  • @abolfazlghobadi1656
    @abolfazlghobadi1656 6 місяців тому

    Quick Tip: You have to disable Nanite of the mesh you wanna use, otherwise its not gonna bend/deform regardless of how high poly it is.

  • @MCCROSB
    @MCCROSB 5 місяців тому

    is it possible to add one more variable to control scale of the instanced mesh?

  • @emilystonber3154
    @emilystonber3154 4 місяці тому

    awesome tutorial very clear thank you for always stating what ur pressing or doing :) gonna use this blueprint to make a railgaurd along my roads

  • @HamdanBasri
    @HamdanBasri 11 місяців тому

    Super simple straight forward clear explanation, love it!

  • @RebusMoebius
    @RebusMoebius 8 місяців тому

    Thanks. I created a Static Mesh in that blueprint also and spline component, but it doesnt work.
    I got messages like: *AttachTo: 'Unit Static Mesh' is not static (in blueprint "Unit_BP"), cannot attach 'AddSplineMeshComponent-1' which is static to it. Aborting.*
    as many times as my for loop works.

  • @thebelowzerogamers2179
    @thebelowzerogamers2179 5 місяців тому +2

    How do I add collision and get rid of gaps? Great tutorial otherwise!

    • @devonbedenbaugh6315
      @devonbedenbaugh6315 2 місяці тому

      I got rid of gaps by making sure my clamped tangent had its max set to Xlength, but now when I extend my track it distorts pretty heavily.

    • @devonbedenbaugh6315
      @devonbedenbaugh6315 2 місяці тому

      and i just figured it out, i hadn't connected my multiplied index to the distance for the tangent and location both.

  • @elnurmehdiyev5062
    @elnurmehdiyev5062 7 місяців тому

    Great tutorial! How did you made spline points anchored, I cant make turns for some reason? Got it need to hold ALT. Another problem I run into - cant get collision to work on spline generated meshes. Thing is when I raise my road above other meshes with collision on, I can step (jump) on it, but when my mesh enough low and crossing other objects, my character's feet passing through it, however I see little jump. Feels like theres some tuning needs to be made to feet offset of my character, which is quite weared.

  • @psyco4452
    @psyco4452 6 місяців тому

    all cute and all, but got a wierd question, why can't i access the spline as a child actor inside a actor itself ( doing a procedural world creation with world blocks ) yet i wanted to replace my 36 fixed actors Bp inside that block with something less memory eating. i was thinking about that exact procedural track but can't seem to move the spline points nor addind new ones :/ ( tried a spline mesh component form the 5.3.2 UE yet no success and if i want that soemthign close to yours i have to extend my meshes manually ( blender ) and do all sort of math deformations for only 1 part wich is dum and unpratical .)

    • @psyco4452
      @psyco4452 6 місяців тому

      wait im might be just dumb enough... think il need to set straightly splines instead of trying to impliment the 'created actor' inside the world blocks actor . so in term copy pasta this function and script inside each worldblocks xD
      edit : doing so works out. now i have to set pool objects so the engine doesn't create new blocks but reload ( objects into it, enemies spawners and all ) pre-existing ones and relocating

  • @TheKr0ckeR
    @TheKr0ckeR 8 місяців тому

    Great guide mate! The mesh I got was very low-scaled, i merged them in UE and in build settings increased the build scale. So when calculating, mesh will be calculated with its own length or should i multiply it x10 for example? The reason i am askin this when we merge meshes and create a new Static mesh, and set its build scale, does it count as original scale?

  • @snowshinobi1142
    @snowshinobi1142 Рік тому +1

    This is great thank you. I've watched your video many time but i cannot get the spline points to popuilate. is tehre a hotkey? when i press add nothing happens.
    Also the track does get bigger but it does not create more points

    • @thegamedevcave
      @thegamedevcave  Рік тому +3

      just hold alt when moving any spline point and it'll create a new one, just like how holding alt when moving an actor makes a copy of it

  • @forgottenerror
    @forgottenerror 6 місяців тому

    I'm having a problem. When I move the spline it doesn't update unless I change something in the details panel or undo. Is this a problem with me running UE 5.4? Great tutorial though!

    • @thegamedevcave
      @thegamedevcave  6 місяців тому

      might be because the mobility of the actor is set to static, i remember having some people having an issue with that at some point.

  • @dustingaudet2796
    @dustingaudet2796 5 місяців тому

    How do you drag out the spline like that? Every time I try it seems to just move the camera instead

    • @NotDopple
      @NotDopple Місяць тому

      You have to click it first instead of dragging

  • @sarfraz8533
    @sarfraz8533 9 місяців тому

    How to add offset between mesh , instead of populating one after another.

  • @nicholaspage2445
    @nicholaspage2445 6 місяців тому

    Do you know how to modify the speed of a spline?

  • @hamzakilic7844
    @hamzakilic7844 10 місяців тому

    Hi friend, How can I merge splines in different landscapes?

  • @kovacore
    @kovacore 11 місяців тому

    Hi, your tutorial uses a fuction "set forward Axis" which does not seem to be an available function in my project. infact the "spline mesh" drop down that contains this function is missing completely. is there a plugin required that wasn't mentioned? my unreal version is 5.3.2

    • @thegamedevcave
      @thegamedevcave  11 місяців тому

      no this should be in the base unreal engine. I just checked to be sure nothing changed but it's still there in 5.3, i even use it for some assets in my own game, what kind of blueprint are you trying to put it on? it has to be an actor, i dont think you can add these to a component if that's what you're trying to do

    • @kovacore
      @kovacore 11 місяців тому

      ​@@thegamedevcave Just checked my project and the BP has the Actor parent class. but I have found the problem, basically for whatever reason I don't understand the "Context Sensitive" button on the action search drop down filters out all spline mesh functions.

    • @isakbendixen581
      @isakbendixen581 9 місяців тому

      @@kovacore what did you do to fix this problem? I am also unable to get the "set forward axis".. I can see it when i untick the "Context sensitive" But then i cant get the nodes to connect

  • @IamNeighborlee
    @IamNeighborlee Рік тому +1

    What are advantages of this over using one in modeling tools or top menu in UE ?

    • @thegamedevcave
      @thegamedevcave  Рік тому +2

      I am not aware of any of unreal's modeling tools that does this job. maybe i've overlooked that though, so good to look into.
      At least compared to generates mesh actors, this method doesn't need to be baked, so it's much easier to set it up and come back to it months later and still have it easily editable. But for the most part, on it's own, I'd say there isn't much use in this over a build in splinemesh deformer if unreal has one, this would mostly come in handy for things like train tracks where you have a script that also moves a train over these rails and both the track and the track follow along the same spline

    • @IamNeighborlee
      @IamNeighborlee Рік тому

      @@thegamedevcave Ty and for quick response

  • @LuciousKage
    @LuciousKage Рік тому +1

    hmm、question, is it possible to change mesh on lets say component overlap?

    • @thegamedevcave
      @thegamedevcave  Рік тому

      should be possible but you'll likely have to put all of this into a function with a parameter for which mesh you want it to use instead of directly into your construction script. then you simply put that function in your construction script for it's default mesh and then use that same function in your normal event graph on overlap to set it's new mesh value.

  • @alexrybin3798
    @alexrybin3798 6 місяців тому

    Thanks a lot for the tutorial, i got bonus question
    Is there a way to animate position of start and end point? so my mesh will move along spline inside my blueprint. Not outside like you made in other video.
    Thank you! :)

    • @thegamedevcave
      @thegamedevcave  6 місяців тому +1

      sadly, splines aren't means to dynamically change at runtime so you can't animate the spline points

    • @alexrybin3798
      @alexrybin3798 6 місяців тому

      @@thegamedevcave thank you, what about meshes inside blueprint? in your example it will be moving railroad itself, but not "train"

    • @thegamedevcave
      @thegamedevcave  6 місяців тому +1

      @@alexrybin3798 you might be able to animate some kind of offset varialbe for the meshes, i've never tried if spline meshes can be animated like that. I would assume that also is a problem though since i expect the reason splines can't be animated is that the engine really wants to bake your splinesmesh down to a static mesh. But i've never tested that, so it might work?

  • @searbhreathach9762
    @searbhreathach9762 8 місяців тому

    Is it possible to sculpt it first in blender and add the material and all?

    • @thegamedevcave
      @thegamedevcave  8 місяців тому

      sure , you can do this with any model you like

  • @diamond32tutoriales49
    @diamond32tutoriales49 11 місяців тому +1

    I am causing too much lag when it is generated and when I see it

    • @thegamedevcave
      @thegamedevcave  11 місяців тому

      probably using a too high poly mesh or your PC might be a bit underpowered for unreal (it's pretty heavy to run). or both.
      in any case, you'll want to have enough polygons for the mesh to deform but not go overboard and make it a super high detailed mesh

    • @StiGMaT14
      @StiGMaT14 10 місяців тому

      Im getting pretty bad lag too trying to move any spline points. i was able to place a spline with a repeating mesh using a non bp method but using the bp method its super lagy... using a ryzen7 5800 with a 3070 ti. and 32gb of ram i dont feel i should be lagging.

    • @jodas8334
      @jodas8334 10 місяців тому

      So i found the video thats showed how to repeat the mesh on the spline without a blueprint. using this method i have no lag unlike your method. is there any major diffrences between this method and your blueprint method? this video here you dont really show how to add a mesh on top of this spline and have it move unlike the first few seconds of your video. im confused See the non bp metthod here: ua-cam.com/video/JoCPi-9Op5U/v-deo.html&ab_channel=Axton99 can i use this non bp method to place my spline then animate it? cause this lag its impossible to work with the points.... thanks for the video and help

  • @jma3038
    @jma3038 Рік тому +3

    Amazing video, and very helpful! NO clue why you dont have more views, you deserve it :)

  • @yusufbulut4312
    @yusufbulut4312 11 місяців тому

    can ı use it in sequancer?

  • @lukecoles2003
    @lukecoles2003 7 місяців тому

    Thanks. My first attempt at this didn't work so hopefully, this method works better. Lol
    Also, how many polygons would you say a mesh should have on average to bend smoothly? I just don't want the mesh files to end up larger than they need to be.

    • @thegamedevcave
      @thegamedevcave  7 місяців тому

      hard to say as a general statement , depends on the size and how sharply they will turn , a thin pipe that needs to only have a very weak angle can be rather low poly but wide train tracks that need to make near 90 degree turns, you'll want to have a lot more.
      Generally i would say if your mesh as about 4/5 loopcuts worth of geometry for every meter of distance it is long (in both directions) you'll probably be fine but it's best to expiriment a bit with it yourself to get a good feel for what you need :)

  • @shubhamchauhan7274
    @shubhamchauhan7274 7 місяців тому

    This is working fine but Unreal is bugging out, You have to set the curve in scene and go back and compile again to see the results. I dont know why that is the case if any one have a solution for this let me know.

  • @ramiru3264
    @ramiru3264 8 місяців тому

    its hard to select the endpoint

    • @thegamedevcave
      @thegamedevcave  8 місяців тому

      Yeah it takes some getting used to working with splines in unreal

  • @noushinpourmirza3054
    @noushinpourmirza3054 6 місяців тому

    Amazing job. You made my day. Thank you for this useful video

  • @oOHayatoOo
    @oOHayatoOo 4 місяці тому

    Thank you very much, works like a clock !

  • @ParikshitBhujbal
    @ParikshitBhujbal Рік тому +1

    Hi, I need your help please.
    I have done everything as you have done in this video, only difference is since I don't have your Road mesh , so I downloaded another mesh from Megascans called Rocky forest path from the Nordic coastal cliff collections with size 349x121x11. Since it is from Megascans , it is also a high poly & is directed along the X axis as well.
    However, after doing everything like you in the construction script, once I save and compile and try to drag and drop the BP Actor on my landscape, I get a weird squished up mesh of my forest path.
    Its so squished up that I can't even select the end so I can ALT and drag it.
    @dedats and @vehiclesunlimitedreviews in the comment section too are having the same problem , can you help please?
    Thank you for the video, it was very easy to understand but I am not getting the results you are getting.

    • @thegamedevcave
      @thegamedevcave  Рік тому

      did you move to spline point? if your spline is too short it'll squish your mesh since it can't cut off any part of the mesh

    • @ParikshitBhujbal
      @ParikshitBhujbal Рік тому

      @@thegamedevcave In the viewport of the spline , I kept only 2 spline points & changed the distance between them to 349 units so they can comfortably fit the 349 length of my static mesh.
      That did not work as well..
      One thing I noticed is unlike your static mesh, when you drag and drop your BP to your viewport , your spline mesh railway track starting position is one of the ends of the spline itself, but for me, when I drag n drop my BP in my viewport, the starting point of my mesh is NOT the starting point of my spline , the centre of my mesh is the starting point of my spline!
      I think this is why my mesh is so squished up , my mesh is spawning not from the end but right in the middle of the spline point :s
      How do I make so that my mesh spawns from the starting point of the spline?
      Below is the image showing the spawning point of the mesh is right at the centre of the mesh on the first point of the spline.
      postimg.cc/K3G33Q4J

    • @thegamedevcave
      @thegamedevcave  Рік тому +1

      @@ParikshitBhujbal that image looks like something is getting messed up with setting the end position for the mesh. I have to imagine somewhere in all the math nodes something isn't connected up properly. it looks like your roadmeshlength might not be the right value if i had to guess

    • @ParikshitBhujbal
      @ParikshitBhujbal Рік тому

      @@thegamedevcave Hi thegamedevcave, I really appreciate you giving your time to help me with this, I tried other videos for making a spline road but none off them are using the Get Bonding Box node like you, and most off them are using the spline points to find the Location and Tangents for the start and end pos instead of your method, so I really want your method to work because I think its more detailed and dynamic.
      I checked the roadmeshlength value like you pointed out earlier and it is working properly, it accurately shows me the length of the various mesh I put in the Road Mesh variable which means that your Bounding Box node is working as intended.
      I am using the exact same nodes as you in the exact same way , the only difference is that when i expand the Get Bounding box it is now showing me a third node , a Boolean called Return value is valid whereas in your video it only shows two nodes.
      I tried using other meshes but they all have the same issue, the Mesh wont start at the starting point of the spline, the centre of the Mesh is always the starting point of the spline and this causes the Mesh to get deformed and squished up. The Mesh just seems to superimpose itself at the start point of the spline, which is why I can't even select the start and end points of the static mesh.
      If you look at the comments section there are 2 more viewers facing the same issue as me :(

    • @ParikshitBhujbal
      @ParikshitBhujbal Рік тому

      @@thegamedevcave Hey its working now as intended , I re wrote the nodes at the get location and tangent part and now its working beautifully! :)
      And Thank you once again for helping me out , keep up the good work :)

  • @satanikatze
    @satanikatze Рік тому

    Very helpful but I still have a few questions. First, how do you twist it ? if you want it to make like a curve at some point (in tight curves for example) or do a complete twist and are the collisions ok in that case ? Second, how do you change the mesh mid spline ? Imagine you want this mesh 5 times and then the mesh changes, how does that work ? Third, do I need to create the mesh with their real size ? Like a section of the road will be about 30m width ? I'm afraid resizing it in UE won't be good for the Atlas but modelling 30 to 70m long meshes seems... extreme. I'm supposed to do a kit for next year and I don't really know what I have to model so far because I don't know yet if I have to do a twisted version or not... Well there are other meshes to work on but the road is kind of the most important part and that's where I'm stuck... Thanks in advance if you answer and thanks for that video it helped me already !

    • @thegamedevcave
      @thegamedevcave  Рік тому +1

      you can just make an int variable and in the for each loop add 1 to each each time, then check if it's equal to 5, if it is, add your different mesh to the static mesh component instead of the normal one and set the int back to 0, you can just make a separate static mesh variable that you use. if you want to manually add in different meshes at arbitrary placements, that isn't going to work all that well with this whole system. but if you use the above method, it will add in the different mesh once every 5 components.
      twisting should just be a matter of rotating the spline point around, just make sure your mesh has enough geometry to bend probably to avoid pinching and don't make the twist too sharp. It shouldn't have any issues regarding collision.

    • @satanikatze
      @satanikatze Рік тому

      @@thegamedevcave Wow, wasn't expecting a response that quickly ! Awsome, I'll try that. I guess I'll create a first version and see how it goes on its own before trying variations. UE is a totally different world for me I'll give that a try, thank you very much !

  • @archiblage
    @archiblage 9 місяців тому

    Amazing video, I just have a Q please
    how to add rotation ? I mean in my case, I needed to play with the rotation of the mesh along the spline

    • @thegamedevcave
      @thegamedevcave  9 місяців тому +1

      this already does rotation too, the mesh will rotate and twist along the spline when you rotate the spline points

    • @archiblage
      @archiblage 9 місяців тому

      @@thegamedevcave it rotates around the z axis yes, but I meant to rotate around x Or y axis. Of course this in the case of a train trails not possible :D but my inquiry is to create a sort of twisted form. Thanks for the reply anyway and for your effort inadvance 🙏

    • @thegamedevcave
      @thegamedevcave  9 місяців тому +1

      the nodes added around 6:20 do that already, it takes the tangent of the spline at any point (which is 3 dimensional) and applies it to the mesh.

    • @archiblage
      @archiblage 9 місяців тому

      I see, My bad @@thegamedevcave

    • @valgau9488
      @valgau9488 2 місяці тому

      The x/y rotation doesnt works for me either :/

  • @nealcaffrey8890
    @nealcaffrey8890 Рік тому

    I followed your tutorial and the rails are compressing very badly in the X-axis direction. My version is 5.3

    • @thegamedevcave
      @thegamedevcave  Рік тому

      it will compress when there isn't enough space. so if you only have a really short spline with a long mesh, it'll compress, it sometimes also compresses the last little bit, between the last 2 points for the same reason.

    • @nealcaffrey8890
      @nealcaffrey8890 Рік тому

      I stretched the Spline length and it didn't work, neither did changing X to Y or to Z.@@thegamedevcave

    • @thegamedevcave
      @thegamedevcave  Рік тому

      @@nealcaffrey8890 then you should go back over the blueprint and check for issues, I’m pretty sure it’s not a version issue

    • @nealcaffrey8890
      @nealcaffrey8890 Рік тому

      I'm a beginner and English is not my first language. It's a bit difficult for me to follow your thoughts or to understand the meaning of each function, so I'd appreciate it if you could organize the logic to achieve this effect and the functions corresponding to each step into a logic diagram.@@thegamedevcave

    • @nealcaffrey8890
      @nealcaffrey8890 Рік тому

      @@thegamedevcave OK,I'll check my blueprint again,thx

  • @wowersdh1
    @wowersdh1 Рік тому

    can I animate it in sequencer? I want to make snake animation

    • @thegamedevcave
      @thegamedevcave  Рік тому

      i haven't tried it but I dont think that'll work, I doubt the sequencer updates construction script, you're better off just making your object from a skeletal mesh and animating that I think.

    • @wowersdh1
      @wowersdh1 Рік тому

      @@thegamedevcave Thanks for reply. I really need long object following path animation in sequencer wonder UE5 have this feature. if I import from Alembic would be pain in the A XD
      Thanks anyway

  • @shadeofficial1079
    @shadeofficial1079 11 місяців тому

    My railway works fine but when there is a turn the spline is not at the center of the railway , couldnt explain it better i can send you an image if you dont understand

    • @tonylanglet
      @tonylanglet 4 місяці тому

      My guess is either the length math of the mesh is wrong or you might have to make changes to the mesh where the pivot is located, hope my comment gave you some ideas.

  • @PalThing
    @PalThing 4 місяці тому

    After struggling all day with meshes that have Z forward axis, doing all kinds of transformations, it was just Set Forward Axis. 🙂 🙂

  • @fabiorota9661
    @fabiorota9661 4 місяці тому

    you are a hero man

  • @dantenage9687
    @dantenage9687 6 місяців тому

    thanks bro, you're the best

  • @nealcaffrey8890
    @nealcaffrey8890 Рік тому +1

    I made it,I didn't notice you plus 1 at the end position

  • @JyotiEntertainmentProduction
    @JyotiEntertainmentProduction 5 місяців тому

    Thank You!

  • @WaffleWaffles
    @WaffleWaffles Рік тому

    Is it one draw call for each piece?

    • @thegamedevcave
      @thegamedevcave  Рік тому

      I'm not 100% sure but I am pretty sure it would be a draw call for each segment yeah. Since it can't use instanced static meshes due to them all being deformed in different ways, hence the need for more draw calls.

  • @ryurxdn9394
    @ryurxdn9394 4 місяці тому

    i t d i d n ' t w o r k e d

  • @toyo3560
    @toyo3560 10 місяців тому

    I love you❤

  • @KonradTamas
    @KonradTamas 5 місяців тому

    Proper complicated shit

    • @thegamedevcave
      @thegamedevcave  5 місяців тому

      for a lot of use cases this is also no longer needed. unreal now has built in support for putting things along splines in their modeling mode. which is less of a headache than making it yourself (unless you have a real good reason to do it yourself like making a train track that also has a train cart going over it by following the same spline or something)

  • @teamsentry3657
    @teamsentry3657 4 місяці тому

    в руки тебе насрать. у меня ничего не работает

  • @camerontraer3136
    @camerontraer3136 8 місяців тому

    thanks for wasting my time. Doesn't work when i checked the axis, and it's completely inverting my mesh.

    • @thegamedevcave
      @thegamedevcave  8 місяців тому +3

      hey, instead of being rude out of frustration, asking for help might get you better results. you're likely using a different axis on yoru mesh, or somewhere things are getting multiplied in scale weirdly.

    • @camerontraer3136
      @camerontraer3136 8 місяців тому

      @@thegamedevcave sorry, my bad, got frustrated. I apologize. But I’m completely lost to this. Anything you think I could do?

    • @thegamedevcave
      @thegamedevcave  8 місяців тому +1

      @@camerontraer3136 how does it invert the mesh? upside down? or like inside out? either way it sounds liek something is going wrong with some of the multiplication math to set positions and rotation and such.

  • @orenders
    @orenders 9 місяців тому

    after 100 pause/start im tired of you, very bad guide

    • @thegamedevcave
      @thegamedevcave  9 місяців тому +5

      Go look up another one then, if you want help don’t be a dick, if you’re gonna be a dick, don’t bother coming here 🤷🏻‍♂️