Jump to content
  • Advertisement
Sign in to follow this  
SpreeTree

Orientation Verts in a Given Direction

This topic is 4480 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm hoping I can explain this clearly... I have made a circle, of points, which have noise applied to them making the circle a bit more random and 'wobbly'. I want to build a tunnel around this line, in effect creating a tube which constantly loops. What I have a problem with is orientating the points, so they follow the direction of the line. The spline is made up of a collection of points, and each of these points have a direction pointing towards the next point. I then create a circle of verts around each point, all orientated around the X axis. Obviously, if I use these verts, the tube will not 'flow' around, rather the tube will be rather static, and un-fitted. I want to orientate the circle of verts so they direction of the vert circle faces the direction of current point, thus making the tube flow. I tried translating the direction of the point into a rotation matrix, then applying this rotation matrix to each vert point, but the results seemed a bit erratic. Hopfully, I have explained my problem clearly, and someone has an answer Thanks Spree

Share this post


Link to post
Share on other sites
Advertisement
Could you post an example of one set of vertices?

Kuphryn

[Edited by - kuphryn on March 13, 2006 6:42:01 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by SpreeTree
I'm hoping I can explain this clearly...

I have made a circle, of points, which have noise applied to them making the circle a bit more random and 'wobbly'.

I want to build a tunnel around this line, in effect creating a tube which constantly loops.

What I have a problem with is orientating the points, so they follow the direction of the line. The spline is made up of a collection of points, and each of these points have a direction pointing towards the next point.

I then create a circle of verts around each point, all orientated around the X axis. Obviously, if I use these verts, the tube will not 'flow' around, rather the tube will be rather static, and un-fitted.

I want to orientate the circle of verts so they direction of the vert circle faces the direction of current point, thus making the tube flow.

I tried translating the direction of the point into a rotation matrix, then applying this rotation matrix to each vert point, but the results seemed a bit erratic.

Hopfully, I have explained my problem clearly, and someone has an answer

Thanks
Spree
Check out this article, or the 'parallel transport frame' article in GPG. If your curve can follow any path, you'll probably want the PTF or something similar. If the tube has to connect to itself at the end, you'll have to do a little extra work to connect the first and last circles, as they're unlikely to line up correctly.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!