Bending a Railroad Track to the Contours of a Landscape
Posted: 25 November 2019 04:31 PM   [ Ignore ]  
Total Posts:  143
Joined  2015-08-31

Hi Doc.  Hope you’re well.

I’ve built an environment using a Landscape object and and I’m trying to model a railroad track that will stick to the contours of the environment.  As a not-very-strong modeler, I think I can successfully create the railroad track, but I don’t know how to get it to bend along the surface of the landscape object.  In addition to it naturally bending along the surface, I’d like to have the freedom to bend the tracks in an art directed fashion.  When you have a moment, can you please help me understand how to accomplish this?  The final piece will be a still image with no animation.

Thank you!

Mark

Profile
 
 
Posted: 25 November 2019 06:56 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
Total Posts:  7531
Joined  2011-03-03

Hi Mark,

Thanks, I hope you are doing fine as well.

I hope this comes close:
https://www.amazon.com/clouddrive/share/VAVfo91SEehmozh1JODrFciCVaYwiPqrcEDOfSnB2dq

The Spline.main can be adjusted. I assumed that the track needs to be leveled to keep the train in normal orientation. Except for the up and down direction along the track.

The Spline might be a little bit off (spline v. projection), but so far any option to get these lined up, increased the complexity too much, so I left it at this state. It can be adjusted with the Surface Deformer> Object> Scale.

In a nutshell, the problem is given that the Surface Deformer works with UV. UV is a normalized space. The given shape is seen as a bounding box. This means, if some increase, other parts might get smaller. To have a spline as a frame around the Landscape (merged with the Spline .main) would help, but it would get Tracks around it.

Please let me know if there is a question, I’m happy to share more of course.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 25 November 2019 07:09 PM   [ Ignore ]   [ # 2 ]  
Moderator
Avatar
Total Posts:  7531
Joined  2011-03-03

P.S.: here is a little trick to get a stable “bounding box” simulation for the Surface Deformer.
https://www.amazon.com/clouddrive/share/7nUnYajKQkuLHIcmBk69SyHYiC9hbHXsvVuszCEd9TQ

When you click on the Spline.main, you will see in two corners vertices, but without the path connected to it. There are three Segments in this Spline. Two of them are just single point information. I created those from three Splines, connect+delete. Since the corner segments share the corner with the landscape, the Surface Deformer keeps anything inside of it as it should be.

To explain that in another way: The Spline Wrap has Bounding Box, and it has even the option to ‘freeze’ the size. This is not the case for the Surface Deformer, hence the extra work.
Please have a look here: (one minute clip)
https://www.amazon.com/clouddrive/share/O26rRR3UrTqQA8fflYZaBK52xql6VmRIglNcDA5mpCn

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 26 November 2019 11:35 AM   [ Ignore ]   [ # 3 ]  
Total Posts:  143
Joined  2015-08-31

Thanks so much for your help, Doc.  I’m going to check out your solutions as soon as I can find a free moment.  Happy Thanksgiving, my friend!

Profile
 
 
Posted: 26 November 2019 11:38 AM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
Total Posts:  7531
Joined  2011-03-03

Mark,

Please let me know if there is any question, or if you need something else, I’m happy to look into it.

Happy Thanksgiving to you as well!

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile