Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

[Released] Procedural Indicators (3D arrows at runtime)

Discussion in 'Assets and Asset Store' started by Cogo-Emir, Jan 4, 2018.

  1. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    Greetings unity community,
    This is the forum for package Procedural Indicators.
    You can find the package here.

    Procedural Indicators package is for ingame 3D UI indicators. For now it supports procedurally generated 3D arrows, selection paths, 3d grids and ability to slice a grid into cell regions and then color them. This is useful for rts, puzzle, turn based games, trading card games ui, especially for game tutorials.


    Features 1.4
    - Describe arrow path and look using parameters (path, size, colour, shape, level of detail along path)
    - Describe arrow tip path and look using parameters (path, size, colour, shape, level of detail along path)
    - Arrow tips on both ends of the arrow
    - Arrows made of custom meshes (array of spheres or any custom mesh, etc..)
    - Broken arrows (Dashed) (- - - - - - - >)
    - Demos Include examples of changing these parameters over time (at runtime) to animate the arrows
    - Selection Indicators

    - Grid Indicators
    - Mesh Grid Indicators



    What would be the features/indicators you would be most interested in.
    Please share your thoughts about this project, any suggestions are welcome.
     

    Attached Files:

    Last edited: Mar 27, 2019
  2. RealityDotStop

    RealityDotStop

    Joined:
    Mar 4, 2013
    Posts:
    42
    This actually looks pretty good, and is potentially the exact piece I need! Any future plans for it? I'd hate for something this promising to be stillborn.
     
  3. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    Hello,
    Thanks for the feedback. If you have any specific indicators that you would like to see incorporated into this package please tell me.
    Project is still ongoing. Updates are made in a following process Code-> Demo that shows all features -> Bugfixes-> DocUpdate
    Right now selection paths are in the creating demo phase.
    Selection circles can be fullpath, broken, and made of shapes just like arrows.
    They can have circular path, square path, custom path (later update will add auto outline caluclator path).
    All paths can project to ground (or any other object with colliders)
    upload_2018-3-16_10-55-23.png
    upload_2018-3-16_11-0-34.png
    Update after that will be wysiwyg editor for paths (arrows and selection).

    After that i was thinking to make either area of effect (Explosion) indicators or mesh placement indicators (Placing buildings in rts).
     
  4. RealityDotStop

    RealityDotStop

    Joined:
    Mar 4, 2013
    Posts:
    42
    Fantastic! There doesn't appear to be anything else on the asset store that does this, so don't get discouraged! I'm just getting started with it, but that sounds great to me. I'll try to give more feedback once I have the chance to use it!
     
  5. RealityDotStop

    RealityDotStop

    Joined:
    Mar 4, 2013
    Posts:
    42
    One quick idea, is there a way to a "made of shapes" point array path, but rather than having a shape at a fixed distance, it instead places a shape at each point in the array? I'm working with a hex grid, and so have irregular distances between my tiles. I can work around it for now (by using another path type, or defining the custom distance array each time), and I know it would only be valid for a one specific path type (wouldn't really work for function), but it would be useful.

    In the meantime, things are going pretty well!
     
  6. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    Will add that option it in the next version, for now you can use script with same made of shape object x number of points (number of instances of different object) then set the distance for each object. If its the same object it should reuse it. Will test this tommorow.
     
  7. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    Checked, it turns out every custom shape regenerates. If it is not a big number of points it should still be fine.
    If you run into performance issues you can transfer for loop in line 443 to your script and call it only once.
     
  8. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    New version has been submitted. It includes a new feature selection paths. Selection paths have similar options like arrow paths but are closed and can project to ground. They can be used to select objects or to define a region on terrain.

    Also made of shapes arrows now have an option AtPathPoints that will generate shapes at each path point rather than the fixed distance as PixelHero suggested
     
  9. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    New version has been submitted. Arrows can now use path arrays which enables them to be projected on ground like selection circles. Added a shader that is much brighter and it is not effected by light. Fixed normals on all shapes. Added a flat shade extrude for arrows.
    Working on next version that will have a 3d mesh grid placement indicator.
     

    Attached Files:

  10. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    Version 1.3 of procedural indicators has been published to the Asset Store (Pending review, will be released soon)
    All procedural meshes, arrow paths, tips patharrays are now drawn in the scene (when selected OnSceneGUI()).
    It is also posible to save them as pernament meshes.
    New features look like this

    Grid mesh indicator is still in progress. It will enable colloring the specific part of mesh in a grid for placement in the 3D world. Currently struggling with shader limitations for a maximum 10*10*10 grid.
     

    Attached Files:

    • Grid.png
      Grid.png
      File size:
      249.9 KB
      Views:
      674
  11. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    Website with tutorials, demos and manuals is live http://www.cogobyte.com/
    Hopefully 1.3 version will be live soon.
     
  12. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    Version 1.3 has been accepted
     
  13. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    New Version 1.4 has been submited with two new indicators: Grid Indicator and Grid Mesh Indicator
     
  14. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    For those having problems with LWRP.
    Procedural indicators meshes have vertex colors.
    Standard shader cogobyte is used to render these vertex colors.
    Lwrp doesnt work for standard shaders. You need lwrp shaders.
    Any lwrp shader that uses mesh vertex colors will do.
    Until the next version of Procedural Indicators you can use one of the several lwrp shaders that are provided in the attachments.
    You will probably want to use the Transparent version as it looks best (most similar to the old cogobyte shiny SRP shader), opaque is darker and use it you don't want the arrows to be see through. Bright uses both emission and albedo from vertex colors. Just drag all the downloaded shaders to project and switch them on the material you are using for the arrow.
    Currently, these shaders are either opaque or transparent. They cannot have gradient transparency.
    These shaders (or improved versions of them) will be in the next version of Procedural Indicators.
     

    Attached Files:

  15. Occuros

    Occuros

    Joined:
    Sep 4, 2018
    Posts:
    284
    Greetings,

    I just tried to use the current release at it appears to have some compile errors due to the API changes of the Handles.

    Will there soon be an updated version released to the store which makes the asset compatible again with the latest releases of unity?
     
  16. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    I'm working on a larger update (complete rework of the arrow system) that will also work for urp and hdrp for version 2020.3 LTS+
    I will need a month or two to complete everything and test and wait for asset store confirmation.
    The project will switch from scriptable objects to pure prefabs with scripts, with better UI for in editor editing which will make it easier for non programmers. New code won't be backward compatible with the older version (it's a big jump from unity 5.4 to 2020.3).
    The most important thing is that the project is not dead, and will be much more usable.

    Meanwhile, I will set the fix for handles here for you so it has no compile errors.
    These boxes are just points used to visualize vertices. So if you just remove them, the arrows will compile and work but you will not be able to preview their vertex shape before the arrow is rendered at runtime. Also, you will not be able to see the points of the path.
    I need to find the replacement function for this and will post it here.
    Just for reference which version of unity are you using?

    Kind regards,
    Cogo Emir
     
  17. Occuros

    Occuros

    Joined:
    Sep 4, 2018
    Posts:
    284
    Thank you @Cogo-Emir

    I'm currently using 2020.3.x LTS, and glad to hear it's still actively worked on!


    I managed to replace some of the handles functions with

    CubeHandleCap


    Looking forward to the updated version!
     
  18. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    I fixed the compiling issues. For everyone having problem with compiling errors these are the things you need to fix.
    Replace the SceneView.onSceneGUIDelegate with SceneView.duringSceneGui. These are given as warnings.
    Replace the compiling error lines of Handles.DotCap with Handles.DotHandleCap
    Replace the compiling error lines of Handles.CubeCap with Handles.CubeHandleCap and as a last parameter add EventType.Repaint.

    Demos work correctly after these changes.
     
  19. Bigbigvagg

    Bigbigvagg

    Joined:
    Mar 29, 2021
    Posts:
    1
    just an idea maybe add arrow like the ability indicators from league of legends they look great upload_2021-7-24_14-11-47.jpeg
     
  20. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Hello,

    is there any news on the update for HDRP? I'm very interested :)
     
  21. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    After the release of the new system (new way of working with arrows), I will make a game-ready arrow pack (a bunch of pre-edited prefabs arrows for quick start) and I might add several stylized arrows that look fancy.

    I could make stretchable arrows with detailed patterns like these but they will not look good for all path types (they can look ok if they are either straight or over a smooth path with no sharp turns). Also, new system has better uv management that enables better texturing so arrows might have images along the path that would add to the detail.

    The good thing about the new system is that you can have multiple materials on the arrow so for example, you can make a bordered arrow with one material for borders and one outer material like in the image (WIP).
    upload_2021-8-9_22-58-5.png
    Also the extruded outline doesn't have to be a closed shape anymore so you can do things like this
    upload_2021-8-9_22-58-35.png

    As for the info on the hdrp update.
    It will be released in the next version. I was too optimistic with my previous estimate as I'm still stuck with UI (it will take some time) for the editing of the arrows and bugs with all combinations of settings. I will break the update into smaller chunks so I can release the first versions earlier.
    The first version has 2 path types: the point path and point path with editable orientation of the arrow.
    Arrow can have Extruded Tip And Standard, Dashed and Shape Body with multiple materials and editable colors. Also, a path can combine multiple different arrow bodies: standard dashed and shape bodies along path within the same arrow.
     
  22. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Thanks for the update, I'm looking forward for the HDRP update, I'll buy your asset in a blink, it's exactly what I need
     
  23. mertkalak

    mertkalak

    Joined:
    Nov 28, 2019
    Posts:
    4
    Hello! I see that URP support will come with the next update.. Is there a workaround to use the package in a URP project currently? I'm looking forward to the next version btw... Thanks in advance.
     
    Last edited: Sep 28, 2021
  24. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    The current and future code generates a mesh with vertex colors. You can render it with whatever Shader you want that renders vertex colors. In the attachment are several example shaders (Unity 2020.3.10f1) for URP. For SelfLitShader best options are EmissionFactor = 1, Rim =0.8 and BaseColorFactor = 0
     

    Attached Files:

  25. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    New version 2.0.0 has been uploaded to the asset store. It is currently pending review and after it has been approved it will be available.
    New trailer with features

    New demo http://www.cogobyte.com/smartArrowDemo.html
    Arrows look much better now that the outlines have sharp edges and correct normals.
    Customization has many more options (multiple bodies, materials, coloring, you are able to control the orientation of the arrow and the resulting mesh can be immediately viewed while editing in editor mode now.
    The new architecture will enable faster updates because it's much more maintainable now.
    Future updates will have a transfer of grid and selection indicators and I will add a few simple arrows that don't have so many customization options for easier setup and quickstart.

    Also you can still use the old architecture for things you already made. The old one has been updated to work for unity 2020 LTS.
     
  26. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    For anyone having error popup in the editor in 2021.3.2f1 when selecting template objects in the demo. Replace the OutlineBodyRendererEditor under Cogobyte/SmartIndicators/Script/Editor.
     

    Attached Files:

  27. Matt-Voda

    Matt-Voda

    Joined:
    May 12, 2016
    Posts:
    3
    I'm receiving an error when adding CustomMesh.cs to a 3D gameobject.

    "Can't add script behavior CustomMesh. The script needs to derive from Monobehavior!"

    The classname matches the filename.

    Unity 2021.3.11f
    Procedural Indicators version 2.0.0
     
  28. Cogo-Emir

    Cogo-Emir

    Joined:
    Dec 9, 2012
    Posts:
    25
    Can you elaborate more what are you trying to accomplish, i will try to find a proper solution. There shouldnt be a reason to put custom mesh script on objects, it is a structure.