question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to load a DAE model?

See original GitHub issue

I’m trying to load a dae model and i’m using the useLoader like this:

const model = useLoader(ColladaLoader, "path/to/file.dae")

but i’m stuck just there 😦 I read the docs about GLTFLoader but I can’t load the dae file and show it in the browser.

How can I achive this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
drcmdacommented, Apr 29, 2020

the .__$ syntax is a bit old, will be deprecated at some point. see if you can use “nodes”. or if you dont want to put down your own materials:

const { scene } = useLoader(ColladaLoader, url)
<primitive object={scene} dispose={null} />
2reactions
Darkenssescommented, Apr 30, 2020

Thanks for the tip @drcmda, now is working as I expected that

  const { scene } = useLoader(ColladaLoader, modeldae)   
  return (
    <group ref={group}>
      <primitive 
        dispose={null}
        object={scene}         
        children-0-material={new THREE.MeshBasicMaterial({wireframe: true, color: 0xffffff})}
        children-1-material={new THREE.MeshBasicMaterial({wireframe: true, color: 0x0000ff})}
        children-2-material={new THREE.MeshBasicMaterial({wireframe: true, color: 0x0000ff})}
        children-3-material={new THREE.MeshBasicMaterial({wireframe: true, color: 0x00ff00})}
        children-4-material={new THREE.MeshBasicMaterial({wireframe: true, color: 0x0000ff})}
      />
    </group>

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing and Exporting Collada(.dae) in Blender
To import a DAE file into blender first navigate to File > Import > Collada (.dae) · Navigate to the DAE File you'd...
Read more >
DAE File (What It Is & How to Open One)
A DAE file is a Digital Asset Exchange file. Open one with Photoshop or Blender. Convert to OBJ, STL, FBX, etc. with a...
Read more >
How to load DAE files in runtime f…
(1) pre-convert the DAE to .scn, which is SceneKit's preferred input format. This can be done using the graphical SceneKit editor in Xcode,...
Read more >
Import DAE (COLLADA)—ArcGIS CityEngine Resources
Click Browse to open a file dialog box and select a .dae file to import. Import as static model. When checked, the file...
Read more >
DAE File Extension - What is a .dae file and how do I open it?
You can open DAE files and view their contents in Adobe Photoshop (Windows, Mac) and Apple Preview (Mac). If you want to edit...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found