Search Unity

ArcReactor procedural ray generator

Discussion in 'Assets and Asset Store' started by CatsPawGames, Jun 4, 2014.

  1. Cosmo777

    Cosmo777

    Joined:
    Sep 17, 2014
    Posts:
    5
    How does this perform on a desktop with a moderate system with multiple rays?
    Can I expect to me able to run say 25 simultaneous rays on a dual core system with a r270 card for example?

    I have a space game with multiple laser effects and am looking at solutions for the beam weapons.

    Thanks,
    Greg
     
  2. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hi Greg!

    If you set moderate amount of lights on your rays systems, 25 is quite an easy target for a desktop. Actually, since it's a space game, lights may not affect the performance that much because the scene is mostly empty. Other than lights, there's nothing too heavy performance-wise. Oscillations and randomizations cost some CPU time, but not that much.
     
  3. StormyShelter

    StormyShelter

    Joined:
    Oct 25, 2014
    Posts:
    7
    For my game I need to be able to send a hit message to objects that does neither reflect or block.
    It seems that this asset doesn't support that and the correct way would be to use Physics.RaycastAll. Am I correct?
    Is there a workaround for this?
     
  4. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hi!

    That's a good idea concerning messages to "shoot-through" objects, so I added support for that in the Launcher script:
    touched_objects.png

    All you have to do is to toggle "Send Message To Touched Objects" on, and designate layers for these objects.
    They will recieve "ArcReactorTouch" message with standard ArcReactorHitInfo parameters.

    As always, changes will be available in the next update. If you need them now, just send me PM, and I'll send you changed files.
     
  5. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    24 hour deals sale is going strong! Only for today, you can buy ArcReactor for half-price on Asset Store
     
  6. mccann

    mccann

    Joined:
    Sep 24, 2013
    Posts:
    30
    The demo site isn't showing anything except a hosting site. Any ETA on when the demos will be available again? (hopefully before the sale ends)
     
  7. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    It seems like sale traffic overloaded my hosting, I'll try to relocate demos on other server. Hopefully it'll take 30-60 minutes.

    Edit: Thanks for the tip, I could've missed the fact that my demos were unavailable. It's been frantic 5 hours =)
     
    Last edited: Oct 25, 2014
  8. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
  9. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    I have a simple, maybe too obvious question: can this plugin make a curved beam ... that is, a beam that bows in an arc before striking its target? Where the curve of the beam is either specified in the editor or set to random?

    I see bouncing beams and beams that have been bent into rough circles (probably using colliders), and beams that have a spiral around a straight core, but - unless I overlooked it - no beams that simply arc on their path between emitter and target.
     
  10. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    In the current version, you can set this up as a half-period of oscillation, which will give you a nice sine curve. That's how "petals" of the green ring work:
    petals.JPG

    Or you can define your custom shape by placing shape transforms on your scene, and ray will follow them.(In the 1.4 update, you can also define shape by Vector3s instead of transforms). That's how letters and rings in the effect demo work:
    arc_letters.JPG


    But, I've been asked this question several times before and I finished more comprehensive system yesterday. Now, you can define curve which will determine ray shift from main system shape defined by transforms:
    shape_curve.png

    This will be available in 1.4 update along other major changes. Update will be uploaded to the Asset Store at the end of October, +3-7 days for review team, so you'll be able to download it in the first week of November.
     
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Heh! :)

    Thank you, I'll be buying this from the store in about a minute ...

    EDIT: Purchased, and downloading it now. :)
     
  12. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Glad to help and thanks for purchase, I hope it'll help you with your projects =)
     
  13. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Less than 2 hours left! You can still buy ArcReactor at 50% price as part of 24 hour deals.

    Edit: Okay, sale ended with very good results, I hope all of you will find ArcReactor useful.
     
    Last edited: Oct 26, 2014
  14. gnacht

    gnacht

    Joined:
    Sep 20, 2014
    Posts:
    2
    I bought this yesterday based on the good comments placed by others. This appears to do some things I had planned to do in my game design and will save a lot of time. A couple of questions:

    1. I am using Unity version 4.6.0 b20. Has anyone used this asset in this latest version? Just wondering if any known issues exist.
    2. I seem to be having an issue trying to add additional Shape Transform elements in the Inspector. Any suggestions specific on the expected way to do this would be most welcome.

    Thanks in advance for any comments and looking forward to working with this asset.
     
  15. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    1. I didn't test ArcReactor on beta versions of Unity, so I can't help you with that. But, this asset uses only basic classes and doesn't have intricate dependencies, so it should work just fine on both newer and older versions of Unity. If there are some issues, please inform me and I'll make necessary changes.

    2. It's standard unity Transform array - enter number of transforms you want to set (if you're adding transforms, just increase elements number), and drag-n-drop transforms from the scene to slots in the array. Note that when you increasing the size of already filled array, all new elements will be filled with last transform - that's normal, just drag intended transforms to new slots.

    I'm planning to implement a custom editor for ArcReactor elements, but considering amount of customizable parameters, it'll take a long time.
     
  16. gnacht

    gnacht

    Joined:
    Sep 20, 2014
    Posts:
    2
    Thanks for the quick response and suggestions regarding Transform elements. I will be glad to share any findings in regard to using the asset within 4.6.x. Appreciate your comments and support :)
     
  17. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    In my game I want to use these ray effects in a 2D fashion. All these effects take place in 3D space in the examples and the prefabs. What do I need to change so that I can use these on X/Y axis visually? My game is a 2D platformer/shooter so these effects would be shot out from the weapon on X/Y
     
  18. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    You don't need to change anything, just parent Launcher component to your weapon and orient it so that Z-axis of Launcher is looking at firing direction. That's all, to fire you'll need to invoke Launch method of the Launcher.
    I've already seen some examples of 2D games using ArcReactor, so it's definitely working in 2D in the same way as in 3D.
     
  19. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    Ahh ok, thank you for the quick response, I LOVE this asset, will be leaving a review on the store soon, so legit.
     
  20. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    One other question, how can we have the ray keep its position in world space after a shot is fired? Currently it just follows the player because its a child object of his gun. I'd like to be able to fire and the player can move and the ray arc position stays in place of where it was shot.
     
  21. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    For that, use Start and End behavior settings of Launcher component. For completely immobile ray, just use "immobile" for both settings.
     
  22. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Version 1.4 was submitted to Asset Store, should be available during this week.

    Changes:
    - added physical ray propagation (ArcReactor_Launcher)
    - added Touched object messaging (ArcReactor_Launcher)
    - added Shape curves settings (ArcReactor_Arc)
    - Complex nesting - now you can nest arc to 2 other arcs with mix coefficient (ArcReactor_Arc)
    - Shape texture option added (ArcReactor_Arc)
    - improved Noise texture controls (ArcReactor_Arc)
    - Combined shape definition - supports mixture of Transforms and Vector3's (ArcReactor_Arc)

    Note that price of the ArcReactor will be 25$ as of this version, so you can save 5$ if you buy it now.
     
    Last edited: Nov 7, 2014
  23. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78
    Hello,

    Just bought this package. Great tool!

    I've got a question though,

    Is it possible to create an arc that moves to a given pos?
    (could this be done by adding the arclauncher script to a moving projectile or is there a less expensive way?)

    Tnx in advance,

    Greetz,
    G
     
  24. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hi!

    You can control arc by controlling it's shape transforms, so to make arc move to a given position, move your transforms to this position, and arcs will follow. You can try it out by moving transforms of showcase effects on first demo scene.

    How you control transforms is dependent on your setup, you can control them with physics, with scripts or with 3rd party solutions like iTween etc.

    P.S. In 1.4 version, you can setup shape of arc by array of Vector3 variables, so you can change them directly, although it's much more flexible with transforms.

    P.P.S. If that's not the answer you're looking for, please provide a screenshot or drawing of desired effect, maybe I misinterpreted your question.
     
  25. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78

    Tnx for the quick awnser,

    Greetz,

    G
     
  26. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    1.4 version is live on Asset Store!
    Changes:
    - added physical ray propagation (ArcReactor_Launcher)
    - added Touched object messaging (ArcReactor_Launcher)
    - added Shape curves settings (ArcReactor_Arc)
    - Complex nesting - now you can nest arc to 2 other arcs with mix coefficient (ArcReactor_Arc)
    - Shape texture option added (ArcReactor_Arc)
    - improved Noise texture controls (ArcReactor_Arc)
    - Combined shape definition - supports mixture of Transforms and Vector3's (ArcReactor_Arc)
     
    Last edited: Nov 7, 2014
  27. StefanoCecere

    StefanoCecere

    Joined:
    Jun 10, 2011
    Posts:
    211
    sorry for the stupid question: i could not find how to edit a ray just in editor mode..
    should we configure the rays "blind" and see them in play mode only?

    (it's one of the most interesting feature of Shuriken/Particle Playground, to full edit in "offline" mode)

    if not possibile, i'll create a custom scene just to setup/test the rays, with a auto copy components values to be repasted in edit mode

    thanks!
     
  28. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hi!

    For now, rays visualization works only in play mode. Actually, it's a really good idea, I'll try to make a "simulate" option akin to Shuriken.
     
  29. foxking0416

    foxking0416

    Joined:
    Nov 6, 2014
    Posts:
    1
    Hi, I am very interested about this asset.
    However, the required version of Unity is 4.5.5 and my version is only 4.5.3.
    Will that be a problem to use your asset?
     
  30. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hi.
    ArcReactor is compatible with older versions of Unity up to at least 4.3, probably lower.
    I'll try uploading upcoming versions from older Unity builds so there's correct required version displayed.
     
  31. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    I'm running it on Unity 4.3.4 and it works fine. I think I just had to download it inside unity 4.5, export the package and import int 4.3
     
  32. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    @CatsPawGames
    Is there a way to trigger an arc to begin, and it will continue to run until you trigger it to end? For example what if we wanted to have a switch in our game that the player presses and a laser beam shoots out and is on until the player switches it back off? As of now all I can see is how to trigger a ReactorLauncher which just plays onces and can't be sustained indefinately.
     
  33. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    After you trigger your ray, you can set "freeze" public variable to "true", which will freeze the current lifetime status of ray. It will not move along it's lifetime, but will be affected by oscillations and randomizations. You can also set "lifetime" variable by your script for precise control. When you need your ray to disappear, set "freeze" to "false", and it will continue moving along its lifetime, and will destroy itself depending on playback settings.

    Edit: All of the above is concerning ArcReactor_Arc class. To get current Arcs of Launcher, use ArcReactor_Launcher.Rays.
     
    Last edited: Nov 9, 2014
    rxmarccall and hopeful like this.
  34. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Version 1.4b uploaded to Asset Store, containing some fixes of shape points and physical propagation functionalities.
     
  35. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Version 1.4b is available on Asset Store.
     
  36. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Coming in version 1.5:
    - animated noise textures
    - more ready prefabs (fire & ice rays)
    - easy end-ray particle system placement and control
     
    hopeful likes this.
  37. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    I'm accepting requests for ready-to use prefabs right now: post a description/screenshot/video of desired ray effect, and I'll try to include it in the next version of ArcReactor.
     
  38. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Still accepting requests for effects to include in next version during next week. After that the 1.5 version will be uploaded to asset store.
     
  39. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78
    Hello,

    Could you provide an example of shooting N arcs each in a different direction?
    E.g. shoot arc at 0,45,90... degrees, while shooting for 5 sec. and rotate them.
    maybe its really simple to vconfigure but i haven't dived into arc yet...
    tnx in advance,
    greetz,
    g
     
  40. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hi. Easiest way to do that would be place N launchers and aim them in desired directions. Then just invoke "Launch" method on all of them.

    You can automate placing of Launcher in your own script, just make prefab with set-up Launcher and instantiate it N times, rotating each launcher by N*x degrees.
     
  41. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78
    Ok,
    tnx.
    Greetz,
    g
     
  42. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
  43. jrhtcg

    jrhtcg

    Joined:
    Jul 13, 2013
    Posts:
    34
    Thanks for the great asset. I have purchased it recently, and am having a lot of fun trying to learn how to use it. I have been getting a lot of good results, but I have run across a problem that I can't figure out the solution for.

    I am using ArcReactor_Arc to try and simulate a rocket engine thrust. I can get pretty close to what I am looking for with the emit component, until I move my game object. For some reason the emit part of the ray does not seem to like it when I move the game object. As the game object moves away from the starting location the emit particles no longer emit from the correct location. If I move the game object closer to the starting point the particles start working correctly again.

    Is ArcReactor_Arc the correct component to use for something like this, or should I look at one of the other scripts?
     
  44. jrhtcg

    jrhtcg

    Joined:
    Jul 13, 2013
    Posts:
    34
    I should add that I can work around the rocket engine thrust issue with a separate particle system that is not tied to the ArcReactor, but all of my rays will be coming from my vehicle while moving. I will still need to figure out a way to have them emit particles if possible. Thanks in advance.
     
  45. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hi.

    It's certainly quite unorthodox use of component, but whatever works I guess. I never expirienced the issue you described, but my first guess is it's due to interframe interpolation(ArcReactor saves vertices of arcs from previous frame and interpolates emission shape between current and previous frame to make emission smoother).

    Can you send me part of your project where this issue shows? It'll be faster to diagnose and fix this bug that way. My email is in AssetStore publisher's profile.
     
  46. jrhtcg

    jrhtcg

    Joined:
    Jul 13, 2013
    Posts:
    34
    I will try and create a sample with the issue in it, and will send you that. Yeah, the idea for the thruster engine was just out of a need for my game. It is not really what I bought your system for. Thanks
     
  47. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    A little preview of fire ray that'll be avaliable in 1.5 version:
    fire_WIP.jpg
     
  48. Keldrin

    Keldrin

    Joined:
    May 27, 2013
    Posts:
    9
    First, love the asset! Definitely one of the better Asset Store purchases I've made.

    I had a few questions (or possibly feature requests):

    1. Is there a way to specify what gameobject.layer and (to coexist with 4.6+ sprite's draw order) renderer sorting layer/order for the instantiated visual components? It'd be great to either be able to choose the layer(s) for the instantiated lines, particles, etc. or at least have them all inherit the layer of the original ArcReactor_Arc's gameobject.

    For the renderer sorting layer/order, being able to choose that would be nice. While debugging, I added the following into ArcReactor_Arc to get the arcs to show up in my scene, which uses multiple cameras rendering different gameobject.layers, and has sprites that were rendered in front of the arcs by default. The other elements like particles and flares don't show up, but I'm sure setting their layers/sort settings would fix that too:

    lrends[n].sortingLayerName = "player";
    lrends[n].sortingOrder = 100;
    lrends[n].gameObject.layer = 9;

    2. When using the prefabs supplied, such as LightningRay_spiral, they look fine in a new scene. When I add them to my own scenes which have different camera settings/scale, the rays render very thin/small, so much so that you can't see the nice detail of the rays. What are the right knobs/settings to change the overall scale of the ray to overcome this? I know stuff like particle systems won't scale properly and I'll have to go and tweak those directly, but for the width and shape of the rays, I'm hoping I can just set some global scale setting.

    Thanks again, looking forward to 1.5!
     
  49. CatsPawGames

    CatsPawGames

    Joined:
    Jun 4, 2014
    Posts:
    443
    Hello and thanks!

    1.It's actually a very good point about layers and sorting order. There's no mechanizm in place for that in current version, but I'll add it in the next version. It seems you figured out how to change these parameters for linerenderers. Particles is easy - just change particles prefab, as for flares, I think you can add code similiar to your example with objects startFlare and endFlare.

    2. For now you can't scale ray as a whole since perceived size of the ray is affected by several unrelated settings. Main ones are:
    - Thickness of arcs is controlled by Width Curves(start and end) in the "Size options" of the arc settings.
    - Distance of child arcs from main one is controlled in oscillation("scale" variable) and randomization("amplitude" variable) options.
    - Particles is controlled by particles prefab(particle size and speed etc.) and Radius Coef curve in "Emission options"(since emission shape depends on ray width, theoretically you don't have to touch that curve when changing size)

    I'm playing with the idea of global ray size, but it's quite tricky.
     
    Last edited: Jan 9, 2015
  50. Keldrin

    Keldrin

    Joined:
    May 27, 2013
    Posts:
    9
    Fantastic, thanks for the quick answers. I was able to get the flares working as well, and tweak the settings and the particle prefab to get a reasonable scale for my project.

    One other observation; I was spawning the arc prefab itself without a position (so it instantated at 0,0,0) but my start and end transforms were something like (-40,-10,0) and (-15,15,0). When the arc ray instantiates, the particle system started drawing from the arc origin before moving to the start transform, so there's particles strewn between (0,0,0) and (-40,-10,0). I alleviated this by just moving the arc prefab instance to the same location as the start transform, but am I missing something? It seems the particle system should be instantiated at the start transform to avoid this.