Assignment 2: Sample Screenshots

Some example worlds with screenshots. Note that screenshots were taken from whatever angle I could find that best captured the scene. Your output doesn't have to look exactly like this, but the following elements should match:

  1. the shape of the terrain
  2. the direction of the lighting
  3. the shape of the road
I have included the line outlines of the triangles only so you can see the geometry of the terrain.

Test 2

Various slopes lit from above
{
    "width" : 6,
    "depth" : 6,

    "sunlight" : [ 0, 1, 0 ],

    "altitude" : [
	    1, 1, 1, 1, 1, 1,
	    1, 1, 1, 1, 1, 1,
	    1, 1, 0, 0, 1, 1,
	    1, 1, 0, 0, 1, 1,
	    2, 2, 2, 2, 2, 2,
	    2, 2, 2, 2, 2, 2,
	]
}

Test 3

A hill with sunlight coming from the negative x direction.
{
    "width" : 4,
	"depth" : 4,
 
	"sunlight" : [ -1, 0, 0 ],
 
	"altitude" : [
	    0, 0, 0, 0,
	    0, 0, 1, 0,
	    0, 0, 2, 0,
	    0, 0, 3, 0	    	    
	]	
}

Test 4

Trees at various heights testing interpolation
{
    "width" : 4,
	"depth" : 4,
 
	"sunlight" : [ -1, 1, 0 ],
 
	"altitude" : [
	    0, 0, 3, 3,
	    0, 0, 3, 3,
	    0, 0, 0, 0,
	    0, 0, 0, 0	    	    
	],
	
	"trees" : [
		{ "x" : 0.5, "z" : 0.5 },	
		{ "x" : 1.5, "z" : 0.5 },
		{ "x" : 1.5, "z" : 1.5 },
		{ "x" : 2.5, "z" : 0.5 },
		{ "x" : 2.5, "z" : 1.5 },
		{ "x" : 2.5, "z" : 2.5 },
	]
}

Test 5

A single bezier curve of road
{
    "width" : 4,
	"depth" : 4,
 
	"sunlight" : [ -1, 1, 0 ],
 
	"altitude" : [
	    0, 0, 0, 0,
	    0, 0, 0, 0,
	    0, 0, 0, 0,
	    0, 0, 0, 0	    	    
	],
	
	"roads" : [
		{
			"width" : 1,
			"spine" : [ 
				0, 0.5,
				3, 0.5,
				3, 2.5,
				0, 2.5
			]
		}
	]
}

Test 6

Two roads at different altitudes
{
    "width" : 6,
	"depth" : 6,
 
	"sunlight" : [ -1, 1, 0 ],
 
	"altitude" : [
	    1, 1, 1, 1, 1, 1,
	    1, 1, 1, 1, 1, 1,
	    1, 1, 1, 1, 1, 1,
	    0, 0, 0, 0, 0, 0,
	    0, 0, 0, 0,	0, 0,    	    
	    0, 0, 0, 0,	0, 0,    	    
	],
	
	"roads" : [
		{
			"width" : 0.5,
			"spine" : [ 
				1, 1.5,
				2, 1.5,
				3, 1.5,
				4, 1.5
			]
		},
		
		{
			"width" : 0.3,
			"spine" : [ 
				1, 4.5,
				2, 4.5,
				3, 4.5,
				4, 4.5
			]
		}
		
	]
}

Test 7

A two piece bezier spline road
{
    "width" : 8,
	"depth" : 8,
 
	"sunlight" : [ -1, 1, 0 ],
 
	"altitude" : [
	    0, 0, 0, 0, 0, 0, 0, 0,
	    0, 0, 0, 0, 0, 0, 0, 0,
	    0, 0, 0, 0, 0, 0, 0, 0,
	    0, 0, 0, 0, 0, 0, 0, 0,	    	    
	    0, 0, 0, 0, 0, 0, 0, 0,
	    0, 0, 0, 0, 0, 0, 0, 0,
	    0, 0, 0, 0, 0, 0, 0, 0,
	    0, 0, 0, 0, 0, 0, 0, 0,	    	    
	],
	
	"roads" : [
		{
			"width" : 1,
			"spine" : [ 
				0, 0.5,
				7, 0.5,
				7, 3.5,
				4, 3.5,
				0, 3.5,
				0, 6.5,
				4, 6.5
			]
		}
	]
}

Tree Interpolation

  • It is ok to place the centre of the trunk at the interpolated y-value. You will not lose any marks for this, but it is obviously better to fix it