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.

Code Snippets / Flag effect! And the animation can be stored and reused

Author
Message
kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 18th Apr 2003 20:48
This works a bit similar to the rope effect, only this uses different forces. I made a fractal noise array to represent pressure and scrolled that along the flag to simulate forces.
Anywayz, it simulates the movement of a flag in the wind. A nice feature is that this effect can be precalculated. The effect is stored in an array, so you can save it and use it in a game later. This animation is also made seamless, so you can repeat it. If anyone wants to use this in a game, you can ask me to help with implementing.
There are many settings you can play with (you can change all the variables).
Just check it out. I hope you like it.

BTW, it only works in DB (sorry )

http://www.realgametools.net/forums/attachments/flag.zip

Kevil
AlphaOmega
21
Years of Service
User Offline
Joined: 19th Apr 2003
Location: Netherlands
Posted: 19th Apr 2003 13:39
That loading stuff....
It takes too much time [b])

kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 19th Apr 2003 15:51
Yea, but it only has to be done once. When it's loading, it's actually running the simulation and storing that in an array. I could've run the simulation in real time, but then there would be no way to use this in a game. Now I store this animation in an array and then you can use it in a game. So don't think you would have to wait that long after you done it once.

Kevil

CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 19th Apr 2003 20:06
thats nice, I don't guess you have an example of dragging a mouse though water and creating a ripple effect, I'm having trouble figuring it out.

kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 20th Apr 2003 00:55
Not really . I could try it though, but I think it would be very slow. I'll see if I get the time, but I think I will be very busy playing games tomorrow when the results for the retro compo are ready .

Kevil

CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 20th Apr 2003 01:23
oh, that's tomarrow. Can't wait to see the best of the best.

kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 20th Apr 2003 02:19
I tried it. As I thought it was a bit slow.
It's made in DB, I don't know if it works in DBP too.

Kevil

Kensupen
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: United States
Posted: 20th Apr 2003 05:29
I was thinking of making a few 3D flags in Milkshape and animating them, but never got around to it. Does this effect use a matrix for the flag? If so, them how could you use it in a game? I didn't think you can rotate a matrix so that it's only on the X/Y or Y/Z plane.

-Kensupen
Armeggadon
21
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 21st Apr 2003 03:31
well it might be able to make a matrix that randomizes in a fashion to look like a flag waving and then look at it top down and merge it with another matrix. it would be somewhat difficult though i think(but i dont know im still learning)

Current Status: Learning DBPro

I consider myself: ULTRA NEWB!!!!!!!!!!!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Apr 2003 15:21
Cinema 4D will allow you to create an animated flag using the Wind parameters on a plain, if you wanted a pre-animated version.

V 5SE (free on mags every now and then) includes this feature.

Thanks in advance.
All the Best,
StevieVee
kevil
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Netherlands
Posted: 21st Apr 2003 17:25
You're right, it can't be used as a matrix. But if someone with DBPro and memblocks knowledge could convert this so it works on an object than it could be used.

And I know you could do this with some 3d packages, but I wanted to do this myself

Kevil

Login to post a reply

Server time is: 2024-11-24 05:07:09
Your offset time is: 2024-11-24 05:07:09