Skip to content

Calculated the bounds of the imported SkinnedMeshRenderer. - #878

Open
XtroTheArctic wants to merge 4 commits into
KhronosGroup:devfrom
XtroTheArctic:feature/876-CalculateBounds
Open

Calculated the bounds of the imported SkinnedMeshRenderer.#878
XtroTheArctic wants to merge 4 commits into
KhronosGroup:devfrom
XtroTheArctic:feature/876-CalculateBounds

Conversation

@XtroTheArctic

Copy link
Copy Markdown
Contributor

This PR fixes #876

@robertdorn83

Copy link
Copy Markdown
Collaborator

sadly this works not with Mixamo models. Also when the import scale is non-1.

fromMixamo.zip

@XtroTheArctic

Copy link
Copy Markdown
Contributor Author

Here are the fixed bounding boxes of multiple models including your mixamo model with various Scale Factor values.

image

I'll commit this change to the PR now.

@XtroTheArctic

Copy link
Copy Markdown
Contributor Author

Fix is committed to this PR.

@robertdorn83

Copy link
Copy Markdown
Collaborator

sorry for the late response! PRs requires enough free time to test them :)

i taked a look into it:
you had added scaleFactor to ImportOptions, but this is only be used by your bounds calculation.
could you remove this from the option class and instead getting the scale factor directly like this:
#if UNITY_EDITOR float scale = _options.ImportContext != null ? _options.ImportContext.ImportScaleFactor : 1; #else float scale = 1f; #endif
importContext is assigned from the Asset Importer, when this is not-null, the SceneImporter is called from the AssetImporter.

other than that, everything else looks fine. would just await these scale changes and then it can be merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skinned Mesh Renderer Bounds aren't calculated.

2 participants