Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / 3D bezier curves?

Author
Message
Mugen Wizardry
User Banned
Posted: 2nd Jan 2011 14:30
Hi all, can someone show me a SMALL example of how to make a selected object follow a bezier curve path around a bunch of other objects?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Mugen Wizardry
User Banned
Posted: 2nd Jan 2011 16:04
perhaps a 3d sphere using an invisible bezier to go around 3d cubes?

i appreciate the help!

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 2nd Jan 2011 20:06
Search > Bezier gives
http://forum.thegamecreators.com/?m=forum_view&t=174735&b=6

It should be relatively easy to edit it a little to suit your needs.

Sven B

Mugen Wizardry
User Banned
Posted: 2nd Jan 2011 20:11
thanks, but i already saw this.

and that example is too hard to understand.

if i have a simple line curving around boxes, i should be able to understand it just fine

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Mugen Wizardry
User Banned
Posted: 2nd Jan 2011 20:43
even a function that allows to create multiple points in a bezier curve, and a function that allows the object to follow the bezier curve to each of its points would be fine

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 2nd Jan 2011 20:44
Quote: "example of how to make a selected object follow a bezier curve path around a bunch of other objects?"


Well, I think this is a little too specific to be made in a
Quote: "SMALL example"
. So I suggest you read through the the site: http://www.moshplant.com/direct-or/bezier/math.html. It describes the used formula's for a Bezier curve. In 3D, you just have to repeat the formula's for another dimension z(t).

x = a*t^3 + b*t^2 + c*t + d
y = a'*t^3 + b'*t^2 + c'*t + d'
z = a"*t^2 + b"*t^2 + c"*t + d"

Cheers!
Sven B

Mugen Wizardry
User Banned
Posted: 2nd Jan 2011 20:49
... there's not SOME kind of example that shows how to use a bezier create function and a function that allows for a selected object to follow the bezier curve?

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Mugen Wizardry
User Banned
Posted: 2nd Jan 2011 22:13
hi all. could someone please modify this so i can have a variable that tells it whether or not i see the bezier flight path of the camera?

if i can make an object follow the spline, then this problem will be solved



CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Mugen Wizardry
User Banned
Posted: 3rd Jan 2011 16:48
Anyone? :/

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Jan 2011 18:13 Edited at: 3rd Jan 2011 18:15
Mugen Wizardry, Sven has given you the answer. If you don't understand it then you will not be able to implement it. You need to spend some time studying the answers and techniques people give you; as you can see from the responses you get in your threads, you need to make some of the effort yourself.

Not so long a go I knew nothing about creating splines. So this is what I did...

1. Made a simple poly and tested
2. Made a simple spline and tested
3. Made multiple splines on a flat surface, pasted them together and tested.
4. made multiple splines in 3D and tested
5. Overlaid splines on a landscape and tested.

Never having done it before, I took it step by step until I had the full suite of required functionality.

See the YouTube video below to see each step - I saved all my tests so I can review and repeat whenever I need a spline. If you always get somebody else to write your code, you'll never make any progress!



Mugen Wizardry
User Banned
Posted: 3rd Jan 2011 19:20
thank you, but this makes no sense.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Jan 2011 20:48
Quote: "thank you, but this makes no sense."


which is why I said:

Quote: "If you don't understand it then you will not be able to implement it. You need to spend some time studying the answers and techniques people give you"


Mugen Wizardry
User Banned
Posted: 3rd Jan 2011 20:52
i'll just use waypoints.

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 4th Jan 2011 16:50
Woah, batvink, i found that pretty impressive!

Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 4th Jan 2011 17:10 Edited at: 4th Jan 2011 17:10
Mugen Wizardry, you need to stop for a second and try to figure it out. Go research the topic, TRY to get an understanding of it, and TRY to implement it. It's a lot better to say:

I made this bla bla bla attempt to create bla bla bla.
This is my current code.
I wrote it based on the following steps bla bla bla.
Could someone tell me where I went wrong?


This approach will get you answers and get you to learn at the same time instead of "Please write me a full working example."

My computer surpasses all the technologies of the day. What computer do I have?

C0wbox
20
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 4th Jan 2011 21:12
http://forum.thegamecreators.com/?m=forum_view&t=179856&b=1
An example of a decent thread in DBP section where everyone helped and we got to a solution.

And we all got a proper thanks at the end.

...another lesson for Mugen Wizardry to learn...

Login to post a reply

Server time is: 2026-07-19 01:26:21
Your offset time is: 2026-07-19 01:26:21