4
2019
RANSAC 2D Line Fitting
Converted this RANSAC 2D line fitting pseudocode into Unity c# http://www.visual-experiments.com/demo/ransac.js/ What is RANSAC? https://en.wikipedia.org/wiki/Random_sample_consensus Source code:https://gist.github.com/unitycoder/53495435c28853ef6522ff60d5c6a091 *Note this is not optimized at all, just a quick test Usage instructions:– Add this script to empty gameobject– Add gameobjects as a child of that gameobject (place […]
7
2013
Procedural Tree Mesh Generator (wip)
Small test for doing procedural trees.. (screenshot showing trunk with resolution 8 and 5 sides..) Current features: – Trunk creation: adjustable height, height segments, resolution (amount of “sides”) – Using quads – Perlin noise rotations for trunk direction – Adjustable root segment radius multiplier (so […]
10
2012
Flood Fill Algorithm
Converted this c# flood fill algorithm to unityscript. Using list, instead of that queue thing and modified it to work with grid array, instead of bitmap colors.. Bit too slow, if I want to try big grid.. maybe 4096×4096. (wont be using setpixel on that, […]
7
2012
Verlet Integration
Testing Verlet Integration for Unity, converted from processing/java. (screenshot doesnt look too interesting..) (Verlet Integration Example by Ira Greenberg , licensed under Creative Commons Attribution-Share Alike 3.0 and GNU GPL license) So far the ropelines work fine, looks like realistic physics.. Not sure if I […]
3
2012
Diamond Square Algorithm
Converted Diamond Square Algorithm / random midpoint displacement fractal from Processing (original by “Justin Seyster”) to Unity C#. *See also related forum topic. Release#1: – Color32 array with SetPixels32() (instead of plotting each pixel at a time..) – Replaced “/2” with “*0.5f” (supposed to be […]
26
2012
Monotone Chain Convex Hull Algorithm
Finally got atleast some 2D convex hull algorithm working.. this one is converted from those Java & Python versions. Converted the java version first and it kept giving strange results, then took the sub() from python and it worked rightaway.. Now can try this for […]
27
2012
Simple Shadow Casting Algorithm
Converted part of this code into Unity(js) : A Simple Algorithm For Casting Shadows Screenshot info: – Red lines = from camera to vertex – Green lines = from vertex to ground – Blue lines = shadow plane vertices (no plane on this version yet, […]
19
2012
Bresenham’s line algorithm (Unity javascript)
* image from wikipedia, public domain Converted this function to Unity javascript: http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm Notes:It works.. Webplayer:http://unitycoder.com/upload/demos/Bresenhamline/ Download webplayer source:Bresenham.unitypackage old unityscript sourcehttps://gist.github.com/unitycoder/90f0f1896e38a13d98e3d0c84ea45789
15
2012
Xiaolin Wu’s line algorithm to Unity Javascript
Converted this function to Unity3D Javascript : http://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm (Still has few bugs left..see that vertical line in screenshot..) Webplayer: coming later Can anyone find the error in this code? Why doesnt it draw vertical lines..? !note, couple lines are commented out, swapping x<>y, if I […]
Recent posts
- MotionVector Effect: Object “disappears” when paused
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
Recent Comments
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on