Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Propeller

Discussion in 'Editor & General Support' started by Calixto, Jun 5, 2013.

  1. Calixto

    Calixto

    Joined:
    Aug 31, 2012
    Posts:
    66
    Hi, I have a vehicle in my game that has a propeller. I was wondering what the best way would be to handle that in Unity?

    In general, the propeller does nothing but spin fast, so do I really want to run an animation of a 3D model propeller spinning, or is there a better way to save on draw calls and memory?

    Thanks,
    Calixto
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    2,869
    The impotent question how much performance / Quality do you need?
    If you have a spinning 3d model with only one texture and one shader , its not eating so much performance.
    If you say : Its probably to fast to see it good you can make a graphic with a radial blurred propeller and rotate that on a plane.(Very sheep)
     
  3. Annihlator

    Annihlator

    Joined:
    Oct 15, 2012
    Posts:
    378
    If you mean a prop like a plane prop you may be approaching things without thinking what it actually looks like (instead of ruling by what it is) which could simplify the matter quite a bit ;)
    A plane prop spins so fast that you mainly see the blur caused by its movement.

    Does the prop always spin at the same speed? Or does it occasionally also spin-down/-up/stop?

    If it always spins at the same speed i'd make a very low-poly version of the propeller with a disc that has the blending of the movement baked in it (rotating at whatever looks right to you)

    If you dont understand or the props speed also changes a slightly different approach may give more practicality. Please reply letting me know and illget to trying to explain that or this more clearly :)



    ---- Decided to edit this post anyway.
    I mentioned the first line referring to the fact that in reality a prop would appear quite blurred, but if you'd model this as-is and animate it without motion blur, it would show differently (and imho, motion blur would be like using a shotgun on an ant in this case if it comes to the cost versus the result).

    When it's rotating at full spead you'd likely prefer an appearance much like this: http://image.shutterstock.com/displ...s-on-turbo-prop-aircraft-engine-113797726.jpg which can be achieved way cheaper and quite easily nevertheless.


    For the propeller rotating at full-speed;
    I'd use a low-poly/quality model of the prop itself, and have a circular plane attached to it (basically sticing through the propeller's blades). On the circular plane i'd then use a texture that's a bit like; http://homepage.ntlworld.com/rob.neal2/misc/Helicopter Blades.jpg.
    Why? So a still/screenshot could then still show some detail of the prop itself while also showing the blur in the cheapest way possible. Having the circular plane stuck right to the propellor allows you to animate it at once.
    Instead of the very rounded blur you could also choose i.e. to choose a texture more like this appearance; http://www.colacola.se/pix/about_propeller_alpha.jpg Which would come down to a matter of taste ofcourse ;)

    If you want the prop to also speed down though i'd take an approach like this;
    - Have prop speed defined in a float value (range 0>1 ofcourse)
    - HighPoly Version of Prop
    - LowPoly Version of Prop
    - Circular plane with a shader that allows you to modify it's overall transparency
    Then try to have scripts take care of the following behaviour (basically, you'll get the gist);
    If PropSpeed < (certain treshold, i'd guess 0.25) : Use HighPoly Model
    PlaneTransparency = saturate(PropSpeed*2)

    I think that way you'd achieve in a very lightway manner a quite good-looking propeller effect.

    Hope it helps you out! :)
     
    Last edited: Jun 5, 2013
  4. Calixto

    Calixto

    Joined:
    Aug 31, 2012
    Posts:
    66
    Hi fffMalzbier, thank you very much for the suggestion. This sounds like a very interesting idea. I'm going to look into your suggestion.

    Calixto
     
  5. Calixto

    Calixto

    Joined:
    Aug 31, 2012
    Posts:
    66
    Hi Annihlator, thank you very much for the very interesting idea. I like your approach with the shader - very nice touch! I like the fact that its simple, yet will look very realistic at a very low cost to performance. Your suggestion is exactly what I was hoping for and you thought it out completely for me. Thanks for the detailed help.

    Calixto