Remp Posted December 17, 2009 Share Posted December 17, 2009 (edited) This resource creates a fully customisable snowing effect Download: https://community.multitheftauto.com/index.php?p= ... ils&id=538 Example video (with "cartoon" type snow): To activate the snow, hold down ctrl and press s (or type /snow). Do this again to stop the snow To access and manipulate the snow settings, hold down shift and press s (or type /snowsettings) If you experience lag with snow, reduce the settings to a more comfortable level Settings: - Snow density - Snow type ("real" or "cartoon") - Snow wind direction - Snow wind speed - Snow fall speed - Snowflake size - Snowflake jitter Exported functions (clientside): - updateSnowType(type) - "real" or "cartoon" - updateSnowDensity(new_density, blend) - blend indicates whether the new density should blend into the old density, rather than just appear all at once - updateSnowWindDirection(x, y) - between 1 and 0 - updateSnowWindSpeed(speed) - updateSnowflakeSize(min_size, max_size) - updateSnowJitter(true/false) - startSnow() - stopSnow() - setGuiEnabled(enabled) - true or false (this controls whether players will have access to their own snow settings gui, also available in the meta.xml) - setSnowToggle(enabled) - true or false (this controls whether players will be able to turn the snow on and off, also available in the meta.xml) Edited September 18, 2011 by Guest Link to comment
uhmpr0 Posted December 17, 2009 Share Posted December 17, 2009 is nice and christmas etc etc Link to comment
Mr.Hankey Posted December 17, 2009 Share Posted December 17, 2009 Very nicely done Though you may want to make the flakes jitter horizontally a bit to make it look even better. Link to comment
SATAN Posted December 17, 2009 Share Posted December 17, 2009 thats why i love mta so much, awesome Link to comment
madis Posted December 17, 2009 Share Posted December 17, 2009 Looks like you've put a lot of detail in it (the Wind GUI also looks great). Well done! Link to comment
Dark Dragon Posted December 17, 2009 Share Posted December 17, 2009 really really cool, even better, just awesome! now i agree that someone has to create a resource which replaces all the sextures of gta to make them snowy the only thing i've noticed which could be done better is: it seems when you look from above the falling flakes stay at the same size. they would need to get smaller. opposite when looking up from below. edit: but in the video you stretched 4:3 to wide screen Link to comment
Remp Posted December 17, 2009 Author Share Posted December 17, 2009 (edited) Hankey: in my experience of snow (which being a brit is about once every 3 years ) this doesnt actually happen. i did briefly toy around with writing some code to automatically generate wind patterns to give it a bit more energy, so theoretically you could add horizontal waving through the exported functions if you wanted Dragon: yes, 4:3 on youtubes HD setting looks silly, it barely takes up half the available space so i stretched it to fill a little better. currently there are no size alterations at all based on distance/perspective, id have liked to add them in but its a question of speed over features. the less things we compute every frame the higher snow density people will be able to have (this is also why things like ground detection and seeing snow through objects are not very accurate) Edited September 14, 2010 by Guest Link to comment
madis Posted December 18, 2009 Share Posted December 18, 2009 There's an interesting feature you have, that i.e being under the bridge, there is no snow. However, then you can't really see snow in the area where there should be. You probably knew that already, though. Link to comment
Remp Posted December 18, 2009 Author Share Posted December 18, 2009 unfortunately this is a limitation of the method i used for creating snow and i cant think of any feasible way around it. feel free to play around with code if you (or anyone) can think of a way to do it Link to comment
madis Posted December 18, 2009 Share Posted December 18, 2009 Actually, I was surprised that you could accomplish it the way it's already. Link to comment
eAi Posted December 18, 2009 Share Posted December 18, 2009 Adding a dxDrawBatch (or similar) function would probably speed thing kind of thing up, as the repeated calls to dxDrawImage are probably fairly costly. I'd really be interested to see if you could develop this into a real particle system - it'd be a great thing to have and a good learning experience Link to comment
spawn-BELARUS Posted December 20, 2009 Share Posted December 20, 2009 Good work! I like snow)))))) Link to comment
ClaSh Posted December 26, 2009 Share Posted December 26, 2009 Nice ! Hum, I'm new on MTA. I have one question, how to install please . Link to comment
eAi Posted December 26, 2009 Share Posted December 26, 2009 Nice !Hum, I'm new on MTA. I have one question, how to install please . Read the manual? https://wiki.multitheftauto.com/wiki/Client_Manual Link to comment
ClaSh Posted December 26, 2009 Share Posted December 26, 2009 Thank'S but it not says how to install snow mod. Link to comment
eAi Posted December 26, 2009 Share Posted December 26, 2009 Same way you install any other resource? Link to comment
ClaSh Posted December 26, 2009 Share Posted December 26, 2009 It work. Why we need to Ctrl + S to display the snow? Link to comment
Remp Posted December 27, 2009 Author Share Posted December 27, 2009 This is just so people have a little more control and can toggle it on and off whenever they want. You could make the snow start automatically when you join the server with a simple edit to the code: Open snow.lua (in the unzipped snow resource folder), copy and paste this onto the bottom of the file, then save it and then restart the resource: addEventHandler("onClientResourceStart",resourceRoot,startSnow) this will automatically start the snow whenever the snow resource starts or the person joins the server you can also use the exported functions to control the snow if you wanted, but this is probably the easiest way to do it Link to comment
djlobo Posted January 28, 2010 Share Posted January 28, 2010 Pretty awesome, just bad i dont used this on christmas times . Link to comment
mcB Posted February 9, 2010 Share Posted February 9, 2010 This a great resource, thanks! Link to comment
Remp Posted December 2, 2010 Author Share Posted December 2, 2010 Version 1.0.2 uploaded - added a horizontal jitter effect to the snow to give it more energy (can be toggled in the settings / via the exports) - some misc performance improvements (which pretty much counter the jitter, so this version should be roughly as intensive as the last) - changed to use dxDrawImageSection, so this version only works with mta 1.0.4+ (so only run it on your server if you enforce 1.0.4 clients) Link to comment
Remp Posted September 18, 2011 Author Share Posted September 18, 2011 Version 1.0.3 uploaded. This fixes an error so the snow will work on the latest mta, please update to use this on 1.1 (or if you can script and want to just update yourself, lines 285/286 in snow.lua: remove the penultimate argument in isLineOfSightClear, 'true') Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now