# Splines in daEditor ```{seealso} For more information, see [spline.blk](../../assets/all-about-blk/spline_blk.md). ``` ## Splines and Rendinsts - **Removing Rendinsts Along the Spline** Splines can remove both rendinsts generated at runtime (from masks and scripts) and those saved in the level (generated via splines). To remove rendinsts generated by masks or scripts, use the parameters in the spline class: - `sweepWidth:r=`: distance from the center of the spline to the end of the "cleared area". - `addFuzzySweepHalfWidth:r=`: distance from the center of the spline to the end of the sparse space, used to create irregular edges. To remove rendinsts generated along splines, use: - `sweep2Width:r=` - `addFuzzySweep2HalfWidth:r=` - Additionally, `startPadding:r=` and `endPadding:r=` define a distance from the start and end of the spline where objects are not generated (useful for roads that lead into bridges). To split spline-generated assets into separate entities, use the command **Landscape > Instantiate gen. objects into separate entities**. - **Rendering Along a Loft Instead of a Perfect Spline** To generate instances along a loft, accounting for its curves and twists, enable: - `storeSegsForGen:b=yes` in the loft generation block. - `useLoftSegs:b=yes` either in the object generation block (for a specific object) or anywhere after the loft definition (for all objects). - **Splines as Modifiers** Splines can act as modifiers for heightmaps or land meshes (delanoy). ## Sorting Order of Lofts in the Clipmap During Rendering - **Order of Spline Classes** This order is set in the [daEditor](./daeditor/daeditor.md) (using the **place layer order** switch) or in the `splines.blk` of a specific location (via `layerOrder:i=` with values ranging from `0` to `2`). The higher the value, the higher the spline sits in the rendering layer. This also applies to decals. The priority of splines is higher than that of lofts. To place a decal above a spline, add `script:t="layerOrder=n"` to the decal where `n` is the desired layer. - **Order of Loft Rendering** Each loft within a spline has a rendering order defined by `loftLayerOrder:i=`. The higher the number, the higher the loft appears in the rendering stack. By default, all lofts are at layer 0. - **Decals Above Splines** To render decals on top of all splines, check if the box in **Exported Parameters > Geom: render loft below all** is checked in the [daEditor](./daeditor/daeditor.md). ## Additional Notes - **Straight Segments** When creating a spline, holding `Shift` forces the spline to consist of straight segments instead of curves (each node switches to corner mode). - **Tight Fence Orientation** To make objects placed along a spline form a continuous chain, add `tightFenceOrient:b="yes"` in the spline class (within the `objGenerate{}` block). ## Asset Orientation Types in the Spline Class - `orientation:t="fence_normal"` - `orientation:t="fence"` - `orientation:t="normal"` - `orientation:t="spline"`: assets are aligned parallel to the spline - `orientation:t="spline_up"` - `orientation:t="world"` - `orientation:t="world_xz"` - `orientation:t="normal_xz"` ## Additional Parameter - `zeroOpacityDistAtEnds:r=2`: this parameter sets zero opacity at the spline's end vertices (distance in meters). It is applied at the root of the spline.