Added river terrain test mesh, each model's manifest file is now simply named manifest.yaml instead of model_folder_name.yaml.

This commit is contained in:
2019-08-07 10:43:04 -05:00
parent 2e69647ae3
commit 1b6f8cf880
16 changed files with 22195 additions and 7 deletions

View File

@@ -0,0 +1,3 @@
---
name: "river_terrain"
model: "river_terrain.obj"

View File

@@ -0,0 +1,22 @@
# Blender MTL File: 'river_terrain.blend'
# Material Count: 2
newmtl ground
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.290217 0.532440 0.188261
Ks 0.500000 0.500000 0.500000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 2
newmtl water
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.158282 0.310729 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 2

File diff suppressed because it is too large Load Diff

BIN
blends/river_terrain.blend Normal file

Binary file not shown.

BIN
blends/river_terrain.blend1 Normal file

Binary file not shown.

View File

@@ -1,7 +1,8 @@
class IMICFPS
class Terrain < Entity
def setup
bind_model("base", "randomish_terrain")
#bind_model("base", "randomish_terrain")
bind_model("base", "river_terrain")
end
end
end
end

View File

@@ -47,7 +47,7 @@ class IMICFPS
end
def bind_model(package, name)
model = ModelLoader.new(manifest_file: IMICFPS.assets_path + "/#{package}/#{name}/#{name}.yaml", entity: @dummy_entity)
model = ModelLoader.new(manifest_file: IMICFPS.assets_path + "/#{package}/#{name}/manifest.yaml", entity: @dummy_entity)
raise "model isn't a model!" unless model.is_a?(ModelLoader)
@bound_model = model

View File

@@ -40,7 +40,7 @@ class IMICFPS
if CACHE[@type].is_a?(Hash)
if CACHE[@type][@file_path]
@model = CACHE[@type][@file_path]#.dup # Don't know why, but adding .dup improves performance with Sponza (1 fps -> 20 fps)
# puts "Used cached model for: #{@file_path.split('/').last}"
puts "Used cached model for: #{@file_path.split('/').last}"
found = true
end
end

View File

@@ -10,7 +10,7 @@ class IMICFPS
@dummy_entity = nil
@assets = []
@asset_index = 0
add_asset(:model, "base", "randomish_terrain")
add_asset(:model, "base", "river_terrain")
add_asset(:model, "base", "skydome")
add_asset(:model, "base", "tree")
add_asset(:model, "base", "biped")
@@ -48,7 +48,7 @@ class IMICFPS
hash = @assets[@asset_index]
case hash[:type]
when :model
ModelLoader.new(manifest_file: IMICFPS.assets_path + "/#{hash[:package]}/#{hash[:name]}/#{hash[:name]}.yaml", entity: @dummy_entity)
ModelLoader.new(manifest_file: IMICFPS.assets_path + "/#{hash[:package]}/#{hash[:name]}/manifest.yaml", entity: @dummy_entity)
# when :shader
else
warn "Unknown asset: #{hash}"
@@ -97,4 +97,4 @@ class IMICFPS
end
end
end
end
end