-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix texture atlas for objs which only have material properties
Summary: Fix for GitHub issue #381. The example mesh provided in the issue only had material properties but no texture image. The current implementation of texture atlassing generated an atlas using both the material properties and the texture image but only worked if there was a texture image and associated vertex uv coordinates. I have now modified the texture atlas creation so that it doesn't require an image and can work with materials which only have material properties. Reviewed By: gkioxari Differential Revision: D24153068 fbshipit-source-id: 63e9d325db09a84b336b83369d5342ce588a9932
- Loading branch information
1 parent
5d65a0c
commit f5383a7
Showing
5 changed files
with
87 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Material Count: 1 | ||
|
||
newmtl material_1 | ||
Ns 96.078431 | ||
Ka 0.000000 0.000000 0.000000 | ||
Kd 0.500000 0.000000 0.000000 | ||
Ks 0.500000 0.500000 0.500000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
mtllib model.mtl | ||
|
||
v 0.1 0.2 0.3 | ||
v 0.2 0.3 0.4 | ||
v 0.3 0.4 0.5 | ||
v 0.4 0.5 0.6 | ||
usemtl material_1 | ||
f 1 2 3 | ||
f 1 2 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters