Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Imhotep), 567 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Creating wind... [Re: myrlyn68] #17276
09/24/03 21:49
09/24/03 21:49
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline OP

Senior Expert
Orange Brat  Offline OP

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
See below for latest iteration...it'll be the last since I've taken it as far as I can.

Quote:

In regards to the method above, don't forget using bones for more rigid bodies (the lantern in your physics example). It would require a bit more code, but should provide a nice effect.






The lantern is a map entity so it wouldn't have any bones anyway. I was going to have to figure out how to apply this "hack" to the physics force instructions....it would just involve doing some comparisons with values and if certain conditions were met then it does something.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Creating wind... [Re: Orange Brat] #17277
09/25/03 15:11
09/25/03 15:11
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline OP

Senior Expert
Orange Brat  Offline OP

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
Code to return, in User Contributions, when it's finished!


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Creating wind... [Re: Orange Brat] #17278
09/25/03 22:12
09/25/03 22:12
Joined: Feb 2003
Posts: 2,826
Margaritaville (Redneck Rivier...
myrlyn68 Offline
Senior Expert
myrlyn68  Offline
Senior Expert

Joined: Feb 2003
Posts: 2,826
Margaritaville (Redneck Rivier...
Currently without some pretty major changes to the way the code handles the trees (or other objects), or the 3DGS model format - it will not work straight away.

The biggest problem which I am running across is storing a relative value for the vertex movement based on a constraint which is determined by it's distance from the ground. While it is not impossible to have the vertex positions stored in an array and assign values like the weighting system used in that code, it seems to be a bit more difficult then what I initially anticipated.

As soon as I finish up a couple other projects I am working on, I'm going to see about rewriting the handling procedures to see if I can't get something to work a bit better. The code for generating the force (wind) itself seems to work fine when implemented in a level though.


Virtual Worlds - Rebuilding the Universe one Pixel at a Time. Take a look - daily news and weekly content updates.
Re: Creating wind... [Re: Orange Brat] #17279
09/26/03 00:43
09/26/03 00:43
Joined: Oct 2002
Posts: 471
USA - Tennessee
JayG Offline
Senior Member
JayG  Offline
Senior Member

Joined: Oct 2002
Posts: 471
USA - Tennessee
This looks like some nice work..

just a few comments

why not use vec_lerp in c-script to replace the D3DXVec2Lerp(w_CurrentDirection, w_CurrentDirection, w_DirectionGoal, w_DirectionChangePct);


I don't know I saw the lerp and thought it might help.


You are correct about

w_strWindInfo.Format("Wind speed %.2f Dir %s", w_CurrentSpeed,GetWindDirectionString(degrees));


It is formating the data (Current Speend and WindDirection)into a string representation and will be saved in w_strWindInfo.




Re: Creating wind... [Re: JayG] #17280
09/26/03 05:58
09/26/03 05:58
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline OP

Senior Expert
Orange Brat  Offline OP

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
Quote:

why not use vec_lerp in c-script to replace the D3DXVec2Lerp




Because I didn't realize it was a new feature. Thanks for the heads up.

@mrylyn68:

I'm glad to hear the wind force is actually working for you...I finally got it working, since discovering a careless error("==" was being used instead of a "=" in one line).

I changed the "fatan" to a "ftan", near the bottom of "wind()" and changed the "*" to a "/" in the f_Degrees function(made a couple of checks there, too). After doing this, the cardinal directions shift indicator seems to work, though I have no idea if it is accurate, though I think it is. This is a slightly different way that the original, but that version did not work at all.

Anyway, if you have any luck with the vertex movement, keep us posted, and see above for my semi-final script(unless you have any suggestions/contributions for improvement) and revised explanations/bugs/etc.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Creating wind... [Re: Orange Brat] #17281
09/28/03 10:43
09/28/03 10:43
Joined: Apr 2003
Posts: 334
Canada, west coast
M
MarkMcFear Offline
Senior Member
MarkMcFear  Offline
Senior Member
M

Joined: Apr 2003
Posts: 334
Canada, west coast
First off, wow nice stuff you guys.

Second off, am I to understand that potentially a person could animate their environmental models (leaves, trees, clumps of grass etc.) and use the wind direction from this function to actually animate the models during gameplay to accomplish a direcitonal "wind force" in the animations? That would certainly add a seriously unique touch to alot of games.

I wish you guys luck in this. I'll definitely stay tuned.

Mark



Mark McFear Aakrana: The Forgotten Lands "It's your world now!"
Re: Creating wind... [Re: MarkMcFear] #17282
09/28/03 10:56
09/28/03 10:56
Joined: Feb 2003
Posts: 2,826
Margaritaville (Redneck Rivier...
myrlyn68 Offline
Senior Expert
myrlyn68  Offline
Senior Expert

Joined: Feb 2003
Posts: 2,826
Margaritaville (Redneck Rivier...
Yes, you could potentially apply a "wind force" to everything in your game, granted your game would tick along at a smooth 2 or 3 FPS.

Like any physics calculations, they tend to get pretty intensive the more of them you run. While this is pretty mild as far as the processor requirements go, when you begin applying it to everything - it adds up quickly.

It isn't really that unique anymore though. Most games that can afford the CPU time have wind effects now, and if you really wanted to get crazy you can add the effects to various character model parts to have them move with the wind (hair, capes).


Virtual Worlds - Rebuilding the Universe one Pixel at a Time. Take a look - daily news and weekly content updates.
Re: Creating wind... [Re: MarkMcFear] #17283
09/28/03 11:10
09/28/03 11:10
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline OP

Senior Expert
Orange Brat  Offline OP

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
@MarkMcFear:

It would probably be best to use it in moderation...if we all had 5 GHz Pentium VI PCs you might be able to get away with everything Perhaps a mixture of some objects that move via wind effects(to add the random touch) and models with looping animations would work best. Anyway, I'm still hammering away at it, so what is above will change a bit, most likely. Check back since I won't post a new reply..I'll just edit the code above.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Creating wind... [Re: Orange Brat] #17284
09/28/03 11:19
09/28/03 11:19
Joined: Apr 2003
Posts: 334
Canada, west coast
M
MarkMcFear Offline
Senior Member
MarkMcFear  Offline
Senior Member
M

Joined: Apr 2003
Posts: 334
Canada, west coast
Heh yes, everything in moderation I guess what I am most excited about is teh possibility to put in random grass clumps that "wave" in the wind. These clumps would all be client side generated and the wind process would jsut be client side fluff. It oculd be turned off or on to boost performance or reality and would really add a touch of eye candy to my somewhat bland attempts at level creation.

My current screenshots for the game are pretty old now. I'm working the first "zone" which I am using in the video trailer next month. I've got some actual 3D modeled grass MDLs that I would love to try this with. I'm buried knee deep in an inventory re-write at the moment so I really can't attack this at the moment.

Still, you guys are really making some great strides in tapping the potential of the 3DGS engine. I'll stay tuned =)

Mark



Mark McFear Aakrana: The Forgotten Lands "It's your world now!"
Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1