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

Fast Line Renderer

Discussion in 'Assets and Asset Store' started by jjxtra, Apr 25, 2016.

  1. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Greetings! This thread is for the Fast Line Renderer asset for Unity. Download link here: http://u3d.as/nFE
     
    Yuemari likes this.
  2. b4c5p4c3

    b4c5p4c3

    Joined:
    Jan 4, 2013
    Posts:
    537
    Wowo it's a great asset. Windows Phone support is planned??
     
  3. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Bought this yesterday, fast and easy to use.

    I need to draw an arrow but the end cap is scaled to match the line width. Any chance you could make a change to allow this? Perhaps relative scaling of the end cap size, or maybe a checkbox to maintain the relative texture sizes? (I realize this also complicates joined lines, but in my case it would be a single-segment curve.)
     
  4. Yuemari

    Yuemari

    Joined:
    Mar 22, 2012
    Posts:
    3
    Hi,

    Looks great, does it support multiple widths along the same line? (assuming that I have control over the line points, for example to increase the line width in the center of the line and make it thiner at the start and end)

    Also want to know if it can render textured lines.

    Thanks in advance
     
    Last edited: Jun 22, 2016
    ViktorKom likes this.
  5. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    What about circles or arcs?
     
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I threw a silly email at you...
     
  7. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    The selection circles and the movement arcs in this shot are all FLR, and you can put end caps on the lines (my arrowhead offset above ground is still off a bit, you can see it clips into the map surface).

    1.jpg
     
  8. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Thanks for the reply. ;)
     
  9. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Should work out of the box. If not, let me know and I will refund, just send the order number.
     
  10. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Yes to all. Email if you need guidance.
     
  11. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Definitely yes!
     
  12. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    This is the problem with linecaps..



    even the example demo's show problems with the linecaps when you move the camera too close.. from a distance they are ok though.

    Also the prefab for FasterlineRendererCanvas... compared to the demo example for Canvas.. it is missing the 2D Settings and layer sorting?
     
  13. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    How close is your camera? I haven't upgraded in a couple months but in that screenshot I posted last month (European map with the tanks etc) the camera is probably closer to the lines than anything you're likely to see anywhere else.

    Due to a need to simplify frequent interactions with a shader, it was best if my map was 1x1 units, so the camera is always tiny fractions of a unit away from the lines. For debugging I've had it as close as 0.001 units from a line ending and didn't see endcap problems.

    It can be kind of tricky to get the textures right for very close-up work, it may just be a texture issue. I find the endcaps have to be quite a bit smaller (the drawn area, but overall texture dimensions are the same) to look right.
     
  14. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Well different problem here.. all line radius'sss are at 0.05f... unfortunately just to how they work some appear thinner or thicker depending on camera angle and distance... I just removed start/end caps from showing.. problem solved on that on... having them wasn't really needed.. but even so they are a problem if on for me.

     
  15. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Hi there! What is the size of your line cap texture vs. your line texture?
     
  16. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    ooh and in this earlier screen..

    you can see the horizontal linecaps are the ones with a huge difference in size between line width and linecap.. while the vertical lines and linecaps.. actually work fairly well.

    and the above screenshot its the vertical lines that are super thin.. if the caps were on, you would see that difference in size. I guess its because those vertical lines have the bigger distance from start and end vertex position. Seems to stretch the texture
     
  17. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Yes, the line cap textures generally take some tweaking to get right. I made the prebuilt arrow caps in the asset and it took a few rounds of iterating before they worked right.
     
  18. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    scale sizes are all at 1... and just using the default textures

    btw the canvas issue?

    also if using the FLRCanvas.. does that count towards the canvas vertex limit?

    And I'm using the worldspace option (that only works for canvas?).. really I'm wanting to have these lines draw ontop of existing geometry. What would be the best way? 2 cameras where FLrenderer is on one 1 camera? seems kinda messy is there another way?
     
  19. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Are you able to email me the project? I'd like to understand this further and fix it.
     
  20. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Well well well...

    the case of the thick lines... was infact 2 lines just noticed it now :D


    Was adjusting some values colors and vector line positions.. and yeh looks like before things were soo close, my 3d grid generating code was duplicating a few things.. also before the colors weren't transparent which didn't help me notice this issue earlier. so closely together they were :D

    The line caps are still b0rked though, good thing I'm not using those.
     
  21. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    If you can email me the project that would really help fix this.
     
  22. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    It's not your asset that was causing the thick lines, unless you want the project to check the line cap issue? In which case sometime this week I can probably slim it down and email it.
     
  23. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Yes I want to investigate the line caps.
     
  24. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    ok well you might have to investigate the lines aswel



    The vector positions for the corner points are exactly the same (see below), yet seems to be some error in exact positioning with FL.

    I could just not add the 2points on the 3dgrid for the 4 corner edges (like the top/bottom planes and leave the side planes drawing the corner edges instead), but really they should be directly over eachother so much so that that you don't see a gap or thicker lines (obviously with transparency they will appear darker but I could live with that, it makes the corner edges appear more bolder anyway but right now you notice the gaps in between these lines or they appear thicker depending on distance, darker color would be better than either of those cases though)

    I generated list example 3dgrid with all the vector points that get added (can use the example scene you have in FL...)

    Code (CSharp):
    1.  
    2. CreateContinuousLineFromList()
    3.         {
    4.             // reset the line renderer - if you are appending to an existing line, don't call reset, as you would lost all the previous points
    5.             LineRenderer.Reset();
    6.  
    7.             // generate zig zag
    8.             List<Vector3> points = new List<Vector3>();
    9. points.Add(new Vector3(20.5f, 55.5f, 27.5f));
    10. points.Add(new Vector3(11.5f, 56.5f, 27.5f));
    11. points.Add(new Vector3(20.5f, 56.5f, 27.5f));
    12. points.Add(new Vector3(11.5f, 57.5f, 27.5f));
    13. points.Add(new Vector3(20.5f, 57.5f, 27.5f));
    14. points.Add(new Vector3(11.5f, 58.5f, 27.5f));
    15. points.Add(new Vector3(20.5f, 58.5f, 27.5f));
    16. points.Add(new Vector3(11.5f, 59.5f, 27.5f));
    17. points.Add(new Vector3(20.5f, 59.5f, 27.5f));
    18. points.Add(new Vector3(11.5f, 60.5f, 27.5f));
    19. points.Add(new Vector3(20.5f, 60.5f, 27.5f));
    20. points.Add(new Vector3(11.5f, 61.5f, 27.5f));
    21. points.Add(new Vector3(20.5f, 61.5f, 27.5f));
    22. points.Add(new Vector3(11.5f, 62.5f, 27.5f));
    23. points.Add(new Vector3(20.5f, 62.5f, 27.5f));
    24. points.Add(new Vector3(11.5f, 63.5f, 27.5f));
    25. points.Add(new Vector3(20.5f, 63.5f, 27.5f));
    26. points.Add(new Vector3(11.5f, 55.5f, 27.5f));
    27. points.Add(new Vector3(11.5f, 55.5f, 37.5f));
    28. points.Add(new Vector3(11.5f, 56.5f, 27.5f));
    29. points.Add(new Vector3(11.5f, 56.5f, 37.5f));
    30. points.Add(new Vector3(11.5f, 57.5f, 27.5f));
    31. points.Add(new Vector3(11.5f, 57.5f, 37.5f));
    32. points.Add(new Vector3(11.5f, 58.5f, 27.5f));
    33. points.Add(new Vector3(11.5f, 58.5f, 37.5f));
    34. points.Add(new Vector3(11.5f, 59.5f, 27.5f));
    35. points.Add(new Vector3(11.5f, 59.5f, 37.5f));
    36. points.Add(new Vector3(11.5f, 60.5f, 27.5f));
    37. points.Add(new Vector3(11.5f, 60.5f, 37.5f));
    38. points.Add(new Vector3(11.5f, 61.5f, 27.5f));
    39. points.Add(new Vector3(11.5f, 61.5f, 37.5f));
    40. points.Add(new Vector3(11.5f, 62.5f, 27.5f));
    41. points.Add(new Vector3(11.5f, 62.5f, 37.5f));
    42. points.Add(new Vector3(11.5f, 63.5f, 27.5f));
    43. points.Add(new Vector3(11.5f, 63.5f, 37.5f));
    44. points.Add(new Vector3(20.5f, 55.5f, 27.5f));
    45. points.Add(new Vector3(20.5f, 55.5f, 37.5f));
    46. points.Add(new Vector3(20.5f, 56.5f, 27.5f));
    47. points.Add(new Vector3(20.5f, 56.5f, 37.5f));
    48. points.Add(new Vector3(20.5f, 57.5f, 27.5f));
    49. points.Add(new Vector3(20.5f, 57.5f, 37.5f));
    50. points.Add(new Vector3(20.5f, 58.5f, 27.5f));
    51. points.Add(new Vector3(20.5f, 58.5f, 37.5f));
    52. points.Add(new Vector3(20.5f, 59.5f, 27.5f));
    53. points.Add(new Vector3(20.5f, 59.5f, 37.5f));
    54. points.Add(new Vector3(20.5f, 60.5f, 27.5f));
    55. points.Add(new Vector3(20.5f, 60.5f, 37.5f));
    56. points.Add(new Vector3(20.5f, 61.5f, 27.5f));
    57. points.Add(new Vector3(20.5f, 61.5f, 37.5f));
    58. points.Add(new Vector3(20.5f, 62.5f, 27.5f));
    59. points.Add(new Vector3(20.5f, 62.5f, 37.5f));
    60. points.Add(new Vector3(20.5f, 63.5f, 27.5f));
    61. points.Add(new Vector3(20.5f, 63.5f, 37.5f));
    62. points.Add(new Vector3(11.5f, 55.5f, 27.5f));
    63. points.Add(new Vector3(11.5f, 63.5f, 27.5f));
    64. points.Add(new Vector3(12.5f, 55.5f, 27.5f));
    65. points.Add(new Vector3(12.5f, 63.5f, 27.5f));
    66. points.Add(new Vector3(13.5f, 55.5f, 27.5f));
    67. points.Add(new Vector3(13.5f, 63.5f, 27.5f));
    68. points.Add(new Vector3(14.5f, 55.5f, 27.5f));
    69. points.Add(new Vector3(14.5f, 63.5f, 27.5f));
    70. points.Add(new Vector3(15.5f, 55.5f, 27.5f));
    71. points.Add(new Vector3(15.5f, 63.5f, 27.5f));
    72. points.Add(new Vector3(16.5f, 55.5f, 27.5f));
    73. points.Add(new Vector3(16.5f, 63.5f, 27.5f));
    74. points.Add(new Vector3(17.5f, 55.5f, 27.5f));
    75. points.Add(new Vector3(17.5f, 63.5f, 27.5f));
    76. points.Add(new Vector3(18.5f, 55.5f, 27.5f));
    77. points.Add(new Vector3(18.5f, 63.5f, 27.5f));
    78. points.Add(new Vector3(19.5f, 55.5f, 27.5f));
    79. points.Add(new Vector3(19.5f, 63.5f, 27.5f));
    80. points.Add(new Vector3(20.5f, 55.5f, 27.5f));
    81. points.Add(new Vector3(20.5f, 63.5f, 27.5f));
    82. points.Add(new Vector3(11.5f, 55.5f, 37.5f));
    83. points.Add(new Vector3(11.5f, 63.5f, 37.5f));
    84. points.Add(new Vector3(12.5f, 55.5f, 37.5f));
    85. points.Add(new Vector3(12.5f, 63.5f, 37.5f));
    86. points.Add(new Vector3(13.5f, 55.5f, 37.5f));
    87. points.Add(new Vector3(13.5f, 63.5f, 37.5f));
    88. points.Add(new Vector3(14.5f, 55.5f, 37.5f));
    89. points.Add(new Vector3(14.5f, 63.5f, 37.5f));
    90. points.Add(new Vector3(15.5f, 55.5f, 37.5f));
    91. points.Add(new Vector3(15.5f, 63.5f, 37.5f));
    92. points.Add(new Vector3(16.5f, 55.5f, 37.5f));
    93. points.Add(new Vector3(16.5f, 63.5f, 37.5f));
    94. points.Add(new Vector3(17.5f, 55.5f, 37.5f));
    95. points.Add(new Vector3(17.5f, 63.5f, 37.5f));
    96. points.Add(new Vector3(18.5f, 55.5f, 37.5f));
    97. points.Add(new Vector3(18.5f, 63.5f, 37.5f));
    98. points.Add(new Vector3(19.5f, 55.5f, 37.5f));
    99. points.Add(new Vector3(19.5f, 63.5f, 37.5f));
    100. points.Add(new Vector3(20.5f, 55.5f, 37.5f));
    101. points.Add(new Vector3(20.5f, 63.5f, 37.5f));
    102. points.Add(new Vector3(11.5f, 63.5f, 27.5f));
    103. points.Add(new Vector3(11.5f, 63.5f, 37.5f));
    104. points.Add(new Vector3(12.5f, 63.5f, 27.5f));
    105. points.Add(new Vector3(12.5f, 63.5f, 37.5f));
    106. points.Add(new Vector3(13.5f, 63.5f, 27.5f));
    107. points.Add(new Vector3(13.5f, 63.5f, 37.5f));
    108. points.Add(new Vector3(14.5f, 63.5f, 27.5f));
    109. points.Add(new Vector3(14.5f, 63.5f, 37.5f));
    110. points.Add(new Vector3(15.5f, 63.5f, 27.5f));
    111. points.Add(new Vector3(15.5f, 63.5f, 37.5f));
    112. points.Add(new Vector3(16.5f, 63.5f, 27.5f));
    113. points.Add(new Vector3(16.5f, 63.5f, 37.5f));
    114. points.Add(new Vector3(17.5f, 63.5f, 27.5f));
    115. points.Add(new Vector3(17.5f, 63.5f, 37.5f));
    116. points.Add(new Vector3(18.5f, 63.5f, 27.5f));
    117. points.Add(new Vector3(18.5f, 63.5f, 37.5f));
    118. points.Add(new Vector3(19.5f, 63.5f, 27.5f));
    119. points.Add(new Vector3(19.5f, 63.5f, 37.5f));
    120. points.Add(new Vector3(20.5f, 63.5f, 27.5f));
    121. points.Add(new Vector3(20.5f, 63.5f, 37.5f));
    122. points.Add(new Vector3(11.5f, 55.5f, 27.5f));
    123. points.Add(new Vector3(11.5f, 55.5f, 37.5f));
    124. points.Add(new Vector3(12.5f, 55.5f, 27.5f));
    125. points.Add(new Vector3(12.5f, 55.5f, 37.5f));
    126. points.Add(new Vector3(13.5f, 55.5f, 27.5f));
    127. points.Add(new Vector3(13.5f, 55.5f, 37.5f));
    128. points.Add(new Vector3(14.5f, 55.5f, 27.5f));
    129. points.Add(new Vector3(14.5f, 55.5f, 37.5f));
    130. points.Add(new Vector3(15.5f, 55.5f, 27.5f));
    131. points.Add(new Vector3(15.5f, 55.5f, 37.5f));
    132. points.Add(new Vector3(16.5f, 55.5f, 27.5f));
    133. points.Add(new Vector3(16.5f, 55.5f, 37.5f));
    134. points.Add(new Vector3(17.5f, 55.5f, 27.5f));
    135. points.Add(new Vector3(17.5f, 55.5f, 37.5f));
    136. points.Add(new Vector3(18.5f, 55.5f, 27.5f));
    137. points.Add(new Vector3(18.5f, 55.5f, 37.5f));
    138. points.Add(new Vector3(19.5f, 55.5f, 27.5f));
    139. points.Add(new Vector3(19.5f, 55.5f, 37.5f));
    140. points.Add(new Vector3(20.5f, 55.5f, 27.5f));
    141. points.Add(new Vector3(20.5f, 55.5f, 37.5f));
    142. points.Add(new Vector3(11.5f, 55.5f, 27.5f));
    143. points.Add(new Vector3(20.5f, 55.5f, 27.5f));
    144. points.Add(new Vector3(11.5f, 55.5f, 28.5f));
    145. points.Add(new Vector3(20.5f, 55.5f, 28.5f));
    146. points.Add(new Vector3(11.5f, 55.5f, 29.5f));
    147. points.Add(new Vector3(20.5f, 55.5f, 29.5f));
    148. points.Add(new Vector3(11.5f, 55.5f, 30.5f));
    149. points.Add(new Vector3(20.5f, 55.5f, 30.5f));
    150. points.Add(new Vector3(11.5f, 55.5f, 31.5f));
    151. points.Add(new Vector3(20.5f, 55.5f, 31.5f));
    152. points.Add(new Vector3(11.5f, 55.5f, 32.5f));
    153. points.Add(new Vector3(20.5f, 55.5f, 32.5f));
    154. points.Add(new Vector3(11.5f, 55.5f, 33.5f));
    155. points.Add(new Vector3(20.5f, 55.5f, 33.5f));
    156. points.Add(new Vector3(11.5f, 55.5f, 34.5f));
    157. points.Add(new Vector3(20.5f, 55.5f, 34.5f));
    158. points.Add(new Vector3(11.5f, 55.5f, 35.5f));
    159. points.Add(new Vector3(20.5f, 55.5f, 35.5f));
    160. points.Add(new Vector3(11.5f, 55.5f, 36.5f));
    161. points.Add(new Vector3(20.5f, 55.5f, 36.5f));
    162. points.Add(new Vector3(11.5f, 55.5f, 37.5f));
    163. points.Add(new Vector3(20.5f, 55.5f, 37.5f));
    164. points.Add(new Vector3(11.5f, 63.5f, 27.5f));
    165. points.Add(new Vector3(20.5f, 63.5f, 27.5f));
    166. points.Add(new Vector3(11.5f, 63.5f, 28.5f));
    167. points.Add(new Vector3(20.5f, 63.5f, 28.5f));
    168. points.Add(new Vector3(11.5f, 63.5f, 29.5f));
    169. points.Add(new Vector3(20.5f, 63.5f, 29.5f));
    170. points.Add(new Vector3(11.5f, 63.5f, 30.5f));
    171. points.Add(new Vector3(20.5f, 63.5f, 30.5f));
    172. points.Add(new Vector3(11.5f, 63.5f, 31.5f));
    173. points.Add(new Vector3(20.5f, 63.5f, 31.5f));
    174. points.Add(new Vector3(11.5f, 63.5f, 32.5f));
    175. points.Add(new Vector3(20.5f, 63.5f, 32.5f));
    176. points.Add(new Vector3(11.5f, 63.5f, 33.5f));
    177. points.Add(new Vector3(20.5f, 63.5f, 33.5f));
    178. points.Add(new Vector3(11.5f, 63.5f, 34.5f));
    179. points.Add(new Vector3(20.5f, 63.5f, 34.5f));
    180. points.Add(new Vector3(11.5f, 63.5f, 35.5f));
    181. points.Add(new Vector3(20.5f, 63.5f, 35.5f));
    182. points.Add(new Vector3(11.5f, 63.5f, 36.5f));
    183. points.Add(new Vector3(20.5f, 63.5f, 36.5f));
    184. points.Add(new Vector3(11.5f, 63.5f, 37.5f));
    185. points.Add(new Vector3(20.5f, 63.5f, 37.5f));
    186. points.Add(new Vector3(20.5f, 55.5f, 27.5f));
    187. points.Add(new Vector3(20.5f, 63.5f, 27.5f));
    188. points.Add(new Vector3(20.5f, 55.5f, 28.5f));
    189. points.Add(new Vector3(20.5f, 63.5f, 28.5f));
    190. points.Add(new Vector3(20.5f, 55.5f, 29.5f));
    191. points.Add(new Vector3(20.5f, 63.5f, 29.5f));
    192. points.Add(new Vector3(20.5f, 55.5f, 30.5f));
    193. points.Add(new Vector3(20.5f, 63.5f, 30.5f));
    194. points.Add(new Vector3(20.5f, 55.5f, 31.5f));
    195. points.Add(new Vector3(20.5f, 63.5f, 31.5f));
    196. points.Add(new Vector3(20.5f, 55.5f, 32.5f));
    197. points.Add(new Vector3(20.5f, 63.5f, 32.5f));
    198. points.Add(new Vector3(20.5f, 55.5f, 33.5f));
    199. points.Add(new Vector3(20.5f, 63.5f, 33.5f));
    200. points.Add(new Vector3(20.5f, 55.5f, 34.5f));
    201. points.Add(new Vector3(20.5f, 63.5f, 34.5f));
    202. points.Add(new Vector3(20.5f, 55.5f, 35.5f));
    203. points.Add(new Vector3(20.5f, 63.5f, 35.5f));
    204. points.Add(new Vector3(20.5f, 55.5f, 36.5f));
    205. points.Add(new Vector3(20.5f, 63.5f, 36.5f));
    206. points.Add(new Vector3(20.5f, 55.5f, 37.5f));
    207. points.Add(new Vector3(20.5f, 63.5f, 37.5f));
    208. points.Add(new Vector3(11.5f, 55.5f, 27.5f));
    209. points.Add(new Vector3(11.5f, 63.5f, 27.5f));
    210. points.Add(new Vector3(11.5f, 55.5f, 28.5f));
    211. points.Add(new Vector3(11.5f, 63.5f, 28.5f));
    212. points.Add(new Vector3(11.5f, 55.5f, 29.5f));
    213. points.Add(new Vector3(11.5f, 63.5f, 29.5f));
    214. points.Add(new Vector3(11.5f, 55.5f, 30.5f));
    215. points.Add(new Vector3(11.5f, 63.5f, 30.5f));
    216. points.Add(new Vector3(11.5f, 55.5f, 31.5f));
    217. points.Add(new Vector3(11.5f, 63.5f, 31.5f));
    218. points.Add(new Vector3(11.5f, 55.5f, 32.5f));
    219. points.Add(new Vector3(11.5f, 63.5f, 32.5f));
    220. points.Add(new Vector3(11.5f, 55.5f, 33.5f));
    221. points.Add(new Vector3(11.5f, 63.5f, 33.5f));
    222. points.Add(new Vector3(11.5f, 55.5f, 34.5f));
    223. points.Add(new Vector3(11.5f, 63.5f, 34.5f));
    224. points.Add(new Vector3(11.5f, 55.5f, 35.5f));
    225. points.Add(new Vector3(11.5f, 63.5f, 35.5f));
    226. points.Add(new Vector3(11.5f, 55.5f, 36.5f));
    227. points.Add(new Vector3(11.5f, 63.5f, 36.5f));
    228. points.Add(new Vector3(11.5f, 55.5f, 37.5f));
    229. points.Add(new Vector3(11.5f, 63.5f, 37.5f));
    230.  
    231.  
     
  25. swastiksoni

    swastiksoni

    Joined:
    Dec 23, 2013
    Posts:
    9
    Hi there, I am planing to buy this asset to create a real time graph, my worry is, If I use this asset to create lines for graph, I would like to delete the first few lines as the new lines will be added. As the application will be running for long time and the data will be continuously added. is there a functionality to remove lines after its been added.
     
  26. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,549
    This looks interesting since you mentioned this in the other speed and difficulty thread. Does it come with full C# source code? Do you have to do something special for GPU handling and does it automatically fallback to cpu if a GPU is not available?
     
  27. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    It's two shaders (one with glow, one without) so yes it comes with source.
    (What kind of game device wouldn't have a GPU these days?)
     
  28. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,549
    When I think GPU I just naturally think NVIDIA rather the general case. :) In my case I am desktop windows only so I think I should be fine.

    Does it come with any with documentation? I noticed one of the reviews mentioned it did not have docs so I was wondering if that had changed with the most recent update.
     
  29. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    It comes with some demos but last time I checked the docs are just a readme text file. The author is very responsive though, I had a couple simple questions at first and he cleared everything up by email.
     
  30. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,549
    Thanks. It is always good to have responsive developers.
     
  31. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Full C# code is provided. It uses a shader and mesh, so it will do whatever Unity does. I'm not 100% sure if Unity has a CPU mode for GPU operations.
     
  32. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,549
    How does your product compare to vectrosity when it comes to speed?
     
  33. unisip

    unisip

    Joined:
    Sep 15, 2010
    Posts:
    332
    I'm interested in buying your asset, but I have a couple of questions.

    I already have a line renderer code that supports screen space rendered line (think constant line width in screen space) but it is a DX9 shader that requires 2N vertices with postion/normals/uvs/colors per vertex and 2(N-1) triangles for a N point line, as I'm actually drawing quads for each line segment.

    My issue with my renderer is the memory footprint for each line mesh.

    I am looking for a geometry shader based solution that would require less data on the mesh to reduce memory footprint (only send N vertices and have the geometry shader create the quads from that). Is this what your product does ?

    Thanks
     
  34. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    I don't use a geometry shader. The number of vertices would be about the same. So if you have lines that are submitted frequently with different meshes, I don't know how much performance benefit you would get from that specific piece. Fast line renderer does render everything else on the GPU though (glow, rotation, velocity, fade, line join, etc.) so you would get that as a performance benefit.
     
  35. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
    I just bought this and am confused about something. I started with a new scene and I have a FastLineRenderer object and an object with the FastLineRendererDemoList just for testing. At first I simply set the LineTexture parameter, but nothing rendered. Then I saw the Material property so I set it to FastLineRendererMaterial. Then I started seeing lines drawn. However, the Material has a LineTexture parameter of its own as well as all the other line/glow parameters. So, I'm wondering why are there individual parameters in FastLineRenderer when they just get overridden by the material?
     
  36. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    The script properties are added for convenience to change the properties of the material. You are of course welcome to set Material properties directly if you like, but this requires using hard-coded strings.

    It's probably easiest to just drag the prefab into your scene, as it is setup out of the box for rendering.
     
  37. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    I'll second what @jjxtra suggests.

    I tend to create one parent game object and just set up a whole bunch of FLRs under that, which I then reset to hide, or add segments or circles to as needed, all at runtime. This also lets me do things like swap out "effects" with the same sequence of segments or other drawing functions just by pointing my routines at a different FLR.

    I don't normally have much pre-loaded into my hierarchy, I tend to write a lot of code instead, but with FLR I've definitely found it more efficient to work this way.
     
  38. JohnMannn

    JohnMannn

    Joined:
    May 14, 2014
    Posts:
    1
    Hi there, thanks for your great Asset :)

    I have a strange behavior in the Editor with FastLineRenderer.Update(): Each time I start (click play button) my game, the numbers of calls of the FastLineRenderer.Update() is increasing...(seen in the profiler window)

    Say I have 1000 lines at runtime, at the first start the Update() will be called 1000 times and then after stop/start the Update() will be called 2000 times... am I missing someting?

    Im still in unity 5.5 by the way.

    Thanks!
     
  39. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Are you using CreateWithParent anywhere? If so you have to cleanup properly. See the demo scene for an example.
     
  40. NicBischoff

    NicBischoff

    Joined:
    Mar 19, 2014
    Posts:
    204
    Hi there,

    Unity 5.5.3f1 Error on import:

    Assets/FastLineRenderer/Demo/FastLineRendererDemoScript.cs(338,39): error CS1061: Type `UnityEngine.LineRenderer' does not contain a definition for `positionCount' and no extension method `positionCount' of type `UnityEngine.LineRenderer' could be found. Are you missing an assembly reference?

    Assets/FastLineRenderer/Demo/FastLineRendererDemoScript.cs(380,31): error CS1061: Type `UnityEngine.LineRenderer' does not contain a definition for `positionCount' and no extension method `positionCount' of type `UnityEngine.LineRenderer' could be found. Are you missing an assembly reference?

    Ideas?
     
  41. xLkzx

    xLkzx

    Joined:
    May 15, 2017
    Posts:
    1
    Hello, is there a way to remove just a single line from a non-continuous line?
     
  42. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Please update to Unity 5.6.1
     
  43. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    You have to call Reset on the fast line renderer and rebuild the whole line segment. This is a Unity limitation, as Unity requires the entire mesh to be resubmitted even if you want to change just one point.
     
  44. Spiraseven

    Spiraseven

    Joined:
    May 2, 2014
    Posts:
    25
    Hi, I am currently trying to use Fast Line Renderer in a 3D space. I render a bunch of separate lines along a grid with some set height. I am using the distinct segment technique from the FastLineRendererDemoList class to do this. I noticed that as I move my camera around the lines in the world they look like they overlap each other at one angle but from the other side they are correctly rendering in the right order. I am only creating the lines and calling apply once, so maybe the order in which they are rendered initially is the order they will always render. Is there a way around this? I would like the closest line to the camera to render in front essentially. Thanks!
     
  45. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Thanks for the question. Can you try changing ZWrite Off to ZWrite On in FastLineRendererShader.shader? Let me know how it goes!
     
  46. Spiraseven

    Spiraseven

    Joined:
    May 2, 2014
    Posts:
    25
    That solved it for me thanks for the tip! It also made some strange things happen with the caps but I do not need the caps at the moment, it kind of looked like they were rendering as the whole image instead of just the cap part. So I could see the cap and the rest of the square around it.
     
  47. wrench_nz

    wrench_nz

    Joined:
    May 13, 2014
    Posts:
    11
    Built in support for trail renderer and/or do you think manual setting of your line renderer will perform better than unity trail renderer?

    Thanks!
     
  48. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    Depends on the number of lines. For only a few hundred lines, you likely won't see much difference.
     
  49. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,463
    Hi, nice asset :) is there an option with your asset to not show the back faces of objects, in the videos it shows all lines, even for the back part of objects, like a transparency effect.
     
  50. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,453
    You could change the shader to cull back