Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GameDevWeek
D
Dependencies
Cpp
mirrage
Commits
c63bd245
Commit
c63bd245
authored
Sep 20, 2019
by
Florian Oetke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated assimp (force build from source) and added debug logging to material_parser
parent
a7597272
Pipeline
#3319
passed with stage
in 13 minutes and 54 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
+19
-9
dependencies/CMakeLists.txt
dependencies/CMakeLists.txt
+3
-3
dependencies/assimp
dependencies/assimp
+1
-1
src/mesh_converter/common.hpp
src/mesh_converter/common.hpp
+9
-5
src/mesh_converter/material_parser.cpp
src/mesh_converter/material_parser.cpp
+6
-0
No files found.
dependencies/CMakeLists.txt
View file @
c63bd245
...
...
@@ -74,11 +74,11 @@ add_subdirectory(sf2)
if
(
MIRRAGE_BUILD_MESH_CONVERTER
)
find_package
(
assimp 4.1
)
if
(
NOT assimp_FOUND
)
#
find_package(assimp 4.1)
#
if(NOT assimp_FOUND)
add_subdirectory
(
assimp
)
set_property
(
TARGET assimp PROPERTY INTERFACE_INCLUDE_DIRECTORIES
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/assimp/include"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/assimp/include"
)
endif
()
#
endif()
add_subdirectory
(
stb_image
)
include
(
crunch_interface.cmake
)
...
...
assimp
@
83df4f41
Compare
80799bdb
...
83df4f41
Subproject commit 8
0799bdbf90ce626475635815ee18537718a05b1
Subproject commit 8
3df4f41042fdc6d687c0738e489f8d65d1bdbd7
src/mesh_converter/common.hpp
View file @
c63bd245
...
...
@@ -28,11 +28,15 @@ namespace mirrage {
struct
Mesh_converted_config
{
Texture_mapping
texture_mappings
{
{
Texture_type
::
albedo
,
{
1
}},
// aiTextureType_DIFFUSE
{
Texture_type
::
metalness
,
{
3
}},
// aiTextureType_AMBIENT
{
Texture_type
::
roughness
,
{
7
,
2
}},
// aiTextureType_SHININESS, aiTextureType_SPECULAR
{
Texture_type
::
normal
,
{
6
,
5
}},
// aiTextureType_NORMALS, aiTextureType_HEIGHT
{
Texture_type
::
emission
,
{
4
}},
// aiTextureType_EMISSIVE
{
Texture_type
::
albedo
,
{
1
,
12
}},
// aiTextureType_DIFFUSE, aiTextureType_BASE_COLOR
{
Texture_type
::
metalness
,
{
3
,
15
}},
// aiTextureType_AMBIENT, aiTextureType_METALNESS
{
Texture_type
::
roughness
,
{
7
,
2
,
16
}},
// aiTextureType_SHININESS, aiTextureType_SPECULAR, aiTextureType_DIFFUSE_ROUGHNESS
{
Texture_type
::
normal
,
{
6
,
13
,
5
}},
// aiTextureType_NORMALS, aiTextureType_NORMAL_CAMERA, aiTextureType_HEIGHT
{
Texture_type
::
emission
,
{
4
,
14
}},
// aiTextureType_EMISSIVE, aiTextureType_EMISSION_COLOR
};
std
::
unordered_map
<
std
::
string
,
std
::
unordered_map
<
Texture_type
,
std
::
string
>>
...
...
src/mesh_converter/material_parser.cpp
View file @
c63bd245
...
...
@@ -354,6 +354,12 @@ namespace mirrage {
auto
material_file
=
renderer
::
Material_data
{};
material_file
.
substance_id
=
util
::
Str_id
(
"default"
);
// TODO: decide alpha-test / alpha-blend
for
(
auto
i
=
std
::
size_t
(
0
);
i
<
material
.
mNumProperties
;
i
++
)
{
auto
m
=
material
.
mProperties
[
i
];
LOG
(
plog
::
info
)
<<
"Mat "
<<
m
->
mKey
.
C_Str
()
<<
" Index="
<<
m
->
mIndex
<<
" Data="
<<
std
::
string
(
m
->
mData
,
m
->
mDataLength
);
}
// convert albedo
auto
albedo_name
=
resolve_path
(
name
,
base_dir
,
find_texture
(
name
,
material
,
cfg
,
Texture_type
::
albedo
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment