Need help with object array and align

Discussion in 'Content Creation' started by xnx1985, May 10, 2022.

  1. xnx1985

    xnx1985
    Expand Collapse

    Joined:
    Aug 7, 2014
    Messages:
    112
    In the vanilla maps I saw that guardrails are separate objects that align perfectly with the road. it's great for performance with LOD

    I wish to know how to do it? for example this is from the west coast map. the guardrail is a forest object
    just like fences and other objects.
    I really appreciate any help
    thanks :)
    Capture.jpg
     
  2. Duh anime addict

    Duh anime addict
    Expand Collapse

    Joined:
    Aug 5, 2021
    Messages:
    907
    Forest editor
     
  3. xnx1985

    xnx1985
    Expand Collapse

    Joined:
    Aug 7, 2014
    Messages:
    112
    The Forest editor places object in random places (inside the circle brush) but how can I use it to put them in one perfect line, like along the roads
     
  4. Duh anime addict

    Duh anime addict
    Expand Collapse

    Joined:
    Aug 5, 2021
    Messages:
    907
    That's literally what they used for the race track fences in wcusa
     
  5. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    323
    The trick is to array an object in blender along a curve. There is a plug-in for blender which is called forest exporter. You can export all objects in a group in blender as forest items. I have to test it soon too because I want to set a lot of poles along my roads. Somewhere in the forum there is a tutorial called map in a month. Worth reading.
     
    • Like Like x 1
    • Agree Agree x 1
  6. xnx1985

    xnx1985
    Expand Collapse

    Joined:
    Aug 7, 2014
    Messages:
    112
    Alex Thank you so much! this is exactly what I was looking for :) I'm so happy right now

    the tutorial is a bit old and some of the options in the blender are no longer available ( follow path by frame), also the forest addon didn't work so I needed to edit some of the python codes. (change " time.clock() " to " time.perf_counter() " )
    but I manage to use the exporter using array and curves and then separate by loos parts, after that i edit the JSON file to match the object I want to use.
    I write all this maybe it will help others :)
     
    • Like Like x 1
    • Agree Agree x 1
  7. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    323
    That's true. I had a hard time figuring out the loose part thing. My poles had been two instead one object after using the method :) I think the old implementation in Blender was better. I'm a newbie but it's really fun to learn something new and see the stuff in BeamNG. By the way: Is your heightmap displacement in Blender on point? I have a mismatch of 1.5 meters and can't figure out why. But I can live with it. Have fun building!
    Best!
    Alex
     
  8. xnx1985

    xnx1985
    Expand Collapse

    Joined:
    Aug 7, 2014
    Messages:
    112
    I'm not using the heightmap because It also didn't work well for me (also maybe because my map is too big it's 8X8), so i landscape by hand and for the roads I make another road mesh a bit wider and lower on the center and using the "align with mesh" brush
     
    • Like Like x 1
  9. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    323
    Great idea!
     
  10. xnx1985

    xnx1985
    Expand Collapse

    Joined:
    Aug 7, 2014
    Messages:
    112
    I found another problem and it's in blender
    when I separate loos parts after applying the modifiers, it creates multiple objects but all of them are with zero rotation when the origin is also applied.
    so I have the object in the right place but without the right rotation :\
    Does anyone know a way to keep the rotation on individual objects?
     
  11. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    323
    Don’t know. Select them all in object mode, hit ctrl-a and apply rotation and scale?
     
  12. xnx1985

    xnx1985
    Expand Collapse

    Joined:
    Aug 7, 2014
    Messages:
    112
    I found a solution, need to parent to another object and add the modifirer to this object. then you can apply make instances real so every object will be
    with its own transformation data :
     
    • Like Like x 2
  13. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    414
    I have barely any idea what you're both going on about. I have such limited experience of blender. But it sounds awesome.

    I'm in the process of manually adding guard rails at the moment and it is chuffing tedious.

    Any simpleton tutorials for a blender noob?
     
  14. xnx1985

    xnx1985
    Expand Collapse

    Joined:
    Aug 7, 2014
    Messages:
    112
    If I find a time I will make a tutorial for this
    still have some issues with some of the positions of the objects because other objects can't be with 0 rotation, maybe a bug in the game editor
    for example when I load at first my road mesh it's 0.040, and once I touch rotation it changes to 0.056 and not stay at 0.000. I believe this 0.056 completely messes with forest objects aligns with it
    upload_2022-5-13_13-36-12.png
     
    • Like Like x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice