Skip to main content

Popular posts from this blog

Neural Network 0: handwriting learner and sin(x)

Here is a project from a while ago, it recognises characters:

This is the network class:

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;publicclass NeuralNetwork {publicdouble learnRate;publicdouble momentum;public List<Neuron> inputLayer;public List<Neuron> hiddenLayer;public List<Neuron> outputLayer;static Random random =new Random();public NeuralNetwork(int inputSize,int hiddenSize,int outputSize,string file =""){ learnRate =.9d; momentum =.04d; inputLayer =new List<Neuron>(); hiddenLayer =new List<Neuron>(); outputLayer =new List<Neuron>();for(int i =0; i < inputSize; i++) inputLayer.Add(new Neuron());for(int i =0; i < hiddenSize; i++) hiddenLayer.Add(new Neuron(inputLayer));for(int i =0; i < outputSize; i++) outputLayer.Add(new Neuron(hiddenLayer));if(file !=…

C# produceral terrain generation 3

I have been working on a raindrop algorithm for erosion on the heighmap. firstit went wrong: spikes is not what you want
The better version uses 150 * 150 * 150 * 8  raindrops for a total of 27M drops. this takes 8000 milli seconds on one core(3.8ghz). Second try, not very good On the third try a river was created naturally. this is more promising.
here is a Fault-terrain that was "raindropped" and smoothed and i added small detail noise. Again a rivver. i add some materials and a water plane for fun. doesnt look too bad.

Here i am experimenting with parameters in the raindrop function.
DONE: Get basic raindrop erosion setup TODO: tweak till i get decent and realistic results.
Cody Bloemhard [tag: c#] [tag: OpenGL] [tag: Tortoise2D Engine] [tag: 2D] [tag: Game Engine] [tag: ocdy1001] [tag: ocdy1001official] [tag: Unity] [tag: Unity3D] [tag: Unity5] [tag: 3D] [tag: Cody Bloemhard]

C# Produceral Terrain Generation 1

New Project:
Goals: - Generate random terain with noise - user input to get certain structures - use fractals to get more nature-like structures - use erosion to get even more accurate results - use weather to get biomes and direct erosion - export to heightmap - export to .obj
By designable i mean that if you need a big mountain in the middle for example, you can give the data and it generates a random terrain, but with the mountain(aslo random) always present in the right place, so you can have random terrain and design so the game doesnt break.
Progress. I making heighmaps now. the engine can produce maps in 24 bit. red is low green is mid and blue is high. there are around 16m heights. if you see lots of red, it still can me a big number on that pixel, because the blue is low and red is high, but blue counts more as 10000 is more than 10. so visualy it can be weird but evertthing is right example: RGB(234, 2, 4) this will result in a red color.…