space928 / Blender-O3D-IO-Public

A plugin supporting blender 2.79.x-3.x.x for importing and exporting OMSI .sco, .cfg, and .o3d files
GNU General Public License v3.0
39 stars 5 forks source link

Spline gradients not tessellated properly #37

Open space928 opened 1 year ago

space928 commented 1 year ago

Describe the bug

The spline tessellation algorithm doesn't take into account the extra geometry needed to represent gradient changes (honestly I'm not even sure if gradients works correctly at all).

To Reproduce

Import any non curved spline which includes gradient changes

Expected behaviour

Geometry should be created as needed to represent the gradient

Additional context

This should just be a case of modifying the tessellation increment calculation to consider the gradient change: https://github.com/space928/Blender-O3D-IO-Public/blob/dd30231969ecf0acde33fa9f8598e22e364e5daa/o3d_io/io_omsi_spline.py#L67-L85

space928 commented 1 year ago

If someone could make a simple testing map with different splines with different gradients, cants, delta h, etc... that would be useful.

space928 commented 1 year ago

Coming soon...

Image