Jump to content
Sign in to follow this  
Gen.Carnage

Rotor downwash effects for all bis choppers

Recommended Posts

Guest jacobaby

Well, after a LOT (18+hours) of head scratching, I have come up with a way to detect whether you are flying over water or not, and it shouldnt matter what the tide level is. smile.gif

I think. I hope. Initial tests seem encouraging, and I have put togther a kwik vidcap of it in action. Sorry for the bad quality of the capture, I only had time to film it and save it......

Bright colours used to distinguish the switch over.

http://www.btinternet.com/~mr.squeegee/Missions/tide.mpg

The only kicker is that it uses a floating object (boatw) set at 0,0. confused.gif

Anyway, heres the mission,

http://www.btinternet.com/~mr.squeegee/Missions/helidust.zip

I could use a few others trying it out. It is basically BigPoppas script, with my extra lines in.

As I say, Maths isnt my good point, so if you have an improvement again, post it here or mail it to me

boanerges@clara.co.uk

When its good I can whack it into my script as well.

TJ

Share this post


Link to post
Share on other sites

i took a look at it, and correct me if i'm wrong, but i learned in my 'informatica' study (don't know the english translation)

that for making fast programs you should at all times avoid the use of cos, sin and tan calculations.

This is probably why the build up of the circle is noticeable, computers just dont 'like' using these instructions).

you can test this by creating a simple program in whichever language, doing this: set a timer, calclulate 1.236544884+0.8954652154245 a couple of million times, and read what the timer says. now change the second number into sin(2.57415) and measure the time again. you will notice a dramatic increase in cpu time. (all numbers are random numpad keystrokes smile.gif

At the cost of flexibility, but gain in performance, i would recommend going the 'oldfashioned' way and write out all the lines for the cloudlets.

the idea of measuring the height relative to a dropped object is a very good one, as allways, the power lies in simplicity.

Another suggestion: try messing around with "SpaceObject" instead of "billboard"... it creates a strange misty haze - like cloud, when placed strategically it might give it the extra touch of 'realism' we want without hard mathematical formulas. (which slow down cpu's)

keep at it, i'll try to place helpful comments where i can.

I hope we can beat this enormeous OFP flaw once and for all.

Share this post


Link to post
Share on other sites
Guest jacobaby

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Gen.Carnage @ Jan. 22 2003,02:50)</td></tr><tr><td id="QUOTE">At the cost of flexibility, but gain in performance,  i would recommend going the 'oldfashioned' way and write out all the lines for the cloudlets.

Another suggestion: try messing around with  "SpaceObject" instead of "billboard"... it creates a strange misty haze - like cloud, when placed strategically it might give it the extra touch of 'realism' we want without hard mathematical formulas. (which slow down cpu's)

keep at it, i'll try to place helpful comments where i can.

I hope we can beat this enormeous OFP flaw once and for all.<span id='postcolor'>

My script does use seperate drops. Bigpoppas has a fairly clever use of a loop which will execute the max number of times before resetting without causing infinite loop errors. If you do get a sudden surge of CPU activity though you do get a pause, which then causes you to see the swirl again. In the mpg I had much altered the size of the particles, which made it look worse than it really is.

Im not too sure whether todays PC's have the right to grumble about a sin or cos calculation though :o)

As regards Spaceobject, the trouble is that is is 2d, on a flat plane, but I have used it in the past for certain effects (like falling leaves simulation etc)

Thanks for the comments. Nearly there :o)

Share this post


Link to post
Share on other sites

Excellent work, looking really really good...

check your PM jacobaby

Share this post


Link to post
Share on other sites

Any updates yet? Maybe a combination of Bigpoppa's script and yours? I used Bigpoppas script in a few of my missions, but what I don't like is that you really see seperate rings of dust, and I miss the debris that was visible in your video.... So when will you release your script??

Share this post


Link to post
Share on other sites
Guest jacobaby

Well its done, more or less. I am waiting on my pilot friend for feedback, but thats about it.

At present it does this;

You select your terrain of choice, from a list of four, and the size of your chopper (ahem). Then in the init line of any chopper you wish to use the script, a line like this;

[this, 1,2] exec "rotorwash.sqs"

If you fly an especially large helo the script will detect that and compensate.

As you fly higher, the dust reduces, and increases as you descend. It takes a while to pick up at spin up, and it takes a while to settle at spin down. Yes it does kick out larger chunks of debris if you hover at very low altitude.

If you hover at slow speeds over water you get ripples as well as spray, and the spray and dust deviates slightly in the same direction as the current wind, as indicated by fire smoke.

For those with slower machines the script will only produce half the quantity of dust/spray, but even on a 1.1ghz celeron I have had 8 choppers all running at max dust with no problems, benchmark for that is only 1800 or so.

The effect is visible on all choppers in an MP game, and only one copy of the script is needed for any amount of choppers.

As posted above I did get a very accurate water level measurement from a hybrid of Vektorbosons technique and the DKM one. Massive respect to them for finally figuring out how to alter it over water. In the end I decided for efficiency to have a simpler method, and used an added effect to mask the obvious flaws. Its not bad though.

When will I release it? Well I will maybe do so through BAS now, so i'll have a chat with them. Wont be long though.

TJ

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (jacobaby @ Jan. 25 2003,03:47)</td></tr><tr><td id="QUOTE">Well its done, more or less. I am waiting on my pilot friend for feedback, but thats about it.

At present it does this;

You select your terrain of choice, from a list of four, and the size of your chopper (ahem). Then in the init line of any chopper you wish to use the script, a line like this;

[this, 1,2] exec "rotorwash.sqs"

If you fly an especially large helo the script will detect that and compensate.

As you fly higher, the dust reduces, and increases as you descend. It takes a while to pick up at spin up, and it takes a while to settle at spin down. Yes it does kick out larger chunks of debris if you hover at very low altitude.

If you hover at slow speeds over water you get ripples as well as spray, and the spray and dust deviates slightly in the same direction as the current wind, as indicated by fire smoke.

For those with slower machines the script will only produce half the quantity of dust/spray, but even on a 1.1ghz celeron I have had 8 choppers all running at max dust with no problems, benchmark for that is only 1800 or so.

The effect is visible on all choppers in an MP game, and only one copy of the script is needed for any amount of choppers.

As posted above I did get a very accurate water level measurement from a hybrid of Vektorbosons technique and the DKM one. Massive respect to them for finally figuring out how to alter it over water. In the end I decided for efficiency to have a simpler method, and used an added effect to mask the obvious flaws. Its not bad though.

When will I release it? Well I will maybe do so through BAS now, so i'll have a chat with them. Wont be long though.

TJ<span id='postcolor'>

TJ is that you? The same TJ from alt.games.operation-flashpoint? smile.gif Was wondering when you'd head over to these woods...or are there two TJ's working on rotor downwash effects? LOL!

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (jacobaby @ Jan. 25 2003,03:47)</td></tr><tr><td id="QUOTE">When will I release it? Well I will maybe do so through BAS now, so i'll have a chat with them. Wont be long though.<span id='postcolor'>

That sounds awsome! If it won't need any addons (like the water texture) I can easily integrate it in my missions. It's only a small effect, but it really adds to the atmosphere.

Two proposals, though:

- make it possible to change the type of ground texture for the script while it's running. That way you can have a chopper take of on grassland and then land in the desert...

- add a seperate type of 'dust' for snow, so we can use the script on the winter islands, too!

Share this post


Link to post
Share on other sites
Guest jacobaby

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (joltan @ Jan. 25 2003,12:56)</td></tr><tr><td id="QUOTE">If it won't need any addons (like the water texture) I can easily integrate it in my missions. It's only a small effect, but it really adds to the atmosphere.

Two proposals, though:

- make it possible to change the type of ground texture for the script while it's running. That way you can have a chopper take of on grassland and then land in the desert...

- add a seperate type of 'dust' for snow, so we can use the script on the winter islands, too!<span id='postcolor'>

Thats the whole idea, no addons needed. The same will be true for my Napalm script, which is in progress. And I plan a WP script too.

As regards changing the dust in-game. Without help from BIS in the form of a new command, I cant see how it would be possible to alter the dust as per the terrain. On most of the islands this isnt an issue though, such small places would only have standard soil/dust colour.

(Well, actually I DO know a way, but consider it very limiting, and it would need a seperate script for each island. That said, I could do a Nogova version, which is the only island I know with both desert and snow. I'll think about it, I would prefer a single script, to avoid confusing the masses :o))

My script already has a snowy terrain selection.

TJ

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (jacobaby @ Jan. 25 2003,14wow.gif)</td></tr><tr><td id="QUOTE">As regards changing the dust in-game. Without help from BIS in the form of a new command, I cant see how it would be possible to alter the dust as per the terrain. On most of the islands this isnt an issue though, such small places would only have standard soil/dust colour.<span id='postcolor'>

Ah, i didn't expect the script to recognice the terrain all by itself - just a possibility to change the dust type manually from the outside (for example with a trigger covering the respective area...).

So if chopper1 has the script running you would do something like '[chopper1,2] exec "changeterraintype.sqs"', which would change the dust type for chopper1 to type 2. With a preloaded script or function this would not cause any lag, even if it got triggered for several choppers at once.

Edit: I figure that could be done by putting all choppers running then script in one global array and the creating a second array that contains the current terrain type per chopper. Upon each cycle the dust script would use the choppers position in the first array to find the current setting in the type array.

And I forgot about the image you posted with the snow, mea culpa... <!--emo&smile.gif

Share this post


Link to post
Share on other sites
Guest jacobaby

The reason my script is as it is, is for simplicity for the majority of users.

But it would be no trouble at all to end the script started via the init line via a trigger, and then run it again with the terrain variable changed.

As thats such a simple operation I would leave it up to individual missions designers to decide if they want to do it. I may put a readme explaining it.

If you wanted a certain map version, I was thinking along the lines of checking the x,y of the chopper, and according to the x,y terrain on the island, changing the effect.

Already for those 2 peaks in Nogova with snow you could add a line similar to the one for water, as they are the highest points.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×