Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Force spline normal to be always world up
#8
(08-03-2022, 01:33 PM)_Aka_ Wrote: Hi

Thanks for your patience.

In the following post, I assume that you read the Orientation documentation (that you can find in the link I post earlier https://curvyeditor.com/documentation/splines/curvyspline?redirect=1#orientation) and that you are familiar with the concept of Orientation Anchor.

I will divide my answer into two, one about the normals being towards the world up vector, and the second regarding UVs.

1- The normals

The normals (also called orientation) are defined as being perpendicular to the spline's tangents. If the spline tangents are not all restricted to the XZ plane, then the normals could not be all equal to the world Up vector (0,0,1). If this previous sentence is clear to you, then you can skip to section 2, otherwise, here is an illustrated explanation:

In the following screenshot, I modified your spline. I did not change it's shape, only its normals, by setting the spline orientation type to Dynamic, setting all the Control Points (CPs) as Orientation Anchors, and rotating the CPs until I got the following result:

In green are the spline tangents. In yellow the normals. The long yellow lines are the normals of the orientation anchors.
As you can see, all the the normals are perpendicular to the tangents, which is what they are supposed to be.

I can rotate the middle CP to have it's normal equal to the world up vector, but that can be done only locally (around the middle CP). The shape of the spline makes it impossible to do for all the points of the spline while keeping the normals perpendicular to the tangents.


If you want the normals to be equal to the world up vector through the whole spline, then you need to change the shape of your spline, by setting all the CPs Y coordinate to the same value.


2- The UVs

The meshes created via the Shape Extrusion module have their UVs orientated the same way as the surface is, which in turn depends on the path spline's normals. There are no options to rotate the UVs independently from the surface's shape. There are only options to offset, scale, swap, and change the aspect ratio of the UVs.
https://curvyeditor.com/documentation/ge...#materials

Did I answer all your question?
Have a nice day

Thank you for the detailed explanation. It made me realize that my terminologies are incorrect. Let me explain what I am looking for again:

Assuming in local coordinates of each point in the spline. Up/down/y is the point's normal, left/right/x is the spline's cross direction, and forward/backward/z is the direction in which the spline is going towards, I am looking to make sure that the local x value is 0 is all the spline's normals. Having a non-zero local x component makes the generated mesh "tilt"

Have a nice day too!
Reply


Messages In This Thread
RE: Force spline normal to be always world up - by GameJazz - 08-03-2022, 06:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting Distance from a World Point zorksox 3 5 04-16-2024, 07:30 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: