Browse Source

condense test_scene.json, and increase near clip plane

master
cinnaboot 8 years ago
parent
commit
05a8f87262
  1. 2
      TODO.md
  2. 112
      data/level.2.dae
  3. 88
      data/test_scene.json
  4. 2
      src/camera.cpp

2
TODO.md

@ -17,6 +17,8 @@
- pass in frame time to camera movement functions to decouple speed from framerate
- test camera speed when moving with composite vector
- may be fixed?? need to test by examining camera position between frames and compare the distance
- show debug mesh for light positions
- attenuate point lights in shader
- remove checks for colors, textures from render_group functions
- actually cannot remove checks for texture because some meshes aren't loaded properly
- maybe can cause loading mesh to fail when more than one mesh per file

112
data/level.2.dae

File diff suppressed because one or more lines are too long

88
data/test_scene.json

@ -1,77 +1,35 @@
{
"camera" : {
"position" : {
"x" : 0,
"y" : -400,
"z" : 100
},
"target" : {
"x" : 140,
"y" : 0,
"z" : 0
},
"world_up" : {
"x" : 0,
"y" : 0,
"z" : 1
}
"position" : {"x":0,"y":-400,"z":100},
"target" : {"x":140,"y":0,"z":0},
"world_up" : {"x":0,"y":0,"z":1}
},
"hex_grid" : {
"position" : {
"x" : 0,
"y" : 0,
"z" : 0
},
"position" : {"x":0,"y":0,"z":0},
"hex_size" : 10,
"fill_color" : 6,
"selected_fill_color": 7,
"hex_line_color": 5,
"hexlib_orientation" : "layout_flat",
"grid_type" : "hexagon",
"hex_radius" : 20
"hex_radius" : 15
},
"entities" : [
{
"name" : "catepillar 1",
"model_file" : "catepillar.dae",
"position" : {
"x" : -140,
"y" : 50,
"z" : 0
},
"rotation" : {
"x" : 0,
"y" : 0,
"z" : 0,
"w" : 0
},
"scale" : {
"x" : 10,
"y" : 10,
"z" : 10
}
"position" : {"x":-140,"y":50,"z":0},
"rotation" : {"x":0,"y":0,"z":0,"w":0},
"scale" : {"x":10,"y":10,"z":10}
},
{
"name" : "catepillar 2",
"model_file" : "catepillar.dae",
"position" : {
"x" : 140,
"y" : 0,
"z" : 0
},
"rotation" : {
"x" : 0,
"y" : 0,
"z" : 0,
"w" : 0
},
"scale" : {
"x" : 10,
"y" : 10,
"z" : 10
}
"position" : {"x" :140,"y":0,"z":0},
"rotation" : {"x":0,"y":0,"z":0,"w":0},
"scale" : {"x":10,"y":10,"z":10}
},
{
"name" : "box",
@ -95,11 +53,11 @@
},
{
"name" : "ground",
"model_file" : "test.level.dae",
"model_file" : "level.2.dae",
"position" : {
"x" : 0,
"y" : 0,
"z" : -100
"z" : -1
},
"rotation" : {
"x" : 0,
@ -108,14 +66,28 @@
"w" : 0
},
"scale" : {
"x" : 500,
"y" : 500,
"z" : 500
"x" : 300,
"y" : 300,
"z" : 300
}
}
],
"lights" : [
{
"intensity" : 1.0,
"color" : {
"r" : 0,
"g" : 0,
"b" : 0
},
"position" : {
"x" : -1000,
"y" : 0,
"z" : 100
}
},
{
"intensity" : 1.0,
"color" : {

2
src/camera.cpp

@ -9,7 +9,7 @@
#define CAMERA_Z_CLAMP_ANGLE 85.f
#define FOV 60.f
#define ASPECT_RATIO 16.f/9.f
#define NEAR_CLIP_PLANE 0.1f
#define NEAR_CLIP_PLANE 20.f
void

Loading…
Cancel
Save