Skip to content
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

EXT_mesh_gpu_instancing #1691

Merged
merged 27 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
76587d9
instancing extension
ultrafishotoy Oct 23, 2019
de031ed
cleanup
ultrafishotoy Oct 23, 2019
5d2dac5
overview statement
ultrafishotoy Oct 23, 2019
ed5f6e6
tweak statements
ultrafishotoy Oct 23, 2019
a68dcf6
statement
ultrafishotoy Oct 23, 2019
82b3adb
description
ultrafishotoy Oct 23, 2019
1b4f9c3
typo
ultrafishotoy Oct 23, 2019
956b01d
simple example
ultrafishotoy Nov 6, 2019
62cf80a
syntax fix
ultrafishotoy Nov 6, 2019
2ed4903
teapots galore
ultrafishotoy Nov 6, 2019
a833742
oops
ultrafishotoy Nov 6, 2019
8b8e39a
example image
ultrafishotoy Nov 6, 2019
66fa030
fix path
ultrafishotoy Nov 6, 2019
332af44
update attribs to POSITION, ROTATION, and SCALE
ultrafishotoy Dec 2, 2019
133d28d
rename extension
ultrafishotoy Dec 2, 2019
3857fa7
updated POSITION attribute to TRANSLATION
ultrafishotoy Dec 31, 2019
d53d9c8
remove 'world space' language
ultrafishotoy Jan 5, 2020
b4854e9
new sample files
ultrafishotoy Feb 19, 2020
ea4c776
sample updated with rotation as a quaternion
ultrafishotoy Mar 5, 2020
c70f30e
latest sample files
ultrafishotoy Mar 26, 2020
615652a
oops
ultrafishotoy Mar 26, 2020
8d8f4a0
KHR_mesh_instancing -> EXT_mesh_gpu_instancing
Mar 28, 2020
eef3c13
Merge pull request #1 from donmccurdy/ultrafishotoy-EXT_mesh_gpu_inst…
ultrafishotoy Mar 30, 2020
900ac06
moved to Vendor folder and renamed
ultrafishotoy Mar 31, 2020
5984aa1
Merge branch 'KHR_instancing' of https://github.com/ultrafishotoy/glT…
ultrafishotoy Mar 31, 2020
dbd7b63
specify the types of the attributes
ultrafishotoy Apr 29, 2020
e0a458b
clean up readme.md
ultrafishotoy May 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# EXT\_mesh\_gpu\_instancing

## Khronos 3D Formats Working Group
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this line to ## Contributors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Thanks Ed!


* John Cooke
* Don McCurdy
* Arseny Kapoulkine

## Acknowledgments

## Status

Experimental

## Dependencies

Written against the glTF 2.0 spec.

## Overview

This extension is specfically designed to enable GPU instancing which renders many copies of a single mesh at once using a small number of draw calls. It's useful for things
like trees, grass, road signs, etc. The TRANSLATION, ROTATION, and SCALE attributes allows the mesh to be displayed at many different locations with different rotations and scales.
Custom attributes can use the underscore mechanism to achieve other effects (i.e. _ID, _TRANSFORM4x3, etc.).

## Extending Nodes with per instance attributes

Instancing is defined by adding the `EXT_mesh_gpu_instancing` extension to any glTF node that has a mesh. Instancing only applies to mesh nodes, there is no defined behavior for a node
with this extension that doesn't also have a mesh. Applying to nodes rather than meshes allows the same mesh to be used by several nodes, instanced or otherwise. The attributes
section contains accessor ids for the TRANSLATION, ROTATION, and SCALE attribute buffers, all of which are optional. The attributes specify an object space transform that should be
multipled by the node's world transform in the shader to produce the final world transform for the instance. For example, the following defines some instancing attributes to a node with mesh.

```json
{
"nodes": [
{
"mesh": 0,
"name": "teapot",
"extensions": {
"EXT_mesh_gpu_instancing": {
"attributes": {
"TRANSLATION": 0,
"ROTATION": 1,
"SCALE": 2,
"_ID" : 3
},
}
}
}
]
}
```

## Appendix


## Reference


### Theory, Documentation and Implementations
Binary file not shown.
Binary file not shown.
Loading