-
Notifications
You must be signed in to change notification settings - Fork 427
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
--Render skinning with PBR shader #2204
Conversation
e1f6f22
to
309f886
Compare
965fa47
to
00be243
Compare
8bc3ff1
to
5c0af5a
Compare
96f23e6
to
21081c3
Compare
ec12341
to
83c789a
Compare
83c789a
to
d317f5c
Compare
c624ff9
to
17d2224
Compare
47eccb8
to
c88e64b
Compare
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.
Looks good! I left some minor comments.
I'll test it before approving.
{Mn::Trade::MaterialAttribute::Shininess, 80.0f}}}; | ||
return materialData; | ||
} // ResourceManager::buildDefaultPhongMaterial | ||
|
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.
👍
jointCount_, perVertexJointCount_, secondaryPerVertexJointCount_ | ||
#ifndef MAGNUM_TARGET_WEBGL | ||
, | ||
("mat4(1.0), "_s * jointCount_).exceptSuffix(2) |
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 that I understand what's going on here. Could you add a comment above?
@@ -25,8 +25,8 @@ ArticulatedObjectAttributes::ArticulatedObjectAttributes( | |||
// Set render mode to be default - skin if present, otherwise link | |||
// meshes/primitives | |||
setRenderMode(getAORenderModeName(ArticulatedObjectRenderMode::Default)); | |||
// Set default to be to use Phong shader | |||
setShaderType(getShaderTypeName(ObjectInstanceShaderType::Phong)); | |||
// Set default to be to use the best shader for the material |
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.
Nit: to be to use
--override assetInfo defaults that force flat and shadertype==flat --address missing shader uniforms.
--loading a scene might change simconfig values - ground truth simconfig is in MM and simulator always.
-- we no longer force skins to be flat/unlit.
c88e64b
to
94162e8
Compare
Motivation and Context
This PR adds the capability of rendering skinned meshes using the PBR shader, making changes to the PBR vertex and fragment shaders to support the functionality, along with the loading pipeline. This PR is subsequent to this PR which promoted all the skin handling done by the drawables to the base Drawable class to make it available to both Generic(Phong/Flat) and PBR drawables.
Support of the various skin-related quantities used by the shader is being added in the PBRShader class, and the correct processing of these quantities by pbr.vert is also being added, using Magnum's Flat and Phong shaders' handling of skinning as a guide.
This PR also modifies viewer.cpp functionality to be more flexible and accept either urdf or ao_config.json files to load an Articulated Object.
Here's an example of some results on humanoid
female_3.glb
Since we're generating normals in the PBR shader already, no more tessellation artifacts and poly outlines.
...compared to flat rendered
Here's some interesting modifications I made in engine using some functionality I've been working on.
How Has This Been Tested
All c++ and python tests pass *
*(Had to modify existing test since we no longer force skins to be unlit. New test images are included in this PR)
Types of changes
Checklist