-
Notifications
You must be signed in to change notification settings - Fork 44
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
glTF skinning and morphing animations #184
Conversation
Update Cargo.toml
Remove support for CatmullRomSpline interpolation
Update shader comment
@@ -1,59 +1,101 @@ | |||
|
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.
I'm not sure who removed this but beware of possible copyright violation.
} | ||
|
||
let mut skeletons = Vec::new(); | ||
for w in hub.walk(&scene.first_child) { |
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.
1
@@ -729,7 +868,7 @@ impl Renderer { | |||
|
|||
for w in hub.walk(&scene.first_child) { |
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.
2
@@ -789,39 +928,37 @@ impl Renderer { | |||
} | |||
|
|||
for w in hub.walk(&scene.first_child) { |
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.
3
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.
It seems you are traversing the scene graph (hub.walk
) three times every frame. IIRC, you were pretty adamant about not traversing it more than once in the original PR.
@alteous thanks for taking a look!
does the shader code match anything licensed? I thought you wrote it, and then I changed it more. If there are still lines under license, I'd like to rewrite them anyway.
You might have misunderstood me then. I said previously that ideally in some not far future we'd want to only traverse the graph once and collect all the render data into appropriate buckets for GPU. That doesn't in any way force this change to go crazy out of scope, especially since there were already multiple passes over the graph before it. And that ideal scenario was brought up as an argument to not cache those world transforms (or anything, really, we are almost functional!). As you can see, bone transforms are fitting the scheme just fine. |
The majority of the shader code was taken from https://github.com/KhronosGroup/glTF-WebGL-PBR/tree/master/shaders. I adapted the code for use with gfx changed its style to reflect ours. |
@alteous yeah, you did good. I double checked the shaders and see no concerns about them. |
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.
Brief review
.travis.yml
Outdated
@@ -23,7 +23,8 @@ notifications: | |||
on_start: never | |||
|
|||
script: | |||
- cargo build | |||
- cargo check |
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 really need check
? I think cargo test
is enough.
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.
sure
@@ -19,7 +19,7 @@ const COLOR_BROWN_DARK: three::Color = 0x23190f; | |||
const COLOR_BLUE: three::Color = 0x68c3c0; | |||
|
|||
fn main() { | |||
env_logger::init().unwrap(); | |||
env_logger::init(); |
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.
What about enabling logging for every example?
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.
would be nice, but requires some sort of example boilerplate, and creeps out of scope for this PR
src/animation.rs
Outdated
@@ -484,12 +489,14 @@ impl ActionData { | |||
)) | |||
}; | |||
let update = frame_start_value.slerp(frame_end_value, s); | |||
use Object; |
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.
Let's import it globally.
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.
oh god
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.
@vitvakatu comments addressed
@@ -19,7 +19,7 @@ const COLOR_BROWN_DARK: three::Color = 0x23190f; | |||
const COLOR_BLUE: three::Color = 0x68c3c0; | |||
|
|||
fn main() { | |||
env_logger::init().unwrap(); | |||
env_logger::init(); |
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.
would be nice, but requires some sort of example boilerplate, and creeps out of scope for this PR
src/animation.rs
Outdated
@@ -484,12 +489,14 @@ impl ActionData { | |||
)) | |||
}; | |||
let update = frame_start_value.slerp(frame_end_value, s); | |||
use Object; |
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.
oh god
.travis.yml
Outdated
@@ -23,7 +23,8 @@ notifications: | |||
on_start: never | |||
|
|||
script: | |||
- cargo build | |||
- cargo check |
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.
sure
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.
@kvark looks good to me
@@ -19,7 +19,7 @@ pub mod basic { | |||
/// Renders triangle meshes with a solid color or texture. | |||
#[derive(Clone, Hash, Debug, PartialEq, Eq)] | |||
pub struct Basic { | |||
/// Solid color applied in the absense of `map`. | |||
/// Solid color applied in the absence of `map`. |
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.
TIL.
Thanks!
Bors r=vitvakatu
… On Feb 24, 2018, at 06:17, David Harvey-Macaulay ***@***.***> wrote:
@alteous commented on this pull request.
In src/material.rs:
> @@ -19,7 +19,7 @@ pub mod basic {
/// Renders triangle meshes with a solid color or texture.
#[derive(Clone, Hash, Debug, PartialEq, Eq)]
pub struct Basic {
- /// Solid color applied in the absense of `map`.
+ /// Solid color applied in the absence of `map`.
TIL.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
184: glTF skinning and morphing animations r=vitvakatu a=kvark This is a revival, rebase, and a substantial rewrite of #151 cc @alteous - if you want to check out how the bones are traversed without caching the world transforms 
Build succeeded |
This is a revival, rebase, and a substantial rewrite of #151
cc @alteous - if you want to check out how the bones are traversed without caching the world transforms