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
0
Question by solidsnake530 · Feb 07, 2018 at 02:35 PM · shadercubemove an objectvoxel

Believable cube destruction, with voxels or otherwise

Hi,

I'm currently working on an application where a user can chip away at a block that can be moved around. The aim is to have believable looking modification of the block (i.e. hitting the block with a circular hammer will produce a circular hole).

The main problem I have is that I'm making the block out of smaller blocks, however, as this needs to run on the HoloLens, the block is very low resolution (12x12x12) so doesn't produce believable shaped holes.

I did have a system previously where I could render a block of a much higher resolution (50x50x50, still not quite high enough), however since it relied on the SetActive command to hide blocks that weren't visible, moving the block around was not possible. I've reduced the load somewhat by having no rigidbodies and using raycasters to destroy the small cubes that make up the block, but according to the profiler it's the combination of tracking the block and rendering the cubes that is slowing the application down.

A method that was suggested to me was to "fake" the destruction using shaders to make it look like the block had been modified, but I'm not sure how that would work.

For reference, the system I'm currently using is based off this tutorial:

Video and GitHub

I have modified it for my own needs (the object culling had to be completely removed) but I'm not sure this is the way to go. A lot of tutorials are more focused on random terrain generation, and this isn't quite what I'm trying to do.

Should point out that any sort of cool destruction physics is beyond the scope of what I'm trying to do, literally just making a hole appear at the correct size and depth is good enough.

Any help would be greatly appreciated!

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 · Feb 07, 2018 at 03:41 PM 1
Share

You may want to use voxels with values other than binary (kind of a distance field, when you damage you reduce it's "health" based on the distance of the attack), then generate an isosurface (eg. using marching cubes algorithm, and smoothing the surface using the distance field). Similar techniques are used for visualizing $$anonymous$$RI volumetric data

0 Replies

· Add your reply
  • Sort: 

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

124 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

Related Questions

How to render a Cube using Shaders? 0 Answers

Cube botttom transparent with shader? 1 Answer

How to achieve the shader used in MagicaVoxel? 2 Answers

Shader to change Vertex Colors 0 Answers

Shader works only on Cubes properly (Alpha problem) 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