Repository navigation
ルートのノードが決まらない配置で、ルート自身のメッシュを GameObject の位置に置く(#272) - #280
Merged
Merged
Conversation
GameObject の MeshFilter が、新しい形式(名前の表が無い)の複数ノードの FBX のメッシュを 1 つ直接指し、GameObject 名も ノード名と違うとき、どのノードかが決まらず、メッシュのオブジェクトが FBX の中でのノードの変換の分ずれていた。 Unity は MeshFilter が指すメッシュを GameObject の Transform で描くので、この場合はルート自身の Renderer にも 単位行列の relative を渡し、apply_renderer_worlds で GameObject の位置に置き直す。 Office Assets の Showcase で、Cork Board の紙とピンのほか、本・段ボール箱・PC 本体・飾り棚の小物(計 46 オブジェクト。 0.2〜1.4 m ずれていた)が GameObject の位置に合った。Cardboard Boxes、NewGen、Destroyed Building Kit、Synty Starter、 Japanese Apartment、Cafeteria、Yumeka の配置は変わらない(全オブジェクトの行列が一致)。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
合成シーンに Rod Renamed(Rings.fbx の x = 2 にある Rod.001 を指す)を置き、GameObject の位置に置かれることを見る。 修正前は、大きさが 100 倍で位置もずれ、このテストが落ちることを確かめた。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
utagestudio
added a commit
that referenced
this pull request
Nov 26, 2026
#280 の dev.12 とこのブランチの dev.11 が manifest の同じ行で競合したため、両方を含む版として dev.13 にした。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #272
原因
GameObject の MeshFilter が、新しい形式(.meta に名前の表が無い)の複数ノードの FBX のメッシュを 1 つ直接指し、GameObject 名もノード名と違うと、配置のルートがどの FBX のノードか決まらない(
_root_node_labelが None)。このとき、ルート自身の Renderer は置き直しの対象外だったため、メッシュのオブジェクトが FBX の中でのノードの変換の分ずれていた。直し方
Unity は MeshFilter が指すメッシュを GameObject の Transform で描く。そこで、ルートのノードが決まらない配置に限り、ルート自身の Renderer にも単位行列の
relativeを渡し、apply_renderer_worldsで GameObject の位置に置き直す。ノードが決まる配置(#98 / #181 / #185 の、Unity が最上位のノードをルートに畳んだ形)は今までどおり。確認
Rod Renamed(表の無い Rings.fbx の、x = 2 にある Rod.001 を指す)を足した。修正前のコードではこのテストが落ちる(大きさ 100 倍、位置もずれる)。🤖 Generated with Claude Code