HOW TO: Smoothen road mesh in 3ds Max

Discussion in 'Track Modding' started by stonec, Jul 11, 2015.

  1. stonec

    stonec Member

    Joined:
    Jun 19, 2012
    Messages:
    3,203
    Likes Received:
    1,314
    I grew annoyed of driving on rF1 track conversions with low-poly road mesh in rF2. As I couldn't find any simple tutorial, I decided to make short video tutorial on how to upsample and smoothen road mesh. It's a really simple operation on most tracks, doesn't take more than half an hour or so. If it gets popular I might record something better.
     
    Mauro likes this.
  2. Nuno Lourenço

    Nuno Lourenço Registered

    Joined:
    Oct 19, 2010
    Messages:
    582
    Likes Received:
    50
    Using mesh smooth directly that way you can have problem in future. the border vertex need to keep position to be correctly aligned with terrain, if you aply mesh smooth in all mesh when you get elevations you will get holes between road and terrain.

    If the problem is only low poly road you can apply tesselation that only add pollys to keep boarders untouched if the track have problem with elevations because being low poly you must apply mesh smooth in all objects but the borders.

    I've been dealing with it in oulton roadmesh and I'll upload a video too soon with the method that I'm using.

    :)
     
  3. stonec

    stonec Member

    Joined:
    Jun 19, 2012
    Messages:
    3,203
    Likes Received:
    1,314
    Yep true, any bit of information is important so other modders can do this more easily.
     
  4. Mario Morais

    Mario Morais Member

    Joined:
    Oct 26, 2010
    Messages:
    1,464
    Likes Received:
    168
    After quadify can do a RING edge select and apply connect.
     
  5. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    or.... [manual version for part of what I recently coded to create test track surfaces]

    1. Enable snaps, set to vertex snap.
    2. Place "point" helpers around the center line of the track, about 2m apart.
    [point helpers only used as visual guide for clicking to create splines in this manual method]
    3. Go to Create Panel, Shapes > Splines > Line [use controls to create spline's (knots) as "smooth"].
    4. Click around Outside edge of track (to the outside track edge of each point helper) to create a spline.... "close" the spline.
    5. Click around Inside edge of track (to the inside track edge of each point helper) to create "inside" spline... "close" the spline.
    [Important to have spline 'knots' on both splines adjacent to each other]
    [same number of spline knots on each]
    [numbered spline knot on each spline directly across from same knot number on other spl (to the sides of same point helper)]
    6. "Attach" inside spline to outside spline... rename it "track".
    7. Go to Mod Panel.. apply a "Crossection" modifier over your pair of (attached) splines.
    8. Now apply a "Surface" modifier over the crossection modifier.
    9. Finally, apply an "Edit Poly" modifier at the top of the stack.
    [Adjust controls on Crossection Mod, and Surface Mod to get the desired number of polys at top of stack]
    10. "Collapse" the modifier stack (which leaves you with an epoly track surface).

    I used code to read the aiw file's "wp_width" coords to create my track edge splines, but you can do this manually (how I tested it before coding it).

    If you space the spline knots properly, and set crossection & surface mod controls correctly, you can get the optimal epoly distribution. Might take you a few test runs to get it working correctly... so before you attach the splines to each other, and start adding modifiers, clone / rename and hide copies of your track edge splines in case you need to try again to get it right.

    Process is a little time consuming (manually), but doable, and preserves the track's original banking.

    View attachment 17336
     
    Mauro likes this.
  6. Nuno Lourenço

    Nuno Lourenço Registered

    Joined:
    Oct 19, 2010
    Messages:
    582
    Likes Received:
    50
    Finally I can share with you the method that I used. It's not perfect but I think I works enought.

    Sorry about the poor english :p

     
    Mike Cantwell, Mauro and Seven Smiles like this.
  7. matf1

    matf1 Registered

    Joined:
    Dec 27, 2011
    Messages:
    671
    Likes Received:
    1
    Hey Nuno, Thanks a bunch mate!
    I've used quite a few of the methods detailed in this thread and on your video, but there was quite a bit more I've learned which is definitely going to help.

    Same from you Bink, I'm quite curious about some of your philosophies and how they compare.
     
  8. Mauro

    Mauro Registered

    Joined:
    Oct 14, 2011
    Messages:
    1,624
    Likes Received:
    2,325
    if it could be useful, Truttle (S397) wrote me this

    --------------------

    The sampling rate of physics, in rFactor 2, is much higher than that used for rFactor 1, this suggests (obliges) that the realroad meshes should keep up with this frequency, to avoid that there is too much space / time between one vertex and the next. From here the need to have more density in the model. Internal tests have shown that the ideal density ranges from 1x1m² to about 1.5x1.5m², possibly linear (without changes in density along the path).

    To do this on existing meshes you should first check the state of the mesh, to be sure that the operation is possible. In fact, if the mesh is already non-regular (already triangulated, non-linear, with a lot of vertical noise etc), it could be a task so burdensome to be even more complex than redoing the entire loft from scratch.

    If the mesh is clean, without too many density changes, etc., the most recommended practice is to apply a mesh smooth iteration (requires clean squares, not triangles!), To double density but vertically interpolating the missing data, so to obtain a smooth and not scaled surface (which is what would happen using a simple tessellation).

    If this operation should work, the rest to do would be to add all those vertices that are missing, at the edges of the ground, to then be able to weld to the new vertices added to the edges of the road. This operation is complex and cumbersome and requires a certain patience. From experience it can really be a task full of pitfalls and prone to errors of various kinds.


    Personally I would extrapolate three splines from the pre-existing road; left edge, center line, right edge.
    And with these three splines I would create a new mesh, scratch made, using a suitable density.
    Once the loft has been recreated, I would use the new left edges, and right edge, to create the new terrain edges (usually a couple of meters are enough), in order to get a new and perfect road + grass edges.
    At that point the work will be the retopoly necessary to reconnect the low poly interior terrain to the new grass edges, and then remap everything.
    The advantage of this approach lies in not going crazy with something pre-existing, which even at best, is very limited.
     
    Last edited: Mar 3, 2018
    Mulero likes this.

Share This Page