-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.mtl files support for .obj files to render color in 3D custom geometry #6710
Merged
Qianqianye
merged 39 commits into
processing:main
from
diyaayay:Mtl-support-to-obj-files
Mar 19, 2024
Merged
Changes from 2 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
a47fbbc
fixed unit test
diyaayay 2143dba
removed console logs
diyaayay 3498ad0
changed calculation of diffuse to vertex colors
diyaayay 5c7c07e
Merge branch 'processing:main' into Mtl-support-to-obj-files
diyaayay b46af55
removed console logs, changed default vertexColors to 1
diyaayay 0b7a1fe
Merge branch 'Mtl-support-to-obj-files' of https://github.com/diyaaya…
diyaayay 77637ba
Fixes vertexColor and mtlpath assignment
diyaayay 1169993
remove console logs
diyaayay 06c5e28
added unit test for loading obj mtl and assigned vertex colors
diyaayay 2b46a55
unit test for missing mtl file
diyaayay 0790146
unit tests for later when vertexColors are properly assigned
diyaayay 1fa08a2
plant.obj to smaller file for testing
diyaayay be5cf6c
added multiple mtl file handling, still need to fix vertexColors
diyaayay cd6039d
handles other failing unit tests
diyaayay 32f94f3
Merge branch 'processing:main' into Mtl-support-to-obj-files
diyaayay 16fad39
vertex color assign and duplicate vertices
diyaayay c3538b7
Merge branch 'Mtl-support-to-obj-files' of https://github.com/diyaaya…
diyaayay 3cb1a13
Merge branch 'main' into Mtl-support-to-obj-files
diyaayay 90a3a53
commit before merging
diyaayay 2fffa53
linting erros , conflicts
diyaayay 48b07a3
had merge conflicts
diyaayay 341b131
Merge remote-tracking branch 'upstream/main' into Mtl-support-to-obj-…
diyaayay 60a3b06
fixes vertexColors to flat array
diyaayay 9538edc
changes duplication logic
diyaayay 56bc7f2
checks for existence of current material
diyaayay 97950c7
fixes unit test for vertexColors being a flat array
diyaayay 4e46332
added visual test for diffuse colors of obj files
diyaayay 104463a
Fixed visual test for diffuse colors
diyaayay a4047af
screenshot for visual test
diyaayay 7236340
removes console logs
diyaayay b32c935
normalize model for visual test
diyaayay 19e4655
Merge remote-tracking branch 'upstream/main' into Mtl-support-to-obj-…
diyaayay 14a2420
visual tests work for fill in .obj model and mtl color png fix
diyaayay 687e010
adds check for either a fully colored model or colorless model
diyaayay 2aa937f
Merge remote-tracking branch 'upstream/main' into Mtl-support-to-obj-…
diyaayay 31bdeb9
colored model and unit test for color-no color
diyaayay ac68110
mtl file not found, obj displayed without materials
diyaayay d7aa2f7
unit test for missing mtl displayes obj file without color
diyaayay 25bbdc9
Sequential to Parallel mtl file handling
diyaayay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
newmtl coloredMaterial | ||
Ns 96.078431 | ||
Ka 1.000000 1.000000 1.000000 | ||
Kd 1.000000 0.000000 0.000000 # Only this material has a diffuse color | ||
Ks 0.500000 0.500000 0.500000 | ||
Ke 0.0 0.0 0.0 | ||
Ni 1.000000 | ||
d 1.000000 | ||
illum 2 |
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,16 @@ | ||
mtllib eg1.mtl | ||
|
||
v 0 0 0 | ||
v 1 0 0 | ||
v 1 1 0 | ||
v 0 1 0 | ||
v 0.5 0.5 1 | ||
|
||
# Define faces without material | ||
f 1 2 5 | ||
f 2 3 5 | ||
|
||
# Apply material to subsequent faces | ||
usemtl coloredMaterial | ||
f 1 4 5 | ||
f 4 1 5 |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to
console.error
here when we_friendlyError
below?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes! I thought of it but was only checking all errors in console while making this work. Sorry for the oversight while pushing. I'll make the changes.