Mesh distortion

Post your own tutorials, guides and demos.

Post » Thu Aug 28, 2008 8:01 pm

Arima: Yes, the "spine" is a bezier curve, and bezier curves can have many control points, however, there is seldom more than two besides of the starting and ending point, because that takes a lot of computing power (well, it's not noticeable with just one curve, but if you have a CAD program with thousands of them)... However, you could append many curves to a spline. I'll make a curve with two control points and then check if I can make a spline.

Well. I got carried away and did this meanwhile. Now I made a mesh, whose every corner is movable and every side is modifiable by one control point.

Note the last event! At first it was like this, and FPS was like shit:

[code:kjeaaxe1]System: 3 For each Point 0
System: 3 For each CurveR 0
System: 3 For each CurveL 0
Point: 8 Value 'a' Equal to CurveR 0 .Value('a')
Point: 8 Value 'a' Equal to CurveL0 .Value('a')
> Actions...
[/code:kjeaaxe1]

Then I changed it to this, and FPS magically jumped to ~70, as the number of processed loops reduced:

[code:kjeaaxe1]System: 3 For each Point 0
System: 3 For each CurveR 0
Point: 8 Value 'a' Equal to CurveR 0 .Value('a')
System: 3 For each CurveL 0
Point: 8 Value 'a' Equal to CurveL 0 .Value('a')
> Actions...

[/code:kjeaaxe1]

With one spline (and double nested loop), the FPS was ~130. So, triple nested loops really challenge the CPU :D
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Thu Aug 28, 2008 9:06 pm

Made bezier curve with two control points. Apparently, the "System: 3 For each Point 0 " loop was unnecessary, so it removed, spine2.cap runs at 144FPS and this spine3.cap runs at 270FPS.
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Thu Aug 28, 2008 9:55 pm

[quote="Drasa":1o23ng8y]Hey! I got this idea from that Aquaria trailer and Arimas post about bones! I used a bezier as a "spine" for the mesh. I think that this effect is very useful for, trees waving in wind, tentacles, springs and such. What do you think?[/quote:1o23ng8y]

That's way cool

[quote="David":1o23ng8y]Heres what happens if you give the particles a physics movement, then apply springs between the particles, and then render a mesh to where those particles are :P[/quote:1o23ng8y]

Whoa :shock:

This thread is amazing. You just invented the blob I was trying to make a while ago, except square. And meaty. Will you share the source for this when the mesh object is released?

Edit:
I meant to post about this before, but now is as good a time as any I guess. When dragging the window, the physics breaks. It's like it's adding force to all objects or something. When I do it on the meat cubes, they collapse and fold all over themselves.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Aug 28, 2008 10:26 pm

WOW! Many impressive things here!
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Thu Aug 28, 2008 10:52 pm

Thanks Drasa! That's exactly what I wanted! :)

And it definitely runs better - I even can get 85fps on my p3 600!
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Thu Aug 28, 2008 10:53 pm

Wow, impressive stuff:D You should rename this thread to; The mad scientists club :)
B
33
S
15
G
6
Posts: 242
Reputation: 4,343

Post » Fri Aug 29, 2008 10:37 am

http://www.fileshack.us/get_file.php?id ... =bendy.zip

That beizer curve thing but now with the mesh over the top!
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Fri Aug 29, 2008 11:25 am

Looks like I got to the party late! This thing is brilliant, I can think of so many uses already. I always wondered if this kinda thing was possible, with the sprites being drawn on flat planes.
David, those squidgy blocks especially, they rule so much! And look kinda disgusting.
B
2
S
2
G
5
Posts: 156
Reputation: 1,962

Post » Fri Aug 29, 2008 12:46 pm

[quote="AsparagusTrevor":36brx83z]those squidgy blocks especially, they rule so much! And look kinda disgusting.[/quote:36brx83z]

scirra.com: meat squares in motion
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Aug 29, 2008 2:45 pm

[quote="David":19gv32kk]http://www.fileshack.us/get_file.php?id=979042&file=bendy.zip

That beizer curve thing but now with the mesh over the top![/quote:19gv32kk]

Yay! Btw, when does the new build come out? It has been already nearly month since last build. Does it also have the Plasma object?

Ashley: Thanks a lot for the lerp() function! My head would have already exploded with that cubic bezier without that linear interpolation function ;). Maybe you could still add qarp() (quadratic interpolation: lerp(lerp(A, B, x), lerp(B, C, x), x), that's useful for smooth curves. People could make smoothly curving paths etc. without math.
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

PreviousNext

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest