unity3d,textures,procedural-generation

All he's done in that line is have the color pattern repeat itself ten times over. By calculating the modulo with 0.1, each loop of 0 - 1 will yield ten values (0, 0.1, 0.2...) Further, by multiplying by 10, the color stays visible, and the result is the 10...

animation,processing,procedural-generation

You'll have better luck if you post the simplest form of your problem, something like this: public void setup() { size(360, 360); noFill(); stroke(0); smooth(10); } public void draw() { background(255); stroke(#3aa8c3); arc(60, 60, 70, 70, radians(mouseX), radians(mouseY)); } This allows us to eliminate causes and more easily find the...

c#,unity3d,mesh,procedural-generation

First of all fix line 1: using UnityEngine; Then, line 4 to create MeshRenderrer component: [RequireComponent(typeof(MeshFilter)), RequireComponent(typeof(MeshRenderer))] Finally, insert to method "Start" code to assign Default material: MeshRenderer mr = GetComponent<MeshRenderer>(); mr.material = new Material(Shader.Find("Diffuse")); Full corrected code: using UnityEngine; using System.Collections; [RequireComponent(typeof(MeshFilter)), RequireComponent(typeof(MeshRenderer))] public class ProceduralMeshScript : MonoBehaviour {...

algorithm,fractals,procedural-programming,procedural-generation,l-systems

L systems are very simple and rely on text substitutions. With this starting information: Axiom : FX Rule : X= +F-F-F+FX Then basically, to produce the next generation of the system you take the previous generation and for each character in it you apply the substitutions. You can use this...

Someone mentioned that the solution has a lot of relevance with filling algorithms, like the ones used in microsoft paint. I'm going to proceed to use the 'scanline fill' algorithm - http://en.wikipedia.org/wiki/Flood_fill...

algorithm,math,textures,procedural-generation

Everything is explained on that page : Here are some simple, boring functions which, when repeatedly combined with smaller and smaller versions of themselves, create very interesting patterns. The table below shows you the basic source pattern (left), and combinations of that pattern with smaller versions of itself using various...

c#,monogame,procedural-generation,simplex-noise

Check line 133 in the SimplexNoise you are using: // The result is scaled to return values in the interval [-1,1]. After you divide it by 10, the result would be in range from -0.1 to +0.1 You need a range from 0 to 1, so instead of dividing by...

c#,perlin-noise,procedural-generation

I can't say how Minecraft does it, but from my own experience with voxel terrain, the best way to approach it is to think of the voxel grid as something like a cloud: each voxel has a density, and when that density is high enough, it becomes a 'visible' part...

unity3d,textures,texture2d,procedural-generation

You can create Textures in code by doing something like this: public Texture2D CreateTexture() { int width = 100; int height = 100; Texture = new Texture2D(width, height, TextureFormat.ARGB32, false); Texture.filterMode = FilterMode.Point; for (int i = 0; i < width; i++) { for (int j = 0; j <...

c++,game-engine,tile,procedural-generation

First differentiate between logic and visualization. It probably makes sense to have an array where each cell is either grass or water for the game logic (let's call it a). From that you create a second array to store how that cell is rendered and consider edges (let's call that...

3d,gradient,terrain,perlin-noise,procedural-generation

How can I improve the Perlin Noise algorithm, so that along this curve the noise will have a preferred range of values (or, for simplicity, value 0)? This can be achieved by transforming each pixel in the map through a simple p -> f(p) mathematical function. Consider a function,...

java,libgdx,triangulation,procedural-generation

It seems like you just want to compute the set of edges of the resulting triangles. Therefore, you can simply create an Edge class, with two special properties: the equals method returns true even if the vertices of the edge to compare with are swapped (so that an edge (2,1)...