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
6
Question by SrBilyon · Nov 03, 2010 at 08:27 AM · effectblurmotiontrailswing

Best way of rendering a Sword Slash or other Weapon effects?

In many games that have weapons, when they are swung, it has a motion trail/slash coming off of it. I was curious to see if anyone has seen this being done in Unity3D, and if so, how?

alt text alt text alt text alt text

I was wondering, is this something done when creating the model/animation of the character or is it a particle effect/ instanced object? Does anyone have an example or a link that will assist me in doing this?

Thanks!

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

3 Replies

· Add your reply
  • Sort: 
avatar image
5
Best Answer

Answer by jonas-echterhoff · Nov 03, 2010 at 01:48 PM

We implemented something like this in FusionFall. Basically the sword animations would have animation events to turn on or off the trail effects. The sword mesh would contain two transforms which defines the position of the trail, and then a script running each frame would use those two positions to set up a custom mesh for the sword effect.

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 SrBilyon · Nov 03, 2010 at 06:20 PM 0
Share

Cool. I was thinking of using a trail renderer or this: http://www.unifycommunity.com/wiki/index.php?title=Trail_Arc_Renderer

The custom mesh, is it generated by a script, or is it a pre-existing mesh that is activated once the attacker swings his sword. And as far as interpolating the slash effect, is that texture based?

I wish there was an example.

avatar image mecevit · Oct 19, 2011 at 04:48 PM 0
Share

1) Define two virtual points in the local of the sword where the slash effect will start and end

2) Define animation events to start and end slash effect

3) By using the two points (p1,p2), on each update function, add a polygon (vertice points of the polygon are: p1, p2, previous_p1, previous_p2) to a runtime-created-mesh with slash texture applied

avatar image
0

Answer by StephanK · Nov 03, 2010 at 08:34 AM

I don't have an example for you, but I'd try to achieve this with a particle system, that gets instantiated when the animation starts and destroyed once it stops. If you have a 2D game using sprites you would put this into the spritesheet animation. If you have pro this could probably be done as a kind of ImageEffect.

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 gizmosan · Jul 02, 2012 at 10:46 PM

This is concidered kinda hacking from a development stand point :) but I was able to make a dummy GameObject and place a Trail Renderer to it. Then when the character swings its sword the trail renderer shows a trail. Sadly, I was unable to stop the trail from spawning. Maybe you can do that in script. But it looked pretty convincing!

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

2 People are following this question.

avatar image avatar image

Related Questions

motion blur without unity pro 1 Answer

need help with javascript for underwater blur effect 1 Answer

Render to texture, use same texture as input in next render call 0 Answers

How can I create contrail effect of a Specific character or object in motion? 1 Answer

camera blur effect 1 Answer


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