# Imported .dae file not showing properly

**URL:** <https://discourse.processing.org/t/imported-dae-file-not-showing-properly/14714>\
**Category:** Libraries\
**Created:** [October 15, 2019, 1:46pm UTC](https://discourse.processing.org/t/imported-dae-file-not-showing-properly/14714 "2019-10-15T13:46:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![agp](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@agp](https://discourse.processing.org/u/agp)\
**Post date:** [October 15, 2019, 1:46pm UTC](https://discourse.processing.org/t/imported-dae-file-not-showing-properly/14714/1 "2019-10-15T13:46:35Z")

</div>

What I am trying to do is export from Blender a .dae file of an animated object and then import this file on processing and use it there. I created a rotating cube, baked action and exported it as .dae file. the problem is when I am importing it on processing the animation doesn’t work and I can see only a square. My code is the following:

```auto
import ch.dieseite.colladaloader.ColladaLoader;
import ch.dieseite.colladaloader.wrappers.ColladaModel;

ColladaModel model;

void setup() {
  size(500,600,P3D);
  background(255);
  lights();
  frameRate(10);
  model = ColladaLoader.load("cuberot.dae", this, null);
  model.scale(25);
}

void draw() {
  translate(width/2,height/2);
  model.draw(); 
}

```

Can someone explain how can I make this to work? Also why I have to scale my object in order to see it properly? if don’t the object is like a pixel.

If anyone knows another library for doing that job I am all ears. Thanks.

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [October 15, 2019, 1:54pm UTC](https://discourse.processing.org/t/imported-dae-file-not-showing-properly/14714/2 "2019-10-15T13:54:24Z")

</div>

see for add info also

> <https://stackoverflow.com/questions/58395204/importing-dae-file-on-processing>

and

[http://www.die-seite.ch/?colladaloader](http://www.die-seite.ch/?colladaloader)

* * *

possibly model work in a number range 0 … 1.0  
processing in 0 … width pix  
so using a scale looks very good.

* * *

sorry i can not answer your question, just added two links your post missed,  
hopefully you find someone here who has used that old (2015) library  
Or has a better idea how to do it.

---

<div class="post-metadata">

**Author:** ![agp](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@agp](https://discourse.processing.org/u/agp)\
**Post date:** [October 15, 2019, 1:57pm UTC](https://discourse.processing.org/t/imported-dae-file-not-showing-properly/14714/3 "2019-10-15T13:57:30Z")

</div>

The first one is also my question without any reply yet. The second link is the one that I followed but I don’t understand what I am doing wrong.

---

<div class="post-metadata">

**Author:** ![agp](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@agp](https://discourse.processing.org/u/agp)\
**Post date:** [October 15, 2019, 2:07pm UTC](https://discourse.processing.org/t/imported-dae-file-not-showing-properly/14714/4 "2019-10-15T14:07:44Z")

</div>

Maybe you know some newer library that I can use? My search gave me this as a good result I know its an old one. Thank you.

---

<div class="post-metadata">

**Author:** ![behreajj](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@behreajj](https://discourse.processing.org/u/behreajj)\
**Post date:** [October 15, 2019, 4:22pm UTC](https://discourse.processing.org/t/imported-dae-file-not-showing-properly/14714/5 "2019-10-15T16:22:52Z")

</div>

Hi @agp,

Observing the dimensions of your cube in Blender will answer this question:

> Also why I have to scale my object in order to see it properly? if don’t the object is like a pixel

![blendCube](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/929afc68ba671744b7c96f8670c1b10ccc618bb9.png)

Blender’s world coordinate system, origin and units of measurement are different than Processing’s.

A default cube in Blender is 2m. It is centered at (0, 0, 0). z is the up axis. Each vertex of the cube is a variant of (+/- 1, +/- 1, +/- 1).

Processing’s default camera looks at (width / 2, height / 2, 0). y is the down axis. This is for parity between 2D and 3D I guess.

If you don’t want to scale in Processing, you could scale the object transform or the mesh data in Blender. You could also change Processing’s [camera](https://processing.org/reference/camera_.html) and projection.

Best,  
Jeremy

---

<div class="post-metadata">

**Author:** ![agp](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@agp](https://discourse.processing.org/u/agp)\
**Post date:** [October 17, 2019, 9:11am UTC](https://discourse.processing.org/t/imported-dae-file-not-showing-properly/14714/6 "2019-10-17T09:11:18Z")

</div>

No one knows anything about the library?

---

<div class="post-metadata">

**Author:** ![behreajj](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@behreajj](https://discourse.processing.org/u/behreajj)\
**Post date:** [October 17, 2019, 2:46pm UTC](https://discourse.processing.org/t/imported-dae-file-not-showing-properly/14714/7 "2019-10-17T14:46:35Z")

</div>

Hi @agp,

Without being able to see the cube animation, it might help to share some background. Why did you decide to create an animation in Blender, then choose Processing as the export target? Is your ultimate goal a non-interactive animation or an interactive app?

What would the library need to be able to do even after the .dae was imported to cover the differences between Processing and Blender’s animation systems? It helps to have a specific list, because then you can search a library’s documentation and see if it has what you need.

When you say you’re rotating a cube, do you mean you’re animating its transform? A lot of things can be assigned key frames in Blender, so it helps to be specific. What is the cube’s rotation mode?

![rotationMode](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/6464d2fbeb5a11e7ea133d7fa6b570b0b7196f5f.png)

I don’t know anything about the .dae file format, but IMO assuming you could find an up-to-date, well-documented Processing library, it would have to overhaul so much of Processing’s 3D API that you’d spend as much time learning how the library works as you would if you stuck with Blender, or if you exported to another 3D engine with a known animation system included (e.g., Unity).

If the geometry does not matter, only the animation does, you could try recreating the animation with [box](https://processing.org/reference/box_.html) and [rotate](https://processing.org/reference/rotate_.html) (which version(s) you use depend on the rotation mode you set in Blender). Anything more complicated than that and I expect you’d need a library which allowed you to ease between an array of transforms; a simplified example of what I mean, in JavaScript, is [here](https://www.openprocessing.org/sketch/629832).

That’s not an answer, but I hope it helps put some perspective on things.  
Jeremy

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [October 17, 2019, 9:21pm UTC](https://discourse.processing.org/t/imported-dae-file-not-showing-properly/14714/8 "2019-10-17T21:21:33Z")

</div>

try this idea:

go back blender  
export the object only _( no animation (baked action) )_  
to .OBJ .MTL

and use it in processing by

> ##### [PixelFlow](https://github.com/diwi/PixelFlow)
> 
> by [Thomas Diewald](http://www.thomasdiewald.com)

library.

* * *

sorry if it looks like double work

---

<div class="post-metadata">

**Author:** ![agp](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@agp](https://discourse.processing.org/u/agp)\
**Post date:** [October 18, 2019, 9:13am UTC](https://discourse.processing.org/t/imported-dae-file-not-showing-properly/14714/9 "2019-10-18T09:13:51Z")

</div>

Thank you for the information @behreajj,  
I am quite new to Processing and some things are not so clear for me, the reason I decided to go with Blender is that I am more familiar with it. I would like to have an interactive app which enables an animation (not only one animation).  
The cube was just an experiment to see if what I had in mind is working (obviously not). I am still trying to find out the best way to complete my task.  
Again, thank you for the guidance. 🙂

---

<div class="post-metadata">

**Author:** ![agp](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@agp](https://discourse.processing.org/u/agp)\
**Post date:** [October 18, 2019, 9:14am UTC](https://discourse.processing.org/t/imported-dae-file-not-showing-properly/14714/10 "2019-10-18T09:14:42Z")

</div>

Thank you @kll,  
I will check this out.
