Search Unity

[RELEASED] Spin Wheel Effect

Discussion in 'Assets and Asset Store' started by fra3point, Sep 13, 2016.

  1. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269






    The new Spin Wheel Effect by 3Point Games is now on Asset Store!

    Check it out here!





    DESCRIPTION

    The Spin Wheel Effect (S.W.E.) is a C# plugin for Unity3D thought to help developers to avoid the ugly Stroboscopic Effect (a.k.a. Wagon Wheel Effect), which occurs when a wheel rotates faster than the frame rate of the game.



    SCREENSHOTS AND VIDEOS













    PERFORMANCE IMPACT

    S.W.E. has no FPS impact on your game, since it automatically generates blurred textures just one time and swaps them accordingly to the wheels’ speed.
    It requires a little time every time you load a wheel configuration (less than 1s in most cases) and some amount of memory (20-100 MB) depending on the size and number of generated textures. A memory counter is shown in the inspector and a texture compression option (very slow) help users to choose between size and quality.


    FEATURES

    GPU generated textures
    Diffuse and Bump maps supported
    Mobile compatible (tested on Android)
    Standard and Legacy shaders supported
    Outer Rim, Tyre, Tread, Spokes and Brake Disk supported
    Textures compression (slow)
    Versatile (not only for car wheels)
    Different input handlers
    Unity 5.0+ compatible
    UnityCar ready
    Save/Load config system
    Example of runtime wheels swap



    NOTES
    • Some modeling and texturing work may be required in order to correctly set up the system. All the wheels must respect a given hierarchy.
    • I suggest to use the support if you need help to learn to use this system.

    USER MANUAL

    http://docdro.id/5JmCzLZ


    HOW TO GET SUPPORT


    If you already purchased the package on the Asset Store, but also to ask something about the product you can contact me for support in the following ways:

    Email: fra3point@gmail.com
    Please, add this string in the message title: [SWE Support]

    Skype: fra3point
    Please, add this string in the contact request: [SWE Support]
     
    Last edited: Jan 9, 2017
    600 likes this.
  2. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    Spin Wheel Effect v1.1 has been released

    Release notes:

    -Added Shading Mode: Legacy or Standard
    -Bug fixes
    -Added a new wheel model
    -Older version compatibility (Unity 5.0+)
    -Added a new scene with input handler to simulate a tourbillon mechanism




    As now, I'm working on a new version that will include:

    -New ready-to-use wheels
    -Save/Load config (different wheels may have different settings)
    -Swap system example for runtime wheel change (see the video!)


    Check it out with this example!!



    And here are two of the wheels included in the upcoming version:



     
    Last edited: Sep 21, 2016
    600 likes this.
  3. 600

    600

    Joined:
    Dec 18, 2013
    Posts:
    385
    Cool! Will get it in near future!
     
    fra3point likes this.
  4. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Excellent, hadn't realised version 1 had released. Will pick this up soon.
     
    fra3point likes this.
  5. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    UPDATE - 23 September 2016

    Spin Wheel Effect 1.2 has been released!

    Check it out here on the Asset Store

    --------------------------------------------------------------------------------------

    Release notes:

    -Added a simple Save/Load configuration system
    -Added a dynamic Spawn/Swap wheel system
    -The main example scene has been updated with the new features
    -10 ready-to-use wheel models included
    -Minor bug
    fixes

    --------------------------------------------------------------------------------------

    Included wheels:

    For a complete list of the included wheels, please check this Sketchfab collection.

     
    Last edited: Sep 23, 2016
    John-G likes this.
  6. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    UPDATE - 19 October 2016

    Spin Wheel Effect 1.3 has been released!

    Check it out here on the Asset Store

    --------------------------------------------------------------------------------------

    Release notes:

    - Removed editor references in runtime code
    - No more resources folders needed
    - Shader model 4.0+ is required on Direct3D platforms

    As @600 kindly reported to me, there was a bug in the 1.2 version that occurred during the Build of the project. I have fixed it and it works now (tested on on Windows). I haven't tested it on Mac, but it should work without problems by modifying the shaders (remove the #pragma target 4.0 line in the blur shaders).



    --------------------------------------------------------------------------------------


    Next release spoiler:

    1) First, I'm planning to generate the normal maps by the GPU via shader/blit. This will improve a lot the generation performances. As now only the diffuse textures come from the GPU, while the normal encoding (which takes the most part of the computation time) is made by the CPU.

    2) A new ready-to-use wheel model for trucks or buses
     
    Last edited: Nov 11, 2016
    600 likes this.
  7. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    UPDATE - 17 November 2016

    Spin Wheel Effect 1.4 has been released!

    Check it out here on the Asset Store


    upload_2016-11-17_2-10-4.png

    Release notes:

    The blurred normal maps comes now from the GPU (100x faster!)
    -
    Added a new truck wheel
    -
    Improved dynamic wheel swap system
    -
    No more need to include shaders in Graphics settings
    -
    Bug fixes
    -
    Improved custom inspectors


    --------------------------------------------------------------------------------------


    Known issues:


    Some materials are useless, and the hierarchy of the models can be simpler.
    -
    Some example models are not well uv mapped and they seem unbalanced.
    -
    There's a leak of render textures and materials, only visible with Profiler.
    -
    The blur of the tread bump map isn't perfect until it reaches the maximum value.
    -
    Shaders MUST be set in Edit->Grpahics->Always included shaders, in opposition of what I wrote in the Asset Store release notes.


    --------------------------------------------------------------------------------------


    Next release spoiler:

    Some of the v1.4 known issues will be fixed
    -
    The properties maxBackground and shadowStrength will be deleted because they can cause confusion. They will be replaced by an automatic and adaptive method which adds extra alpha to the spinning mesh accordingly to the angle between the wheel and the camera's view. This adds some realism to the effect, since it simulates the occlusion the side faces of the spokes create on the inner parts of the wheel when you see the wheel from the side

    -
    The example wheels will be re-textured to be better looking and balanced.
    -
    Mobile and PC shaders will be merged
    -
    The minimum Unity Editor version required will be 5.3.5
     
    Last edited: Nov 20, 2016
    600 likes this.
  8. crudeMe

    crudeMe

    Joined:
    Jul 8, 2015
    Posts:
    92
    Hi! Can blur images be generated in an editor or elsewhere, but not on runtime? This will increase build size, but probably might eliminate hiccup. If there are any oO
     
    fra3point likes this.
  9. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    Hi! This will be possibile after a little script modification but the hiccup is really small on high end platforms. If you saw the demo of course you noticed the hiccup because

    1) that is the old demo, and it is slower

    2) for demo purpose the generation of the textures is made every time you change the wheel, but it's better to first change the wheel and then, when you load the driving scene, call the geberation process. The loading time will be a little longer (in high end platforms less than 0.5s) but the user won't even notice it during the scene change. I'd prefer this solution in your case.

    Anyway, If you've already purchased S.W.E. and you need that script feature I'll make it for you. I don't know how much time would it take because the 1.6 release was planned to be the last one and this feature world require some days.

    Let me know!
     
    Last edited: Dec 6, 2016
    crudeMe likes this.
  10. crudeMe

    crudeMe

    Joined:
    Jul 8, 2015
    Posts:
    92
    Just bought it!) I think premade textures are way much better then those, generating at runtime. We have a case, where cars are instantiated at runtime. We would like to lessen every other impact on ms. Not sure if it's okay to ask for such a modification, but since you are asking... :D
     
    600 likes this.
  11. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    Please, write me an email at fra3point@gmail.com, I use that for support requests. :)
     
  12. 600

    600

    Joined:
    Dec 18, 2013
    Posts:
    385
    That’s a good idea actually!

    Thanks for updates @fra3point !
     
    fra3point likes this.
  13. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    I appreciate these suggestions and I'll do my best to implement them. It will be quite hard because the code is long and complex, so, as I previously said I don't know how long this update can take.

    In the meanwhile, I still want all you to focus on the possibility to call the GenerateTextures() method only during the scene load, making the computation time (0.5s in old machines) absorbed by the scene loading time. :)
     
    600 likes this.
  14. crudeMe

    crudeMe

    Joined:
    Jul 8, 2015
    Posts:
    92
    Hey, thanks for being responsive. Actually, I just tried your package, and it seems like no spikes or whatsoever changing the wheels. No idea how well it will behave within our project, but so far optimization is a beast!

    Haven't dig into the code yet, but I think it won't be a problem for us to modify this stuff for our needs. Thanks again for a great asset, keep up the good work and don't mind me! 15 bucks spent well :D

    Cheers!

    upd: and since we all sharing awesome ideas, would be totally cool if wheels could react to timescale. you know, like slo-mo stuff and all that. hope won't be a problem for us to do that)
     
    Last edited: Dec 6, 2016
  15. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    @crudeMe Thanks for your recent purchase and for the kind words! I did a huge work in order to optimize the generation process. Almost all the work is done by the GPU, which is incredibly fast for stuff like that!

    But.. I don't understand what you mean when you say: "it seems like no spikes or whatsoever changing the wheels". :(
     
    crudeMe likes this.
  16. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Just going to pick this up and wondering if it works with 5.5

    Just Purchased.
     
    Last edited: Dec 6, 2016
    fra3point likes this.
  17. crudeMe

    crudeMe

    Joined:
    Jul 8, 2015
    Posts:
    92
    meaning no hiccups or freezes, lags or whatever impacts on performance. Great job on optimization! As to my last upd in the comment about time scale, seems like speed=s*Time.timeScale works in SpinWheel.cs, but it won't freeze totally if time scale is zero. Going to look at it tomorrow)
     
    fra3point likes this.
  18. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    I've never thought to the slowmo effect, but I don't think it's hard to do. Just keep in mind that even if you slow your game your wheel will have a blurred texture on it, and simply scaling down the game speed won't alter that texture. Try pausing the game while the wheel is spinning: you will see the wheel with no rotation (because of the pause) and the blurred texture on it, like if the time scale would be 0.
    So I don't think you'll need to set different parameters or alter the code to get a good slow motion effect.
    Anyway, if want to control the speed of the textures swap just check the minSpeed and maxSpeed variables (a brief description of them is in the user manual). :)

    Edit: in the example scene you didn't find any freeze because all the generation work is made only when you click "save", simulating a generic moment in your game when you can call the GenerateTextures() method, i.e. a scene change/load (as I said in a previous post). :)


    I don't have Unity 5.5 yet, so I can't test the package with that version. But I think it should work fine.
    You were interested in plane propellers, right?
    I've just checked the plane example scene and I found a little error. The system just works fine but there's a null variable that I didn't check before Debug.Logging it, so there will be a null reference exception but there won't be any crash or freeze! :)
    I've already fixed this little bug happening every time a wheel doesn't use all the texture maps (like the example's propeller).
     
    Last edited: Dec 6, 2016
    John-G likes this.
  19. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi, what about changing the rims colors at run time after the wheel is set up... is this still going to work or once is set up, no more modifications should be made - thanks ?
     
  20. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    Hi! You can change the rim color at runtime but after that you must "update" the system by calling the GenerateTextures() function. There's an example scene in the package in which you can change the rims' color.

    Please think about a common game situation:
    You are in a beautiful garage, you choose the wheel you want on your car, then you paint it with some colors, you save your settings with a function and, at last, you change scene (or not) before running in some tracks.
    Simply calling GenerateTextures() in that saving function you'll make it absorbe the generation overhead (<0.5 seconds in most cases).

    If you are a good programmer, then in the package you will find all the necessary to code your own paint&save system, but if you'll need help for this, please contact me for support at fra3point@gmail.com.

    Have a nice day,
    Francesco
     
    Last edited: Dec 28, 2016
  21. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi, thanks for the response, that's all i wanted to know, Cheers !
     
    fra3point likes this.
  22. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi @fra3point , i'm having working wheel now with blur texture and looks really nice. Just a little issue i am having is that the generated Spoke blur texture have plane white alpha which causes the "SpokesSpin" to have no transparancy... Your setup is working properly though. Any idea. I am using 5.6b3 ?
     
    fra3point likes this.
  23. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    Try to disable the "AdaptiveOcclusion" toggle and see if your alpha channel comes back!
     
  24. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Ok, that fixed it. Thanks !
     
    fra3point likes this.
  25. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    One more question... the model i am using, which represents the Spokes has two sub meshes with two different colors, so are both colors going to be taken into account when creating the textures !?
     
  26. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    You can try to enable it and decrease its value, just to see if that works.

    I've never tried that: I have to make some tests. I'll let you know! :)
     
  27. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Thanks, lowering the value seems to work : )

    That will be great, thanks !
     
    fra3point likes this.
  28. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    @Vagabond_ Hi, I've checked if S.W.E. does work with multiple materials applied on spokes.

    -Having a single mesh with multiple materials seems to be ok, but the SwapWheels.cs sctipt needs to be upgraded in few lines.
    -Having more than one mesh for spokes is not supported.

    So if you need this feature I suggest you to merge the spokes submeshes into one mesh, always having 2 materials.
    I think this is also better for performance reasons.

    Please tell me if you choose to make this little edit to your models, so that I can provide you the modified scripts.
    In the meanwhile I continue the tests. :)
     
  29. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi, thanks for the response...

    the spokes mesh is already a single with two materials separated from the rim like examples in the package... the colored part only does not contribute to the final blur image... I would love to try the modified scripts thanks !
     
    fra3point likes this.
  30. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    Oh, wonderful! I'm sorry, I've misunderstood what you said about your wheels' structure.
    Please, send me an email at fra3point@gmail.com

    I'll send you those files there as soon as possible (I'm not in my town now). :)
     
    Vagabond_ likes this.
  31. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Wheel Spin Effect in action :)

     
    fra3point, 600 and John-G like this.
  32. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298
    Hi! I'm enjoying your product so far but I seem to have a problem with the "Spoke" part of the model returning some odd blue parts, I'm not sure what it is. I've tried disabling the addaptive occlusion, disabling some PBS stuff (like reflection probes or anything that would affect the model) but I can't seem to find the problem. It works fine in your demo scene so I think the problem is within my scene perhaps?



    Update: Fixed by clamping Material's alpha channel.
     
    Last edited: Jan 8, 2017
    fra3point likes this.
  33. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    Great!!! :D
    I suggest you to increment a bit the "alphaMultiplier" property and to enable the adaptive occlusion with a value of 0.7.

    Hi, @ModularBuilds! Please, send me an email at fra3point@gmail.com, I'll help you to fix your problem(s).
     
  34. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298
    Overall I wanted to say this asset is pretty great, however I wanted to address your claim in the first post.

    I lose about 20fps turning on the effect, so I wouldn't say there is no impact, unless there is something wrong that I am doing. I've tested this both in editor and in build, so there could definitely be some optimizations to be had. :)
     
  35. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    That sounds strange, man.
    I've made all the optimizations I could and I am perfectly sure that the only thing that is "overloaded" is memory. At runtime, S.W.E. just stores the generated textures in memory and swaps them in the wheels' materials.
    There may be some other little performance issues like instanced materials for each wheel or the adaptive occlusion, but you definitely won't lose such a huge amount of fps because of those (at least on a PC).

    I have some questions:

    1) Does this performance issue happen also in the example scene with the default settings?
    2) If not, how big are your textures?
    3) Try disabling adaptive occlusion. Is the fps loss still there?
    4) What target platform are you using for building? And what hardware has your machine/device?
     
    Last edited: Jan 9, 2017
  36. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    I updated the User Manual of the 1.6 version with some extra informations about Adaptive Occlusion. Chek it out here:

    http://docdro.id/5JmCzLZ
     
  37. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298

    I think it may be the constant calls to set and get on the materials, I'm not sure really.

    1. Yes
    2. 256 blur, 512 regular
    3. Same performance.
    4. i7 4790 (4ghz), AMD 5870 , 16GB ram, 500gb SSD w/ 2TB HDD

    EDIT: I also noticed this problem where the rendered rim isn't centered no matter how accurate the spokespin mesh is and no matter what settings I try to put (spoke number, etc)



    This causes the blur to not be centered and orates off a bit, not sure how to fix it as I've tried a bunch of things to no avail.
     
  38. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    Ok, I will do some performance test to check the fps lost on an old 2008 machine, in order to accentuate the problem.

    EDIT: here's my results. Not only there isn't a fps lost, but it seems that I have some more fps! Of course the image shows only one moment of the execution, but averaging the different fps values I experimented the same behaviour. Take a look:

    upload_2017-1-11_11-21-12.png

    =====================================================
    =====================================================
    =====================================================
    =====================================================
    =====================================================
    =====================================================

    For the rendered rim issue, please note that the spokes number only affects the "y" relative offset of the object, but your problem seems to be an "x" offset.
    As now, the only explanation I have for this is that maybe your spokes mesh is not well-centered. I don't know what software are you using for modeling, but it should be easy to verify in Unity editor, too.
    Personally, I suggest to do this in the foolowing way:

    1) Spawn the wheel object in the scene, no matter where
    2) Select the spokes object
    3) Switch your scene view to orthografic
    4) Select the right view

    upload_2017-1-11_10-7-42.png

    5) Zoom in to the center of the rim
    6) Select the Move Tool
    7) Check if the move arrows are in the center of the spokes

    upload_2017-1-11_10-11-7.png
     
    Last edited: Jan 11, 2017
    Freznosis likes this.
  39. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298
    Looks good but I'm not sure what the problem here is, it's a pretty big loss.

    Here is the effect OFF



    Here is the effect ON

     
  40. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    @ModularBuilds I think the best thing to do is to have a skype session with screen sharing. Without having a global view on the scene it will be hard for me to help. I'm not a prefect english speaker but I shouldn't have any problems. :)

    [I'm not at home in these days, I'll be back on the 17th of January, so I'll be online from that day!]

    Skype name: fra3point

    For all the other customers, have you experienced the same issue?
     
    Last edited: Jan 15, 2017
  41. THEDARKSLAYER996856

    THEDARKSLAYER996856

    Joined:
    Jan 13, 2019
    Posts:
    2
    By chance you removed it from the store ?, I can't find it and if I use your link it says "Unfortunately, Spin Wheel Effect is no longer available."
     
  42. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    Hi, yes this asset has been deprecated because die to lack of time I couldn't support it anymore.

    Francesco