Skip to content

Commit

Permalink
DetailedVoxels and XYZ-derived voxels have the same default material.
Browse files Browse the repository at this point in the history
  • Loading branch information
albertoesmp committed Jun 4, 2024
1 parent 99f2973 commit fc5b18f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/assetloading/geometryfilter/DetailedVoxelLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ void DetailedVoxelLoader::loadDv(
}
// Prepare default material
Material mat;
mat.isGround = false;
// Legacy default material for vegetation studies commented below
/*mat.isGround = false;
mat.useVertexColors = true;
mat.reflectance = 0.5;
mat.specularity = 0.5;
Expand All @@ -78,7 +79,7 @@ void DetailedVoxelLoader::loadDv(
mat.kd[2] = 0.5; mat.kd[3] = 0.5;
mat.ks[0] = 0.5; mat.ks[1] = 0.5;
mat.ks[2] = 0.5; mat.ks[3] = 0.5;
mat.spectra = "wood";
mat.spectra = "wood";*/

// Parse detailed voxels
VoxelFileParser vfp;
Expand Down
11 changes: 5 additions & 6 deletions src/assetloading/geometryfilter/XYZPointCloudFileLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,12 @@ void XYZPointCloudFileLoader::parse(std::string const & filePath){
discardedPointsByNormal = 0;

// Material
string matName = "default";
logging::INFO("Adding default material");
Material mat;
mat.useVertexColors = true;
mat.isGround = true;
mat.name = matName;
materials.insert(materials.end(), pair<string, Material>(matName, mat));
// Legacy default material commented below
/*mat.useVertexColors = true;
mat.isGround = true;*/
materials.insert(materials.end(), pair<string, Material>(mat.name, mat));

// Open file input stream
ifstream ifs;
Expand All @@ -106,7 +105,7 @@ void XYZPointCloudFileLoader::parse(std::string const & filePath){
firstPass(filePath, ifs);

// Second pass
secondPass(filePath, matName, ifs);
secondPass(filePath, mat.name, ifs);

// Release
if(voxelGrid != nullptr){
Expand Down
2 changes: 1 addition & 1 deletion src/main/helios_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

const char * HELIOS_VERSION = "1.3.0";

const char * HELIOS_GIT_HASH = "508f2033";
const char * HELIOS_GIT_HASH = "99f2973f";

const char * getHeliosVersion(){
return HELIOS_VERSION;
Expand Down

0 comments on commit fc5b18f

Please sign in to comment.