Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Fabio23000 · Apr 05, 2020 at 03:10 PM · linerendererline

LineRenderer with smoot start/edge

Hello guys. Im trying to make something like this: https://imgur.com/45LjlY1 but the lines I got look like this: https://imgur.com/a/O670GrB It basically makes rhombus, but what I want are round edges and I have no clue how to do it. Any help would be appreciated

Edit: This is what my line renderer looks like. https://imgur.com/a/XqE03HA

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Pangamini · Apr 05, 2020 at 03:49 PM 0
Share

Can you post your material? A screenshot of the inspector would be enough

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by BBIT-SOLUTIONS · Apr 05, 2020 at 05:55 PM

If you just want to have smooth line endings you can increase the value of the End Cap Vertices parameter.

And if the line itself should be more "smooth" you can increase the value of the Corner Vertices.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Fabio23000 · Apr 05, 2020 at 08:41 PM 0
Share

The End cap vertices does what I'd like, but only to the end of the line. And Corner vertices doesn't do something I'm able to see for some reasons.

avatar image BBIT-SOLUTIONS Fabio23000 · Apr 05, 2020 at 09:04 PM 0
Share

ok, i see. So what you try to create is actually a kind of a dashed line, right?

So i guess ins$$anonymous$$d of using only one lineRenderer you should use a separate line for each single "little line" of the whole full line and then combine them. Each single line can then be created with a lineRenderer. Problem is just for your approach, that the lineRenderer component is acutally meant just for continuous lines.

An alternative approach would be maybe to adapt this approach here, which creates a dotted line. $$anonymous$$aybe you could adapt it a bit, so that you use little Lines (with lineRenderer and End cap vertices) ins$$anonymous$$d of the dot-Sprites. (Or alternatively use also a sprite of a short line)

avatar image Pangamini BBIT-SOLUTIONS · Apr 06, 2020 at 08:10 AM 0
Share

you should use a separate line for each single "little line" that sounds like a death sentence for performance

Show more comments
avatar image
0

Answer by Pangamini · Apr 06, 2020 at 08:05 AM

Don't try to create the effect using line's geometry. Use the texture to benefit from thexture filtering and not get the aliasing you are seeing. Actually make the line even wider than the final visual thickness, and make the texture contain the blank edges. This will improve the anti-aliasing properties even further

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Fabio23000 · Apr 06, 2020 at 08:21 PM 0
Share

What do you mean by texture filtering? How can I use the texture? Are you still talking about the LineRenderer?

avatar image Pangamini Fabio23000 · Apr 07, 2020 at 01:06 PM 0
Share

Well, LineRenderer has a material and that material might be using a texture and some transparent shader. Texture filtering is just how the color is sampled from the texture data (texels) and used on the screen pixels. This usually involves trilinear filter, mipmapping and anisotropic filtering. That way you can make the edges smooth. By making the geometry larger and using a texture with transparent edges, you are allowing the filtering to be used on a wider area, not showing any hard edges.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

125 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Drawing a direction arrow. 2 Answers

Move to line 0 Answers

3d object outline shader 1 Answer

How to check of a line renderer collides with ground ? 1 Answer

Easy Line drawing 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges