Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by timvisee · Jun 29, 2013 at 12:22 AM · c#shaderblurtrailrenderertrail

Can I make a trailrenderer with a blur effect?

Hello,

I'm working on a bullet trail script. I'm currently using a trail renderer to achieve the effect of a bullet trail. What I would like to know, if there's any way to give that trail a 'blur' effect (more realistic version of a bullet trail), it's like the motion blur effect, but then in one line behind the bullet. I'm hoping this is possible using a custom shader or something similar, but I haven't worked much with shaders before. Does anybody know how to achieve this, or if this is even possible?

Btw, I'm using the C# language, but if anybody knows how to achieve this using JavaScript/UnityScript, I'm able to convert it to C# myself.

Thanks in advance, Tim Visée

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Sprakle · Jun 29, 2013 at 04:13 AM

If you just want a trail that doesn't have a hard edge, you can use a material with a particle shader and a transparent texture.

Comment
Add comment · 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
0

Answer by Kiloblargh · Jun 29, 2013 at 03:34 AM

I think what you need to do is apply a mask material to the trail renderer (use teh googles) that will keep everything behind the trail from rendering; in your top, non-blurred, non-clearing camera. Then have a bottom camera that is exactly the same except for a full screen blur effect, and exclude the trail renderers from that camera.

If you wanted to then get fancy you could also maybe add lights or particles or some kind of tapered object with cubemap refraction to the back of the bullet and exclude them from the top camera, so they will appear only in the blurred trail.

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 timvisee · Jun 29, 2013 at 10:13 AM 0
Share

Do you have an example script, I don't see to understand it, I'm sorry. (If you have any, I prefer C#, but JavaScript is fine too)

Tim Visée

avatar image Kiloblargh · Jun 29, 2013 at 04:16 PM 0
Share

There's really no scripting involved in the approach I described. Also, I can't test it because I don't have Pro. Depth$$anonymous$$ask shader Camera docs

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

16 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

Related Questions

Multiple Cars not working 1 Answer

Trail Renderer Getting Wrong Rotation 1 Answer

Distribute terrain in zones 3 Answers

Detect closed loop in TrailRenderer and get gameObjects inside 2 Answers

How to force a trail renderer to re-render in the same frame? 0 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