feat(tagger): honor explicit ComponentTags label over content path - #11
Open
youtalk wants to merge 2 commits into
Open
feat(tagger): honor explicit ComponentTags label over content path#11youtalk wants to merge 2 commits into
youtalk wants to merge 2 commits into
Conversation
ATagger::TagActor derives each primitive's semantic CityObjectLabel from its mesh asset's content-path folder name (GetLabelByPath). Imported maps whose assets live outside the recognized label folders -- e.g. AWSIM or other third-party content -- are therefore tagged None and render black in the semantic_segmentation camera, with no way to correct them short of relocating the assets. Let an explicit ComponentTags[0] take precedence: when present and it resolves through GetLabelByFolderName to a non-None label, use it instead of the path-derived label. This lets a map author tag imported meshes per component (in the editor or via Python) without moving assets. Behaviour is unchanged when no ComponentTags are set. Applied to both the static- and skeletal-mesh branches. Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
youtalk
force-pushed
the
fix/tagger-componenttags-label
branch
from
September 5, 2026 04:12
5a3073a to
cec1c5d
Compare
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.
Description
ATagger::TagActorderives each primitive's semanticCityObjectLabelfrom its mesh asset's content-path folder name (GetLabelByPath). Imported maps whose assets live outside the recognized label folders — e.g. AWSIM or other third-party content — are therefore taggedNoneand render black in thesemantic_segmentationcamera, with no way to correct them short of relocating the assets.This change lets an explicit
ComponentTags[0]take precedence: when present and it resolves throughGetLabelByFolderNameto a non-Nonelabel, it is used instead of the path-derived label. A map author can then tag imported meshes per component (in the editor or via Python) without moving assets. Behaviour is unchanged when noComponentTagsare set. Applied to both the static- and skeletal-mesh branches.Base branch:
ue58-dev(retargeted fromue5-dev). The two substantive commits were rebased ontoorigin/ue58-dev; the branch's old fork-CI commit was dropped becauseue58-devalready carries its UE 5.8 equivalent.ue58-dev'sTagger.cppis unchanged fromue5-devin this area — it still writesComponentTagsand reads them back inGetTagOfTaggedComponent, but never honours an editor-set tag as an override — so the fix applies as-is.Where has this been tested?
ue58-devwas compile-checked against UE 5.8Behavioural verification (on 5.5.4, before the rebase): on the Nishi-Shinjuku AWSIM map, setting
ComponentTagson the imported meshes and rebuilding produces a correct CityScapes-palette segmentation (road / building / vegetation / sky / traffic-light / pole) where thesemantic_segmentationcamera was previously all black.UE 5.8 verification (after the rebase):
Tagger.cppcompiles clean against 5.8 in the adaptive non-unity working set. The surroundingcarla-unreal-editortarget does not currently link on this branch, but it fails identically with and without this patch — 16 pre-existing errors inSky.h,CarlaStatics.cpp,CarlaActor.cpp,CarlaGameModeBase.cppandOpenDriveGenerator.cpp(missing includes that only resolve inside unity blobs, plus-Werrorunreachable-code diagnostics). Those are unrelated to this change and are not addressed here.Possible Drawbacks
The first
ComponentTagsentry becomes significant for taggable actors. An actor that already usedComponentTags[0]for an unrelated string matching a CARLA label folder name (e.g. "Road", "Building") would be relabelled; in practice CARLA does not setComponentTagson taggable meshes, and any non-matching tag is ignored (falls back to the existing path-based behaviour).