Questions tagged [splines]
A spline is a sufficiently smooth polynomial function that is piecewise-defined, and possesses a high degree of smoothness at the places where the polynomial pieces connect.
47 questions
0
votes
1
answer
24
views
Computing camera attitude so points along/follows spline
Assuming I have a spline that I want a camera to follow, is there a simple way to compute the orientation of the camera such that its optical center aligns with the vector defining the derivative of ...
0
votes
0
answers
81
views
How to make intersections between road splines at runtime in Unreal Engine 5?
I’m working on a project like the game Cities: Skylines. I’ve been developing a spline-based road system and it successfully creates street curves at runtime. The current problem is how to model ...
0
votes
0
answers
67
views
Implementing Intersection Logic and Mesh Construction for Procedural Spline-Based Roads in Unity
I’m currently working on a project in Unity where I’m creating procedural roads based on splines. At present, the roads are implemented by extruding a 2D shape along a spline or a straight line, ...
0
votes
0
answers
88
views
How to fix UVs of spline tunnel/cylinder mesh?
I have created a tunnel using unity's spline tool. And I'm creating a custom shader for it in shader graph, and I would like to add bumps inside of the tunnel. The problem is in how the UVs, vertices ...
0
votes
0
answers
32
views
Getting 3D slide direction
I am trying to make my player slide down a curve (like a water slide) and so far I’ve managed to get the slide direction using the following code
...
0
votes
3
answers
355
views
Simulate Velocity For A Projectile Moving Along A Spline
I'm using Unity's latest Splines package(v2.5) to move a projectile across a spline with speed. It works perfectly and the projectile moves across the spline to it's target with linear speed.
But I'd ...
0
votes
0
answers
611
views
How to combine 2 splines from different spline container in unity spline 2.3.0?
I'm working on with Unity Spline 2.3.0, I realize that the splines cannot be touch and combine with other splines that exits in different spline container.
Is there any way to connect them?
I tried to ...
0
votes
0
answers
73
views
How to change the locomotive status from moving in a spline to moving in the next spline when it meets the next rail?
I want to make a train that can move in a curve. I have downloaded a Train Spline Walker unity package.
That package can generate a spline, and the train's locomotive will move in the spline with a ...
1
vote
2
answers
2k
views
Unity Spline Animate reset the position when change the speed
I am exploring the Unity Spline package, and within the package, there is a sample scene called 'splineAnimate' where the SplineAnimate script is used to move an object along a spline. The script has ...
2
votes
0
answers
248
views
Can the Unity Splines package be used to define a region on the XZ plane?
Typically when I want to define an irregularly-shaped "area" in my 3D game (e.g. for events to trigger), I'll compose it using various 3D colliders and treat them as a group.
Something that ...
1
vote
1
answer
60
views
How to insert a new control point on 3D cubic Bézier spline, without deforming current shape?
I have a spline generation system using a cubic Bézier algorithm.
I created a tool that splits the spline and adds a new point where the user clicked on the spline,
but it causes the spline to deform ...
0
votes
0
answers
58
views
List<Vector3> of line segments (start, end position) from jointed CapsuleCollider chain
What I'm trying to do
I'm trying to create a list of positions which I can use to define a centripetal catmull–rom spline; however I can't think of a solution for creating the list of positions which ...
0
votes
0
answers
464
views
Performant way to generate a cylindrical mesh along a dynamic spline
I am working on a mobile game, in which I am tiling a cylindrical mesh along a dynamic spline. The points of the spline are changing each frame, so the vertex positions and normals of the tiled mesh ...
0
votes
0
answers
39
views
Rear Propulsion Steering Spline, or what is this called?
What I am looking for is essentially to know what this is, or what I can google to learn how to do it... unless of course the solution is simple.
You have an object at the start position facing a ...
0
votes
2
answers
316
views
Why do computer graphics applications use piecewise polynomial curves of degree 3 rather than curves of higher-order, say degree 100?
just wondering why is that? can't get my head around it. wouldn't the use of degree 100 be better? I'm really new to this stuff.
0
votes
0
answers
419
views
How to create a 2d procedural spline based road with 2 edge colliders?
I am trying to make a top down 2d spline-based road that is procedurally generated and endless. The aim is that the player starts inside the road and has to navigate the road and if he touches any of ...
1
vote
1
answer
7k
views
What are spline input keys?
There isn't a really adequate explanation of these anywhere on the internet, so I thought I'd ask this question here.
What are spline input keys in Unreal?
How are they represented in Unreal?
Also:
...
0
votes
1
answer
504
views
Higher order splines for use with pathfinding
In this page, Amit explains that splines can be used to achieve movement on a found path.
In the picture below, he explains that:
The blue paths use splines, with dark blue being low order ...
1
vote
1
answer
996
views
How to draw a diagonal sine wave line renderer
I'm trying to use a LineRenderer component to draw a sine wave from point A to B and I'm using mouse position. However what I did so far is not working as expected, ...
1
vote
1
answer
517
views
How can I make a spline that does not overshoot?
I have a list of line segments that run through a track model and I am looking to achieve two things:
smooth the overall shape of the path
being able to evaluate a position by querying from ...
1
vote
1
answer
2k
views
High-level advice on procedural river (Unity3D) [closed]
I'm working on some procedural content for Unity3D - in C#
My main aim is to build a flat plane (or maybe later a terrain / mesh), with a single river running through it, based on a seed value.
I ...
0
votes
1
answer
44
views
The difference between shading and data interpolation
Using methods like Phong you can make mesh look smooth and real. However you can do the same interpolation at the data level creating a surface (for example B-Spline surface).
What is the difference ...
2
votes
2
answers
4k
views
Parametric form of a cubic function
After researching about curves in computer graphics (splines in my case), I have come across something I did not know: Explicit functions like: \$y=x^2+2\$ are not the best way to interpolate between ...
2
votes
3
answers
1k
views
Why aren't regular quadratic and cubic splines used much in games?
After investigating a bit about splines and reading a bunch of docs, I have noticed regular quadratic and cubic splines are not used very much in games.
Splines using quadratic/cubic Bézier curves, ...
5
votes
1
answer
3k
views
How do splines work?
I've been beginning to work with different kinds of splines (e.g. Bezier, Hermite, B-splines) in some of my work with computer graphics and I am trying to get a grasp of how they work (mathematically ...
0
votes
1
answer
77
views
Spline type to achieve a specific result
Is there a type of spline which can produce (approximately) the following result given the specified points indicated. I want to be able to specify how curved the corners are from the "centre points" ...
1
vote
1
answer
548
views
What is next to interpolate camera position with smooth speed changes?
I am working on a path camera to be used in demo playback. (3d game) The spline math used is catmull rom. I am on my second attempt to get constant position speed :( (someone else is doing rotation). ...
2
votes
1
answer
266
views
Determine if AI can traverse a given spline
I have some AI Agents that I want to navigate along a spline. The agents have a speed and a maximum turning radius. For some splines the curvature is too tight for the AI agents to navigate around and ...
2
votes
3
answers
391
views
How can I constrain motion to a path formed from multiple splines?
I want to develop a system to constraint a character movement to a certain path, defined a-priori by the level designer to give some sort of 2D/2.5D look.
Right now I have a list of splines that make ...
1
vote
1
answer
2k
views
Constraining Movement to Path/Splines
First of all take a quick look at this :
https://www.youtube.com/watch?v=LQtKP-EymFM
So this is to give a idea of what I mean by following a path, basicly I am trying to understand how something ...
9
votes
1
answer
5k
views
How can I find the tangent and normal at an interpolated point on a Catmull-Rom/Hermite spline?
I have an implementation of a simple Catmull-Rom spline. It works, but I'm trying my hardest to be able to place vertices at extrusions along the curve. For this I need the normal (and tangent in the ...
3
votes
1
answer
2k
views
How to follow object on CatmullRomSplines at constant speed (e.g. train and train carriage)?
I have a CatmullRomSpline, and using the very good example at https://github.com/libgdx/libgdx/wiki/Path-interface-%26-Splines I have my object moving at an even pace over the spline.
Using a simple ...
4
votes
1
answer
3k
views
How can I make a spline out of three points that define a circular arc?
I was looking at the descriptions of various curve techniques here and noticed the mention of circular arcs. I want to implement something like this, but I'm not quite sure what the correct formula to ...
8
votes
1
answer
13k
views
How can I create or extrude a mesh along a spline?
Let's say, for example, that I have a working spline. I want to use this spline to create a mesh, but I'm not quite sure how to go about it. For example, I want to create a road along this spline. I ...
1
vote
2
answers
413
views
Compute world position by walking N units along spline?
My goal is to move ahead along a spline 'x' world units, unfortunately there is no way to map spline points to world points.
What I do is I iterate along the spline by a small alpha amount (say 0.001)...
10
votes
2
answers
3k
views
How do I avoid interpolation artefacts when scaling up a heightmap?
I am using a bicubic interpolation algorithm in order to upscale a height map, and I am noticing some artifacts around the pixels boundaries. However, these artifacts don't seem to appear when I use a ...
-1
votes
1
answer
329
views
Animating values using splines
I'm trying to create a system similar to Blender's f-curves or Unity's animation curves (google it, I'm not allowed to post more than two links yet). It's basically a 2D spline where time is on the X-...
2
votes
3
answers
10k
views
How to unify vertices in 3ds max?
I want two vertices of editable spline become one. Neither fuse, nor weld helps: vertices remain separate.
Here is a video: ...
1
vote
4
answers
833
views
Is there a game not using meshes for models? [closed]
Traditionally, models consist of lots of vertices connected by triangles. That forces the use of a high amount of vertices for detailed organic shapes or makes models kind of blocky. Even though ...
3
votes
2
answers
4k
views
How to remove bezier handle in 3dsmax?
While editing spline, I need to make one of the vertexes to be an absolute corner. I.e. bezier control points should be in zero distance from the vertex.
How to do that?
2
votes
3
answers
2k
views
Tessellating to a curve?
I'm creating a game engine, and I'm trying to define a 3D model format I want to use. I haven't come across a format that quite does what I want.
My game engine assumes a shader model 5+ environment. ...
1
vote
2
answers
1k
views
Find the nearest control points either side of a Catmull Rom spline segment
There is a formula for evaluating a Catmull Rom spline segment at time 't' found here.
The problem with this is that it requires finding the two control points either side of the segment to evaluate.
...
1
vote
1
answer
4k
views
Interpolation between two 3D points?
I'm working with some splines which define a path a character follows (you can see a gameplay video here to get a better understanding of what's going on: http://www.youtube.com/watch?v=BndobjOiZ6g). ...
11
votes
5
answers
4k
views
How would one determine the length of a path?
I have a game that requires each player to move along one specified path. I draw the path using Bézier curves. How can I determine the total real (not linear) length of the path and the distance that ...
21
votes
1
answer
10k
views
Determine arc-length of a Catmull-Rom spline to move at a constant speed
I have a path that is defined by a concatenation of Catmull-Rom splines. I use the static method Vector2.CatmullRom in XNA that allows for interpolation between points with a value going from 0 to 1.
...
11
votes
2
answers
669
views
How to avoid self-intersection when applying stroke to a curve?
I have several Spline2D objects in my code, each of which has a Position, Velocity, and Acceleration method that returns a vector of the specified quantity at a particular time. I've been using these ...
12
votes
3
answers
4k
views
What are the most common splines you will find in game development?
List here the most common splines found in game development, how many points the method needs to interpolate a curve, and how can you build a data type that allows you to get an interpolation of the ...