Prometheus Posted February 24, 2016 Share Posted February 24, 2016 I'm toying around with the precipitation datablock and created my own for snowflakes. Things have gone smoothly except the snowflakes themselves are squares instead of circles.http://i.imgur.com/bVKwSDm.pngThe datablock code: datablock PrecipitationData(LightSnow) { soundProfile = "LightSnowSound"; dropTexture = "art/environment/precipitation/snowflake2"; splashTexture = "art/environment/precipitation/water_splash"; dropSize = 0.35; splashSize = 0.1; useTrueBillboards = false; splashMS = 500; }; snowflake2.dml simply contains: snowflake2 The snowflake image itself (128x128 png)http://i.imgur.com/21mM0SX.pngAny suggestions? Quote Link to comment Share on other sites More sharing options...
Duion Posted February 25, 2016 Share Posted February 25, 2016 Change the blendmode in particle editor. Quote Link to comment Share on other sites More sharing options...
Prometheus Posted February 25, 2016 Author Share Posted February 25, 2016 Hm, perhaps I didn't do this correctly. I simply made a new datablock in environment.cs. It doesn't show up in the particle editor list, so I can't edit it. Quote Link to comment Share on other sites More sharing options...
doc Posted February 25, 2016 Share Posted February 25, 2016 I also had the same problem, I suggest to use your own shader for that:you can specify which shader to use for the drops and splashes as you can see here https://github.com/GarageGames/Torque3D/blob/2044b2691e1a29fa65d1bdd163f0d834995433ce/Engine/source/T3D/fx/precipitation.cpp#L1633To do that, add this to a .cs file (for instance, core/scripts/client/shaders.cs)new ShaderData( fxPrecipitationShader ) { DXVertexShaderFile = "shaders/common/precipV.hlsl"; DXPixelShaderFile = "shaders/common/precipP.hlsl"; OGLVertexShaderFile = "shaders/common/gl/precipV.glsl"; OGLPixelShaderFile = "shaders/common/gl/precipP.glsl"; samplerNames[0] = "$diffuseMap"; samplerNames[1] = "$alphaMap"; pixVersion = 1.4; }; then in your precipitation datablock add these two fields: dropShader = fxPrecipitationShader; splashShader = fxPrecipitationShader; if you are still unhappy with the result, you can tweak the shader or make a new one, just replace the DXVertexShaderFile and the other ones with your tweaked/new shader.NOTE:Keep in mind that your texture is not in tiles as it is supposed to be by default...Check here: https://github.com/GarageGames/Torque3D/blob/2044b2691e1a29fa65d1bdd163f0d834995433ce/Engine/source/T3D/fx/precipitation.cpp#L159 Quote Link to comment Share on other sites More sharing options...
Prometheus Posted February 25, 2016 Author Share Posted February 25, 2016 Perfect, doc! Exactly what I was looking for.nLl0icgNc0Y Here's the snow sheet I ended up using, if anyone comes across this:http://i.imgur.com/hVPeSmn.png Quote Link to comment Share on other sites More sharing options...
doc Posted February 25, 2016 Share Posted February 25, 2016 Looking good! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.