All Projects → Whinarn → Meshdecimator

Whinarn / Meshdecimator

Licence: mit
A mesh decimation library for .NET and Unity.

Projects that are alternatives of or similar to Meshdecimator

Unitypausemenu
This is an open source Unity pause menu created for the game New Horizons, and it's completely free because of how a pause menu is a core component of a game, while the unity asset store was lacking in such an asset (until this was released on the asset store).
Stars: ✭ 160 (-35.74%)
Mutual labels:  unity, dot-net
Scriptablerenderpipeline
Scriptable Render Pipeline
Stars: ✭ 2,639 (+959.84%)
Mutual labels:  unity
Mesh Cutter
Simple mesh cutting algorithm that works on simple 3d manifold objects with genus 0
Stars: ✭ 237 (-4.82%)
Mutual labels:  unity
Midianimationtrack
SMF (.mid) file importer for Unity Timeline
Stars: ✭ 243 (-2.41%)
Mutual labels:  unity
Roboleague
A car soccer environment inspired by Rocket League for deep reinforcement learning experiments in an adversarial self-play setting.
Stars: ✭ 236 (-5.22%)
Mutual labels:  unity
Cosinegradient
Cosine gradient generator for Unity
Stars: ✭ 244 (-2.01%)
Mutual labels:  unity
Reeseunitydemos
Unity packages and demos—emphasizing ECS, jobs and the Burst compiler—by me, Reese.
Stars: ✭ 232 (-6.83%)
Mutual labels:  unity
Edgedetect Postprocessingunity
Unity legacy Edge Detect image effect ported to Post Processing Stack v2
Stars: ✭ 246 (-1.2%)
Mutual labels:  unity
Cradle
Play Twine stories in Unity.
Stars: ✭ 242 (-2.81%)
Mutual labels:  unity
Edgar Unity
Unity Procedural Level Generator
Stars: ✭ 237 (-4.82%)
Mutual labels:  unity
Unitysizeexplorer
Visualize how much space each asset in your Unity game takes and quickly optimize your game's file size
Stars: ✭ 242 (-2.81%)
Mutual labels:  unity
Fusion
Unity Physics on GPU
Stars: ✭ 236 (-5.22%)
Mutual labels:  unity
Alloy
Alloy physical shader framework for Unity.
Stars: ✭ 244 (-2.01%)
Mutual labels:  unity
Proceduralterrain
Procedural voxel terrain generation in Unity
Stars: ✭ 237 (-4.82%)
Mutual labels:  unity
Gameframework
This is literally a game framework, based on Unity game engine. It encapsulates commonly used game modules during development, and, to a large degree, standardises the process, enhances the development speed and ensures the product quality.
Stars: ✭ 3,318 (+1232.53%)
Mutual labels:  unity
Smart Hierarchy
Better hierarchy for Unity.
Stars: ✭ 234 (-6.02%)
Mutual labels:  unity
Ezsoftbone
A simple kinetic simulator for Unity, you can use it to simulate hair/tail/breast/skirt and other soft objects
Stars: ✭ 241 (-3.21%)
Mutual labels:  unity
Unity Shader Basics Tutorial
A introduction into creating shaders for Unity
Stars: ✭ 243 (-2.41%)
Mutual labels:  unity
Cms
SS CMS 基于 .NET Core,能够以最低的成本、最少的人力投入在最短的时间内架设一个功能齐全、性能优异、规模庞大并易于维护的网站平台。
Stars: ✭ 2,925 (+1074.7%)
Mutual labels:  dot-net
Osmtrafficsim
TrafficSim using Unity ECS 2019.3
Stars: ✭ 246 (-1.2%)
Mutual labels:  unity

MeshDecimator (Archived)

A mesh decimation library for .NET and Unity. The project is written entirely in C# and released under the MIT license.

WARNING: This repository has been archived in favor of UnityMeshSimplifier, which includes a more updated version of this algorithm for the Unity game engine. This means that I'm dropping the .NET support outside of Unity due to not having the time to maintain two libraries that includes almost the same code. Anyone who wishes to continue on this project is free to do so under the current license.

Compatibility

This provided Unity Example project is currently compatible with Unity 2018.1.2f1

This does not in any way limit the code to that specific Unity version however, but you might have to modify some Unity API usage.

Prerequisites

The following must be installed before this repository can be properly cloned:

Installation into Unity

After building the project, copy over MeshDecimator.dll and MeshDecimator.xml into your Unity project, anywhere within your Assets directory (for example Assets/MeshDecimator). It is strongly recommended to build the C# project over copying the binaries found in the Unity Example project.

In the provided Unity example in this repository you can find examples of how to use the mesh decimation from Unity.

Fast Quadric Mesh Simplification Algorithm

MeshDecimator uses an algorithm based on the Fast Quadric Mesh Simplification algorithm, completely rewritten in C#. Currently it is the only mesh decimation algorithm available to use.

The Smart Linking feature

In order to solve artifacts in the mesh simplification process where holes or other serious issues could arise, a new feature called smart linking has been introduced. This feature is enabled by default but can be disabled through the EnableSmartLink property on the FastQuadricMeshSimplification class. Disabling this could give you a minor performance gain in cases where you do not need this.

The VertexLinkDistanceSqr property on the FastQuadricMeshSimplification class could be used to change the maximum squared distance between two vertices for the linking. The default value is double.Epsilon.

My decimated meshes have holes, what is wrong?

The original algorithm that was ported from C++ did not support situations where multiple vertices shared the same position, instead of being treated as one vertex they were treated individually. This would then end up creating visible holes in the mesh where the vertices were not connected through triangles.

There are several ways to solve this problem. The smart linking feature (mentioned above) is enabled by default and should take care of most of these problems for you. But there are also options to preserve borders, seams and UV foldovers. The properties PreserveBorders, PreserveSeams and PreserveFoldovers will preserve some vertices from being decimated, strongly limiting the decimation algorithm, but should prevent holes in most situations.

The recommendation is to use the smart linking feature that is enabled by default, but the options for preservation exists in those cases where you may want it.

Credits

The teddy bear model in the Unity example project is from the following package from Unity Asset Store: https://assetstore.unity.com/packages/essentials/tutorial-projects/mecanim-example-scenes-5328

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].