Monday 20 April 2015

Connecting Wind to Script

I've now got a working "wind gust" in the storm controller. I now want to control this attribute to a wind field within the scene. This will then affect the vents of gas that are coming from the planet's surface.

Similar to my tests with particle emitters, I created a Volume Axis field and positioned it over the gas vents. I had a bit of trouble initially getting the smoke particles to interact with the air fields. I solved this by using the 'Dynamic Relationships Editor' to link the air field to the three nParticle shapes.


The result was working wind, the above video shows the current implementation but I've yet to properly set the attributes. Here the wind speed is exaggerated just for demonstration. I want to address the issue that the boundary of the air field is quite sudden, adding a drop-off in intensity should solve this.

Next was to set a "wind constant" which would be the wind speed while the "Master" storm control slider was set at 100%. 

Now that I've got a working wind gust mechanic, the next step is to link that into the controller interface. To do this I will take the wind speed and acceleration values at each frame and pass them through an multiplier which determines what the actual wind speed should be depending on the setting of the master controller.

This will allow for the user to view the change in wind speed in real time, however wind gusts may not react smoothly until this code is implemented and tested. 

No comments:

Post a Comment