Solved

3d models programmatical interaction

  • 6 December 2023
  • 9 replies
  • 95 views

I have one question related to 3d models. I would like to explore does reveal/cognite supports programmatic change of animation on 3d model. What i am looking for is, i have 3d model of pump and would like to change the animation speed depending on the speed i set from javascript code (basically real time speed which i get from my api). Does it possible ? If so could you guide me to example code how to do that. Thanks

icon

Best answer by Dilini Fernando 18 January 2024, 11:20

View original

9 replies

Hi! I’m not sure I’m understanding correctly. Is the pump part of a 3D model that you have uploaded to CDF? 3D models in CDF will not include animations when shown in Reveal, but you may programmatically animate specific CAD nodes, as shown in the documentation here: https://cognitedata.github.io/reveal-docs/docs/examples/cad-transform-override#animations

Thanks for the reply Hakon Flatval. Yes the pump is part of the 3d model. Reveal doesn’t show the animation of 3d model but we can programmatically animate specific CAD nodes and that can be done by following the documentation link you provided. Is my understanding correct? and also i have one more question the uploaded 3d model is not displaying with colors/textures of original model in reveal and cognite data explorer as well. I am attaching screenshots of original 3d model and 3d model after uploading to cdf. Would you guide me here how can i fix issue related to colors/textures, thanks.

Hi again - I think there is a duplicate question here which I also responded to:


But in short - the reason the colors don’t appear as they should, could be that the model’s textures have not been uploaded together with the model source file. You can upload them together by putting the 3D model file and the texture files together in a ZIP-file, and upload that. Let me know if there is still trouble, or you have already tried this

Yeah, i uploaded the zip file only along with textures and still i don’t see colors/textures.

I see… That is strange. In what file formats are the source model and textures? I’ll notify the backend

source model is in the format 3D Object (.fbx) and texture files i see all of them are in jpeg.

Hi, external texture files for fbx is supposed to work.

We have successfully been able to process and see the textures for other fbx files with external textures, when packed in a zip archive.

 

Can you try other example fbx files with external texture files in a zip archive?

Or try embedding the textures inside the fbx file.

 

In which CDF project did you process this file, and what was the exact point in time (including timezone).
We can investigate logs to see if there are any hints to why the texture file for that oil rig was not included.

 

 

Userlevel 4
Badge +2

Hi @aravind,

Did the above help you?

Br,
Dilini 

Userlevel 4
Badge +2

Hi @aravind,

I hope you were able to resolve the issue. As of now, I will close this thread. If you have further questions, please feel free to reply to this thread.

Br,
Dilini  

Reply