Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
5
Question by Ezequiel · Feb 20, 2010 at 06:11 PM · graphicsglass

Shattering Glass

Is it possible to create the effect of glass being broken in Unity 3D?

How would you achieve it?

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 shuvos3 · May 30, 2017 at 09:01 AM 0
Share

You may need to know tons of math!

4 Replies

· Add your reply
  • Sort: 
avatar image
8
Best Answer Wiki

Answer by Murcho · Feb 20, 2010 at 11:13 PM

The easiest way would be to have 2 objects, a solid mesh for your pane of glass, and another mesh that has been broken up earlier. On contact with the glass from a bullet, explosion, punch, etc. you simply swap the meshes, and the second mesh you could place physics colliders on to get a nice effect.

To go all out, you could calculate the breaking of the mesh based on point of impact, which is what a lot of the more advanced games do these days, however it's a larger task that requires a fair portion of maths. Here is a paper on the procedural maths behind creating realistic shattering. As you can see it's quite complicated, however if you have the processing power and the mathematical ability, there is no reason you shouldn't attempt this technique.

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 Ezequiel · Feb 21, 2010 at 11:29 PM 2
Share

I think the simpler idea is enough. But thank you for the paper.

avatar image
4
Wiki

Answer by Jason_DB · Feb 21, 2010 at 02:45 PM

I would just like to add to what Murcho said (his idea is probably the best way) that you could also use a particle effect of glass shards in conjunction with Murcho's idea to make it a little more realistic, also you could make 2 or 3 alternate meshes for the broken glass and pick one of them at random to avoid the appearance of it always breaking the same way without getting into the heavy procedural stuff (if the glass object will be reused enough to make that logical).

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 Ezequiel · Feb 21, 2010 at 11:23 PM 0
Share

Thank you, do you have any references on using particles to simulate glass shards?

avatar image Jason_DB · Feb 22, 2010 at 02:33 AM 0
Share

Sorry, but I've never been particularly great with particle effects; I've only seen it done in other games.

avatar image
2
Wiki

Answer by lollevel · Feb 21, 2010 at 02:12 AM

You could also make the glass with the pieces already separated and each with a rigidbody, then make it sleep with rigidbody.Sleep() and awake it when it was hit (onTrigger for example), but the easier way is just like murcho's said.

have a look at this example by drJones maybe it's what you need

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 EntiTkU · Aug 02, 2020 at 08:30 AM

Ok, but how do i make shattered glass-like mesh? i mean cut in pieces. Any programs other than blender?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

glass sphere material 2 Answers

3D (as in 3D graphics with 3D glasses) 1 Answer

Visibility Analysis from point on terrain 0 Answers

Wondering About Multi-Platform with Multiple Screen Resolutions 1 Answer

Black graphical errors appearing on textures 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