Skip to content

Conversation

ewei2406
Copy link
Collaborator

@ewei2406 ewei2406 commented Aug 16, 2025

Adds Entity Color Options, integrated with new vertex color assets from 3DStreet/3dstreet-assets-dist#45. To test locally, use the new assets branch to serve the assets. This can be done easily by setting assetBasePath in src/assets.js:4 to http://localhost:8000 or wherever it is being served locally.

For more information on Vertex Colors see the tutorial added to the assets repo: https://github.com/3DStreet/3dstreet-assets-dist/blob/e679cb898d842df8e7f82eb96a86e0fdeea9baf7/docs/VertexColors.md

The component custom-colors is used to modify vertex groups' colors. Modifying the colors is done with the new Custom Colors widget, which uses the native OS color picker (shown below is on MacOS). Custom color data is serialized as CSS pairs - Accent: #ffffff;Paint: #ff0000 etc.
1

All entities can have their color modified, though ones without vertex groups will only receive a tint effect. The names of the materials is pulled directly out of the model itself.
2

Managed streets have the ability to apply custom colors to all their descendants that have a material named "Accent". Two options are available: random colors, or neutral auto colors.
3

@ewei2406 ewei2406 marked this pull request as ready for review August 16, 2025 18:25
@ewei2406 ewei2406 changed the title [IGNORE] Entity color options revisit Entity color options revisit Aug 16, 2025
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in 3DStreet Dev Tracking Aug 16, 2025
@kfarr kfarr moved this from Backlog (Not Ready) to For Review in 3DStreet Dev Tracking Aug 16, 2025
@kfarr
Copy link
Collaborator

kfarr commented Aug 17, 2025

As you noted in the assets-dist repo, there is a file size impact of vertex colored models; the file size itself is probably ok as the objects can easily be cached. I also tested this out with complicated scenes and it seems to work ok, for example https://dev-3dstreet.web.app/#/scenes/848d4f7f-d04b-491c-b531-216ed8b9b593

Checklist before merging, this is still a wip

  • - when loading a saved scene with a managed street where a user chose "neutral" colors, the materials of the segment ground (roadway) appear white
  • - when loading a saved scene with managed street where user chose "neutral" colors, the colors of the loaded vehicles do not match the colors when the scene was saved (ie colors for random or neutral should be deterministic. could use a seed like we do for cloned items)
  • - the choice of random, neutral, "reset" -- is this currently stored somewhere? how does the user know which option they selected? this could use more code review from kieran
  • - still to test / review, editing ui of an individual vehicle or object

@kfarr kfarr moved this from For Review to Backlog (Ready) in 3DStreet Dev Tracking Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog (Ready)
Development

Successfully merging this pull request may close these issues.

2 participants