Skip to content

External 3D Asset Rendering#117

Merged
rmessaou merged 8 commits into
lichtblick-suite:mainfrom
myemural:feat/3d-model-loading
Aug 12, 2025
Merged

External 3D Asset Rendering#117
rmessaou merged 8 commits into
lichtblick-suite:mainfrom
myemural:feat/3d-model-loading

Conversation

@myemural

@myemural myemural commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

This item is related to loading 3D assets for moving objects if model_reference field of these moving objects are filled with 3D model path.

IMPORTANT NOTE: You should run Lichtblick with --allow-file-access-from-files option to properly load a 3D asset from your local. Example:

lichtblick --allow-file-access-from-files

Example Screenshots
Bounding box and 3D model settings are on:
Screenshot from 2025-08-06 18-36-18

Only bounding box setting is on:
Screenshot from 2025-08-06 18-36-46

Only 3D model setting is on:
Screenshot from 2025-08-06 18-36-33

The console error message when model loading is failed:
Screenshot from 2025-08-11 16-24-27

@jdsika

jdsika commented Aug 4, 2025

Copy link
Copy Markdown
Collaborator

Please add a test .mcap file to showcase the feature. You can use the example models linked here: #71

jdsika
jdsika previously requested changes Aug 6, 2025

@jdsika jdsika left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add .mcap to test feature

@myemural myemural force-pushed the feat/3d-model-loading branch from 5bb252c to 2e6052a Compare August 6, 2025 15:45
@myemural

myemural commented Aug 6, 2025

Copy link
Copy Markdown
Contributor Author

Add .mcap to test feature

@jdsika I added example mcap and model file. Also updated README. Can you please recheck and approve the PR?

@myemural myemural requested a review from jdsika August 7, 2025 14:06
@jdsika

jdsika commented Aug 8, 2025

Copy link
Copy Markdown
Collaborator

I think the path should be relative to the application executable? Instructions should not be Linux/Windows specific. Who did the internal review as I do not see review comments from someone else?

Comment thread example-data/README.md
color,
modelCacheMap.get(mapKey)!,
"",
modelCacheMap.get(mapKey),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check if the traffic lights are still working, why this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I checked it:
Screenshot from 2025-08-11 12-16-14

This change is coming from function signature change of objectToModelPrimitive.

Comment thread src/index.ts Outdated
];

const modelPathKey = obj.model_reference;
if (!modelCache.has(modelPathKey) && modelPathKey.startsWith("/")) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure that something like this is not working for Linux <-> Windows "/"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, but needs to be checked from Windows platform.

Comment thread src/index.ts Outdated
1,
1,
{ r: 0, g: 0, b: 0, a: 0 },
"file://" + movingObject.model_reference, // Should be absolute path

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check functionality Windows <-> Linux

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, but needs to be checked from Windows platform.

@myemural myemural requested a review from jdsika August 11, 2025 09:34
Comment thread example-data/README.md Outdated
Comment thread example-data/README.md Outdated
@myemural myemural force-pushed the feat/3d-model-loading branch from ff16e58 to 970c706 Compare August 12, 2025 12:10
@rmessaou rmessaou requested review from jdsika and removed request for jdsika August 12, 2025 12:26
@rmessaou rmessaou dismissed jdsika’s stale review August 12, 2025 12:27

All requested changes were tackled

@rmessaou rmessaou merged commit 01dcaa6 into lichtblick-suite:main Aug 12, 2025
1 check passed
@jdsika jdsika added this to the v0.0.7 milestone Sep 4, 2025
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.

3 participants