This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
-
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.
Merge pull request #200 from donmccurdy/sample-morphprimitivestest
Add MorphPrimitivesTest.
- Loading branch information
Showing
9 changed files
with
365 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Morph-Primitives Test | ||
|
||
## Screenshot | ||
|
||
![screenshot](screenshot/screenshot.jpg) | ||
|
||
## Description | ||
|
||
This model contains a simple mesh with two primitives: A larger red primitive displays a grid covering 3 of the 4 quadrants of the model's area, followed by a smaller green primitive covering the last quadrant. | ||
|
||
Each primitive has a morph target that creates an elevated area within these quadrants. The model's only mesh contains a `weights: [0.5]` instruction that should cause these morph targets to be applied at half strength, raising the center of the model as shown in the screenshot above. | ||
|
||
## Common Problems | ||
|
||
If the entire model appears perfectly flat, it is likely that the morph targets have not been applied as requested. | ||
|
||
If the red area or green area is missing, particularly in the Draco-compressed version of this model, it could indicate a problem with decompression or with support of multiple primitives within a single mesh. | ||
|
||
## License Information | ||
|
||
Model by [@ft-lab](https://github.com/ft-lab). | ||
|
||
CC-BY 4.0 https://creativecommons.org/licenses/by/4.0/ |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,331 @@ | ||
{ | ||
"asset": { | ||
"generator": "glTF Converter for Shade3D", | ||
"version": "2.0", | ||
"extras": { | ||
"title": "multiple_primitives", | ||
"author": "ft-lab", | ||
"license": "CC BY-4.0 (https://creativecommons.org/licenses/by/4.0/)" | ||
} | ||
}, | ||
"accessors": [ | ||
{ | ||
"bufferView": 0, | ||
"componentType": 5123, | ||
"count": 72, | ||
"type": "SCALAR", | ||
"byteOffset": 0 | ||
}, | ||
{ | ||
"bufferView": 1, | ||
"componentType": 5126, | ||
"count": 21, | ||
"type": "VEC3", | ||
"byteOffset": 0 | ||
}, | ||
{ | ||
"bufferView": 2, | ||
"componentType": 5126, | ||
"count": 21, | ||
"type": "VEC3", | ||
"max": [ | ||
0.5, | ||
0, | ||
0.5 | ||
], | ||
"min": [ | ||
-0.5, | ||
0, | ||
-0.5 | ||
], | ||
"byteOffset": 0 | ||
}, | ||
{ | ||
"bufferView": 3, | ||
"componentType": 5126, | ||
"count": 21, | ||
"type": "VEC2", | ||
"byteOffset": 0 | ||
}, | ||
{ | ||
"bufferView": 4, | ||
"componentType": 5126, | ||
"count": 21, | ||
"type": "VEC3", | ||
"max": [ | ||
0, | ||
0.20000000298023224, | ||
0 | ||
], | ||
"min": [ | ||
0, | ||
0, | ||
0 | ||
], | ||
"byteOffset": 0 | ||
}, | ||
{ | ||
"bufferView": 5, | ||
"componentType": 5123, | ||
"count": 24, | ||
"type": "SCALAR", | ||
"byteOffset": 0 | ||
}, | ||
{ | ||
"bufferView": 6, | ||
"componentType": 5126, | ||
"count": 9, | ||
"type": "VEC3", | ||
"byteOffset": 0 | ||
}, | ||
{ | ||
"bufferView": 7, | ||
"componentType": 5126, | ||
"count": 9, | ||
"type": "VEC3", | ||
"max": [ | ||
0.5, | ||
0, | ||
0 | ||
], | ||
"min": [ | ||
0, | ||
0, | ||
-0.5 | ||
], | ||
"byteOffset": 0 | ||
}, | ||
{ | ||
"bufferView": 8, | ||
"componentType": 5126, | ||
"count": 9, | ||
"type": "VEC2", | ||
"byteOffset": 0 | ||
}, | ||
{ | ||
"bufferView": 9, | ||
"componentType": 5126, | ||
"count": 9, | ||
"type": "VEC3", | ||
"max": [ | ||
0, | ||
0.20000000298023224, | ||
0 | ||
], | ||
"min": [ | ||
0, | ||
0, | ||
0 | ||
], | ||
"byteOffset": 0 | ||
} | ||
], | ||
"bufferViews": [ | ||
{ | ||
"buffer": 0, | ||
"byteOffset": 0, | ||
"byteLength": 144, | ||
"target": 34963 | ||
}, | ||
{ | ||
"buffer": 0, | ||
"byteOffset": 144, | ||
"byteLength": 252, | ||
"target": 34962, | ||
"byteStride": 12 | ||
}, | ||
{ | ||
"buffer": 0, | ||
"byteOffset": 396, | ||
"byteLength": 252, | ||
"target": 34962, | ||
"byteStride": 12 | ||
}, | ||
{ | ||
"buffer": 0, | ||
"byteOffset": 648, | ||
"byteLength": 168, | ||
"target": 34962, | ||
"byteStride": 8 | ||
}, | ||
{ | ||
"buffer": 0, | ||
"byteOffset": 816, | ||
"byteLength": 252, | ||
"target": 34962, | ||
"byteStride": 12 | ||
}, | ||
{ | ||
"buffer": 0, | ||
"byteOffset": 1068, | ||
"byteLength": 48, | ||
"target": 34963 | ||
}, | ||
{ | ||
"buffer": 0, | ||
"byteOffset": 1116, | ||
"byteLength": 108, | ||
"target": 34962, | ||
"byteStride": 12 | ||
}, | ||
{ | ||
"buffer": 0, | ||
"byteOffset": 1224, | ||
"byteLength": 108, | ||
"target": 34962, | ||
"byteStride": 12 | ||
}, | ||
{ | ||
"buffer": 0, | ||
"byteOffset": 1332, | ||
"byteLength": 72, | ||
"target": 34962, | ||
"byteStride": 8 | ||
}, | ||
{ | ||
"buffer": 0, | ||
"byteOffset": 1404, | ||
"byteLength": 108, | ||
"target": 34962, | ||
"byteStride": 12 | ||
} | ||
], | ||
"buffers": [ | ||
{ | ||
"name": "MorphPrimitivesTest", | ||
"byteLength": 1512, | ||
"uri": "MorphPrimitivesTest.bin" | ||
} | ||
], | ||
"images": [ | ||
{ | ||
"name": "uv_texture.jpg", | ||
"mimeType": "image/jpeg", | ||
"uri": "uv_texture.jpg" | ||
} | ||
], | ||
"materials": [ | ||
{ | ||
"pbrMetallicRoughness": { | ||
"baseColorFactor": [ | ||
1, | ||
0, | ||
0, | ||
1 | ||
], | ||
"baseColorTexture": { | ||
"index": 0, | ||
"texCoord": 0 | ||
}, | ||
"metallicFactor": 0, | ||
"roughnessFactor": 1 | ||
}, | ||
"name": "red", | ||
"emissiveFactor": [ | ||
0, | ||
0, | ||
0 | ||
], | ||
"alphaMode": "OPAQUE", | ||
"doubleSided": false | ||
}, | ||
{ | ||
"pbrMetallicRoughness": { | ||
"baseColorFactor": [ | ||
0, | ||
1, | ||
0, | ||
1 | ||
], | ||
"baseColorTexture": { | ||
"index": 0, | ||
"texCoord": 0 | ||
}, | ||
"metallicFactor": 0, | ||
"roughnessFactor": 1 | ||
}, | ||
"name": "green", | ||
"emissiveFactor": [ | ||
0, | ||
0, | ||
0 | ||
], | ||
"alphaMode": "OPAQUE", | ||
"doubleSided": false | ||
} | ||
], | ||
"meshes": [ | ||
{ | ||
"weights": [ | ||
0.5 | ||
], | ||
"name": "mesh", | ||
"primitives": [ | ||
{ | ||
"attributes": { | ||
"NORMAL": 1, | ||
"POSITION": 2, | ||
"TEXCOORD_0": 3 | ||
}, | ||
"indices": 0, | ||
"material": 0, | ||
"targets": [ | ||
{ | ||
"POSITION": 4 | ||
} | ||
], | ||
"mode": 4 | ||
}, | ||
{ | ||
"attributes": { | ||
"POSITION": 7, | ||
"NORMAL": 6, | ||
"TEXCOORD_0": 8 | ||
}, | ||
"indices": 5, | ||
"material": 1, | ||
"targets": [ | ||
{ | ||
"POSITION": 9 | ||
} | ||
], | ||
"mode": 4 | ||
} | ||
] | ||
} | ||
], | ||
"nodes": [ | ||
{ | ||
"children": [ | ||
1 | ||
], | ||
"name": "ルートパート" | ||
}, | ||
{ | ||
"mesh": 0, | ||
"name": "mesh" | ||
} | ||
], | ||
"samplers": [ | ||
{ | ||
"minFilter": 9729, | ||
"wrapS": 10497, | ||
"wrapT": 10497 | ||
} | ||
], | ||
"scenes": [ | ||
{ | ||
"nodes": [ | ||
0 | ||
], | ||
"name": "Scene" | ||
} | ||
], | ||
"textures": [ | ||
{ | ||
"sampler": 0, | ||
"source": 0 | ||
} | ||
], | ||
"scene": 0 | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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