Home Technical Talk

Sandstorm FX - Unity Mobile, Ideas?

polycounter lvl 18
Offline / Send Message
Sandbag polycounter lvl 18
Hello Technical Talk Gurus,

I'm working on a racing game for iOS/Android and I'm trying to figure out a good way to pull off a sand storm effect (with directional wind) for one of the tracks.

The game is being made in Unity, which only supports soft particles in differed lighting (which is a no go for mobile). Any ideas on ways to achieve this without them?

The effect needs to have an obvious direction to it since there will also be a directional wind force imparted on the track, so while a screen effect will be helpful to thickening the overall look, I dont think I can put too much direction into it (unless I could have it orient direction to worldspace? That seems unlikely though...)

I also thought maybe I could throw in some higher elevation non-soft particles and then have a "sweeping sand" plane w/alpha over the ground, but then I would probably have to do the terrain in Max (doing it in Unity right now) so I could get the surfaces matched up.

Any tips, suggestions, ideas etc would be greatly appreciated.

Replies

  • mdeforge
    Options
    Offline / Send Message
    mdeforge polycounter lvl 14
    Can you generate any particles at all?

    Found this link: http://forum.unity3d.com/threads/35555-Sandstorms-and-such

    You can almost do what older games used to do for rain, but flip in 90 degrees so it's horizontal.

    Like, maybe a row of planes

    ||||||

    then when you want the storm to shift, shift the planes /////

    You can possibly even add deforms to it so it makes it look more wind driven.

    EDIT: Maybe half sphere's with alpha on them that are grouped up and blow at you.
  • Sandbag
    Options
    Offline / Send Message
    Sandbag polycounter lvl 18
    Yeah, the preferred method is to attach particles to the camera, I'm just worried that without soft particle shading it will look crappy when it intersects the ground or other geometry.

    Row of planes is an interesting idea, I think I can do UV Transform type animation to textures, kind of like a fake screen effect that can have have some depth?

    I'll have to mess around with that. Thanks for the suggestions!
  • Snader
    Options
    Offline / Send Message
    Snader polycounter lvl 15
    No matter whether you use planes or particles or some weird kind of clumpy geo - if you can't smooth/fade you'll get intersections.

    Are you able to draw distance fog?
  • gsokol
    Options
    Offline / Send Message
    I also thought maybe I could throw in some higher elevation non-soft particles and then have a "sweeping sand" plane w/alpha over the ground, but then I would probably have to do the terrain in Max (doing it in Unity right now) so I could get the surfaces matched up.

    You can do this: http://www.unifycommunity.com/wiki/index.php?title=TerrainObjExporter

    Export the terrain to an obj, optimize and bring that geo back in for your sweeping ground plane.
  • kio
    Options
    Offline / Send Message
    kio polycounter lvl 16
    just test the effect on actual devices (low fillrate can really be an annoyance to this .. ipad 1 for example..)
  • easterislandnick
    Options
    Offline / Send Message
    easterislandnick polycounter lvl 17
    In my experience you can't do distance fog or large scale transparency well on the iPhone, using lots of particles to obscure the screen in going to kill your frame rate. I'm not sure there is an easy way to do this and still get decent performance on older iphones (even the 4!)
  • Elyaradine
    Options
    Offline / Send Message
    Elyaradine polycounter lvl 11
    Planes with scrolling UVs may be your best bet. If you use particles, there may be problems with their scale (there's a max particle size relative to screen), the number of them in overdraw, and such.

    Fog is pretty expensive on mobile. (Although if it allows a shallower clipping plane, maybe it can pay off...)
  • Sandbag
    Options
    Offline / Send Message
    Sandbag polycounter lvl 18
    wow, thanks for all of your input guys. Yeah, I figured I might be a little greedy if I thought I could run half-screen transparent particles and not murder my fill rate.

    I'm really surprised to hear that distance fog is expensive on mobile though, it seems like all the cheap go to tools of ye olden days dont translate at all to what should be the vastly superior hardware of modern phones...

    Thanks again for your input, and that link to a terrain exporter (super win).
Sign In or Register to comment.