Results 1 to 10 of 10

Thread: Stick car to varied ground?

  1. #1
    digital witchdoctor objuan's Avatar
    Join Date
    Nov 2003
    Location
    Denver, CO
    Posts
    517

    Stick car to varied ground?

    I know I've seen posts on this before, but searching isn't quite bringing it up for me like I hoped.

    I have a car on a road that ramps up and down a little bit. How can I just animate the car's center null in X and Y, and automatically put it's Y on top of my road mesh? And preferably also adjust pitch?

    Thanks!
    Ocean Byrne
    humble pixel farmer
    www.moceandesigns.com

  2. #2
    Curmudgeon in Training Ma3rk's Avatar
    Join Date
    Mar 2003
    Location
    Pasadena, CA
    Posts
    854
    You might look into RayCast, but your best bet assuming you've LW 2018 is to examine the car scenes under Bullet_Dynamics folder.
    "Never be a cat in a cartoon. Never." Chief Wiggum

  3. #3
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,421
    If you choose not to use Bullet for the collision detection, using RayCast Geometry is fairly straightforward.

    1) Keyframe your car's Y position above the road at all points and the X,Z positions to define its path across the surface
    2) Use RayCast Geometry to detect the road
    3) Use the ConvertHitNormalToHPB node to convert the RayCast Geometry Hit Normal output to Heading, Pitch and Bank on the car

    I normally extract the Pitch and Bank using Vector Scalar nodes, and use Align to Path to control the vehicle's Heading.

    Using Bullet Constraints as in the example LW2018 scenes will probably give a more realistic scene if you want / need the wheels to adjust individually to the variable ground.

    The ConvertHitNormalToHPB node is in the LW2015 content under Nodes=>RayCast Assist=>RayCast-NodalMotion folder, but doesn't appear to be included in the LW2018 content.

    mTp

  4. #4
    Remember Wade's Avatar
    Join Date
    Feb 2003
    Location
    Cypress Texas
    Posts
    1,374
    Others have done a good job of it - https://www.youtube.com/watch?v=spDHrFATxXI but this is past my knowledge. Looking forward to seeing where you take it.

    AND THIS GUY!
    Last edited by Wade; 08-13-2018 at 09:18 AM.
    Shuttle XPCVista 64 bit /Core2Extreme x9650 3.00GHz 8GB GeForce 8800 GTS 512 Cintiq 21UX
    Dell 24" LCD Dell XT2 Tablet /Win 7 32 Bit /Core 2 duo SU9600 1.6 GHz 3GB / Mobil Intel 4500MHD

  5. #5
    digital witchdoctor objuan's Avatar
    Join Date
    Nov 2003
    Location
    Denver, CO
    Posts
    517
    Mine will be nowhere near as cool as Dr Melon there. That is a nice rig, and a cool model. Thanks for the tips y'all.
    Ocean Byrne
    humble pixel farmer
    www.moceandesigns.com

  6. #6
    ack ack Markc's Avatar
    Join Date
    Feb 2006
    Location
    England
    Posts
    1,200
    Rebel Hill has some tutorials (but they are not free).
    Available on Liberty 3D website......

    Click image for larger version. 

Name:	car.jpeg 
Views:	18 
Size:	226.9 KB 
ID:	142497
    Mac Pro (2010) OSX 10.12 RX580 Pulse LW2018 Fusion 9 Oculus Rift Gear VR

  7. #7
    LW vidz   DPont donate   LightWiki   RHiggit   IKBooster   My vidz

  8. #8
    areté adk's Avatar
    Join Date
    Feb 2003
    Location
    Melbourne
    Posts
    1,466
    Quote Originally Posted by erikals View Post
    Oh cool ! Didn't even know this was available. I really need to go through ALL the tools Oliver has
    He's so prolific that it's hard to keep up.

  9. #9

    he's a Coding Monster!  

    LW vidz   DPont donate   LightWiki   RHiggit   IKBooster   My vidz

  10. #10
    Axes grinder- Dongle #99
    Join Date
    Jul 2003
    Location
    Seattle
    Posts
    14,637
    Excellent thread!
    They only call it 'class warfare' when we fight back.
    Praise to Buddha! #resist
    Chard's Credo-"Documentation is PART of the Interface"
    Film the cops. Always FILM THE COPS. Use this app.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •