Changing the color of SpeedTree materials at runtime in Unity3D.

Standard

Need to instantiate and then tint some trees for your scene. Try something like this;

 

 

Game Engine Status Update 2

Standard

Fixed some things, broke some other things. Added a mob with a very simple chase function. More to come.

Some more digging in this video, you can see the marching cubes shapes are a bit jagged and lighting is bare bones / rough. Work in progress. I have some old light spreading / radiosity type code for 3D voxel arrays in minecraft type worlds but its pretty tricky stuff and may take a while to adapt and implement. That along with water.

Chunk Class for Unity Voxel Engine (Example)

Standard

Here’s an example of a Chunk class i use in some variants of the engine. This one is a bit experimental but working OK so far.

chunk

 

Creating a grid mesh programmatically in Unity 3D

Standard

Some old voxel lighting code

Standard

If you look at some of the previous posts you will see this code or a variant of it in use. It may be useful to some. It is very much a hack and i hope to revisit it perhaps in c++ or java.

LWJGL OpenGL VBO Issue on Linux

Standard

I struggled for a while with some code that generates 2 triangles using indices with more modern OpenGL methods. It worked fine when run on my windows boxes but not on my 2011 MBP running linux. There were no errors or anything i could see (i may not have configured the error checking correctly)

The issue was resolved by replacing the video driver. The xorg driver while it did support some OpenGL functions, did not apparently allow VBO. So if you notice issue with VBO/VBA code on linux where it runs fine on windows, try swapping out your graphics card drivers.

Below is the code used for the loader class thanks to ThinMatrix @ youtube who has some excellent tutorials for lwjgl.