All Projects → ElasticSea → unity-fracture

ElasticSea / unity-fracture

Licence: MIT license
Fracture any mesh at runtime

Programming Languages

C#
18002 projects
HLSL
714 projects
ShaderLab
938 projects

Projects that are alternatives of or similar to unity-fracture

MM.Hash
Profit Switching Miner For HiveOS/Linux- OLD VERSION: Project Moved To SWARM! https://github.com/MaynardMiner/SWARM
Stars: ✭ 17 (-97.32%)
Mutual labels:  nvidia
gnome-nvidia-extension
A Gnome extension to show NVIDIA GPU information
Stars: ✭ 29 (-95.43%)
Mutual labels:  nvidia
TailCalibX
Pytorch implementation of Feature Generation for Long-Tail Classification by Rahul Vigneswaran, Marc T Law, Vineeth N Balasubramaniam and Makarand Tapaswi
Stars: ✭ 32 (-94.95%)
Mutual labels:  nvidia
CuAssembler
An unofficial cuda assembler, for all generations of SASS, hopefully :)
Stars: ✭ 168 (-73.5%)
Mutual labels:  nvidia
Grub-Nvidia-Entry
Enable Nvidia driver only with the last entry in grub.
Stars: ✭ 40 (-93.69%)
Mutual labels:  nvidia
NVTabular
NVTabular is a feature engineering and preprocessing library for tabular data designed to quickly and easily manipulate terabyte scale datasets used to train deep learning based recommender systems.
Stars: ✭ 797 (+25.71%)
Mutual labels:  nvidia
eglfs
🚀 EGL fullscreen platform plugin
Stars: ✭ 21 (-96.69%)
Mutual labels:  nvidia
dofbot-jetson nano
Yahboom DOFBOT AI Vision Robotic Arm with ROS for Jetson NANO 4GB B01
Stars: ✭ 24 (-96.21%)
Mutual labels:  nvidia
grepo
GKISS - A fork of KISS Linux that uses the GNU C library, mirror of https://codeberg.org/kiss-community/grepo
Stars: ✭ 51 (-91.96%)
Mutual labels:  nvidia
tacotron2
Multispeaker & Emotional TTS based on Tacotron 2 and Waveglow
Stars: ✭ 102 (-83.91%)
Mutual labels:  nvidia
nvhtop
A tool for enriching the output of nvidia-smi forked from peci1/nvidia-htop.
Stars: ✭ 21 (-96.69%)
Mutual labels:  nvidia
DistributedDeepLearning
Tutorials on running distributed deep learning on Batch AI
Stars: ✭ 23 (-96.37%)
Mutual labels:  nvidia
installROS
Install ROS Melodic on NVIDIA Jetson Development Kits
Stars: ✭ 75 (-88.17%)
Mutual labels:  nvidia
fedora-prime
Simple program to switch between intel and nvidia gpu
Stars: ✭ 24 (-96.21%)
Mutual labels:  nvidia
faucon
NVIDIA Falcon Microprocessor Suite
Stars: ✭ 28 (-95.58%)
Mutual labels:  nvidia
learn-gpgpu
Algorithms implemented in CUDA + resources about GPGPU
Stars: ✭ 37 (-94.16%)
Mutual labels:  nvidia
Antarctic-fracture-detection
No description or website provided.
Stars: ✭ 23 (-96.37%)
Mutual labels:  fracture
nvidia-video-codec-rs
Bindings for the NVIDIA Video Codec SDK
Stars: ✭ 24 (-96.21%)
Mutual labels:  nvidia
purge-nvda
Optimize external graphics for macs with discrete NVIDIA GPUs.
Stars: ✭ 91 (-85.65%)
Mutual labels:  nvidia
handbrake-nvenc-docker
Handbrake GUI with Web browser and VNC access. Supports NVENC encoding
Stars: ✭ 32 (-94.95%)
Mutual labels:  nvidia

Unity Fracture

preview_github.mp4

FractureThis.cs script takes all meshes in its gameobject and merges them. This global mesh is send to nvblast for fracturing into chunks. The inside part of the chunk has new UVs generated for material to be applied. Original gameobject is hidden and each chunk mesh is converted to gameobject with rigibody. Neighboring chunks are tethered with fixedjoints.

Requirements

How does this work?

  1. Cut the mesh into smaller meshes chunks
  2. Add rigidbody component to each chunk
  3. Connect chunks with fixed joints that break with force

1) Cut the mesh into smaller meshes chunks

I stumbled upon this forum thread https://forum.unity.com/threads/nvidia-blast.472623 where someone figured out how to use Nvidia blast library in the Unity. Feed the library with mesh (must have vertices, triangles, uvs and closed without missing any faces) to this library and receive mesh chunks.

2) Add rigidbody component to each chunk

Convert each mesh chunk into a gameobject with rigidbody. Without anything holding the chunks together they crumble to the ground. Connect the chunks with fixed joints, so they stay in place. Take each chunk and its neighbors (chunks that are in close proximity or in touch) and connect them with fixed joints.

Issue #1 - Structure is wobbly

This is not ideal, the joints are not 100% fixed in place due to how PhysX resolves collisions. There is a big deal of springiness within the joints. The structure ripples when force is applied and acts like a it is made out of jello.

Solution #1 - Freeze rigidbodies

https://answers.unity.com/questions/230995/fixed-joint-not-really-fixed.html advised to freeze the rigidbody. Freezing the rigidbodies makes them stay in place (they drift apart after some time #1) and the rigidbodies still register impact and the joints can be broken.

Issue #2 - Rigidbodies float in the air

Rigidbodies will stay in place even though there is no support under them. They will only resume movement when all joints are broken.

Solution #2 - Introduce anchors

Let's create a graph of connected chunks. Traverse graph each frame and unfreeze chunks disconnected from anchors (kinematic body)

Chunk Graph Anchored chunks are red

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].