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 siaran · Mar 01, 2015 at 09:12 PM · graphicsparticlesystemlinerenderer

3D Space Gun Pulse Laser Graphics

I'm working on a space game, and I was wondering, what is the best way to create the graphics for all those bright-colored glowing energy weapons that sci-fi spaceships shoot at eachother?

Specifically, I mean the sort lasers you see here (game is Freelancer if you're curious): sadly, this is not my game

If I just use a linerenderer, it's very flat and rectangular - especially when viewed from the front or behind instead of the side, so that doesn't work. My next idea was to use a particlesystem, but it always looks weird at the part where the particles spawn, and it doesnt look nice from the front or back either. I've tried using a quad or particlesystem as a billboard with a trailrenderer, too, best result so far but it still seems off. Using a full cilinder or capsule mesh also looks weird and just seems wrong, too.

So yeah, I'm (still) stumped this one, would love to hear some thoughts.

freelancer-by-bloknayrb.jpg (124.4 kB)
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 hyperi0n · Jan 10, 2016 at 08:22 AM

I faced the same issue a long time ago in a game-engine far far away.. but the basic idea will also work in Unity. Note that I was really noob when I came up with it, so there may be radically better solutions out there that I don't know of.. but here's what I used and it always served me well:alt text

It's a simple setup using three textured quads. It works OK with only the first two quads, but will give bad results when looking directly at the laser bolt from the front or back. So I add the third quad which always needs to face the camera like a billboard (you may need to add a script to tell it to ignore/override it's parents rotation so that it faces the cam). Note, you may also try and fade this third quad in/out depending on the angle the camera is looking at the bolt, so that it's invisible when looking from the side and fades in the more "from-the-front" you look at it, to give it a kind of lense-flarey look :)

Obviously the graphics used in the example are ugly (esp. for the 3rd quad :D ) Didn't have access to my old files when writing this.

Hope this helps you out and looking forward to what other people have come up with :)


laser-bolt-instructions.jpg (119.9 kB)
Comment
Add comment · Show 1 · 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 bluescr · Jan 10, 2016 at 02:01 PM 0
Share

You can improve upon this a little by adding a couple of extra planes (4 quads, rotated 45 degrees each), and then writing a vertex shader that fades out the most edge-on planes based upon their normals. (dot product of world-space normal and direction to the camera, with a scale/bias to tweak the fade)

avatar image
0

Answer by Stefan02 · Jan 10, 2016 at 07:21 AM

Maybe you can use this :https://www.assetstore.unity3d.com/en/#!/content/29160 It's not something special but anyway it's good;)

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

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

25 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

Related Questions

Raycast trail renderer? 3 Answers

LineRenderer Distortion 2 Answers

jiggly beam like tf2 medi gun? 1 Answer

Rendering Particle Systems to Command Buffer 1 Answer

Draw Particle System Over a Line Renderer? 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