So I’ve been wanting a creep effect for a while now for Attack of the Gelatinous Blob. It only makes sense to slime everything possible in the map.
Entities currently have the ability to grow slime creep on them: http://youtu.be/YYlSHJoIfLI
But for anything sitting on the ground, like a piece of road or the terrain, I want to have a creep effect. If it was just the terrain, that would be easy (I would just splat it on). But since roads are kind of like terrain in that they are flat and can be walked on, they should get the effect too. But roads are not just painted on, they are real entities and are slightly above the terrain.
Any idea how to go about doing this? I haven’t played SC2, and I’m unsure how they do it (google is not returning any good results)
Having not played Starcraft before, I’m not exactly sure what you are describing. I guess it’s similar to what is happening to the buildings but somehow projecting outward from some source?
@pspeed said:
Having not played Starcraft before..
O_O
hehe
Yea it is, I presume, a mesh that creeps out from a source, slowly over time. Here it’s the grey slimy stuff that comes from the buildings:
I think I can maybe get away with a custom mesh, based on the in-game grid. It can use marching squares to fill itself in, and it can also adjust each polygon’s height based on the height of the ground at that location. If the grid is granular enough, and if it doesn’t grow up steep slopes, then it should look okay I think.
Another option you could try is to generate an image for the part of your map that you are viewing and use that for an input into a shader. I do something similiar in my game for light values. It may be a little overkill but as a side effect you can animate the growth easier.
Something like that, but more like a dynamically generated decal that covers the area that’s in your view. Basically I generate an image every so often that defines “light” in the scene (or in your case creep slime). Then in my shader I map that image to world coordinates. It basically could act like a projected texture on top of your view. Then you just update that texture when you move the view around or things get slimmed.
Yeah, if it were me, I’d be tempted to do this with a texture that I paint to update what areas are slimed… then either mix it in the shader based on location or overlay another mesh (with DepthTest.Equals) that renders a texture based on what has been painted.
For example, you could have a general noise texture and the low-res texture that you are painting that represents the slimed locations. You could then add noise to slime-texture and take a hard threshold for discard. So near the edges you’d end up splotchy and in the middle it would be solid (or more solid or season to taste).
Edit: or do all of that to sample into another texture. Or do that to sample into a texture with depth that further controls the splotchiness. (I’m thinking more inline with the SC screen now)
Edit2: this is similar to what glh described only just taken to the next level.
Alrighty, I think I have something to go with now.
Feeling experimental today, so I’m going to try and generate a mesh over the terrain and any raised road pieces. I can slap a texture on that pretty easily and blend it with anything below. I’m going to play with depth maps (used in terrain systems to blend textures more naturally) and see how that flows with the whole thing.
Thanks for the help!