- Home /
Is it possible to have dynamically building snow on the terrain?
First off I know this will be challenging, I'm a programmer, I just need I know if this is possible. If so, how can I go about this? Is there a way to change the terrain textures over time? Or change the splat texture of the terrain from something spotted to something nearly fully covered? This could only be temporary as you wouldn't want to destroy the textures already place on the terrain. Maybe a texture layer that can over right the textures placed then when it stops snowing go back to the lowest layer.
If the terrain approach isn't possible then what other way is. Let's through some ideas out there and make this happen.
I love a challange, so let's try to get this figured out. I'm sure it would help a lot of people.
Yes it's possible - Allegorithmic substances have a great way of doing this (if you are not on a mobile device) - there's a decent few demos around. Here's one http://u3d.as/content/allegorithmic/airstream-substance-demo/26X There is a snow demo somewhere, couldn't find it but Google Allegorithmic.
Clearly if they can do it - so can you!
Thanks for this, but I'm trying to stay away from pluggins as this is forour weather system. Is this possible to still have dynamic snow on the terrain without using that link you provided? Or will I have to write my own substance shader?
Hey this wasn't an answer for a reason - I was just answering your very first point - is it possible :) Yep!
I think they have some cool algorithm for dynamically updating a texture from combining multiple source textures. They build their final texture from a very small source file - using a rendering algorithm, how it works - I don't know! Guess it would be cool to figure out something similar.
The biggest problem is probably the tiling requirement I would think.
The starting point for combination might be some kind of space filling curve: http://lcni.uoregon.edu/~dow/Geek_art/Simple_recursive_systems/2-D/Space-filling_curves/Space-filling_curve_L-systems.html#Sierpinski_curves
Actually I'm liking the sierpinski curve on here: http://www.cs.utexas.edu/~vbb/misc/sfc/Oindex.html
Answer by BHS · Jun 06, 2012 at 03:57 AM
From all the ways I tried to make this work it's not possible. The only way that this worked was using a projector as Fattie suggested. HOWEVER, this effects all vegetation, along with anything else placed using the terrain, making it render weird with unusable results, even after I rewrote every shader that the vegetation used. It's impossible to set the terrain to a different layer other that what the terrain is because anything you place on the terrain using the terrain tools sets them to that layer. This means you can never change the layer of the vegetation so it's not affected by the projected texture.
You can't use decals, as they don't bend or contour to the terrain. Not to mention you'd lock any computer up with how many decals that would be rendered.
It's also not possible to lay any texture over the entire terrain. Unity's terrain is just too..protected, there is no way to change or alter anything. There's few things that are undocumented, but it's still impossible using all the documentation both documented and undocumented.
I tried using multiple terrains; duplicating the terrain as a mesh using a pluggin so I could have place my snow shader on the duplicated terrain, still impossible. Unity can only handle so many tris' (65,000) so you can only have a duplicated terrain with 1/4 the tris count making the terrain all blocky and unable to properly match the terrain, meaning you can never have an exact mesh replica of your terrain.
Until Unity allows more control over the terrain, it will be impossible to have dynamic snow on Unity's terrain. Believe me I have tried and researched for weeks, it just isn't possible, for now at least.
I'm posting this as an answer as, it's not possible. Hopefully this will help others so they don't waste weeks trying to do the same.
Your answer
Follow this Question
Related Questions
Incorporating Unity textures, models, and terrain into Eclipse 0 Answers
How to Apply Very Large Texture to Terrain 0 Answers
Can i change the Texture of terrain 3 Answers
Access terrains "Alphamap 0" from within code 0 Answers
How to change a simple snow particle FX to generate a speed effect? 1 Answer