# Rendering a 3D shape from a File

**URL:** <https://discourse.processing.org/t/rendering-a-3d-shape-from-a-file/13458>\
**Category:** Coding Questions\
**Created:** [August 18, 2019, 8:44pm UTC](https://discourse.processing.org/t/rendering-a-3d-shape-from-a-file/13458 "2019-08-18T20:44:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GuilhermeVolker](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/guilhermevolker/32/5657_2.png) [@GuilhermeVolker](https://discourse.processing.org/u/GuilhermeVolker)\
**Post date:** [August 18, 2019, 8:44pm UTC](https://discourse.processing.org/t/rendering-a-3d-shape-from-a-file/13458/1 "2019-08-18T20:44:09Z")

</div>

Hello!  
I would like to know if there is some how to render a 3D shape on .svg or .obj, like any file from this website: [https://www.tinkercad.com/things](https://www.tinkercad.com/things)  
I try’d to use Pshape object but didan’t work properly

```auto
PShape s;

void setup() {
  size(1200,700,P3D);
  // The file "bot.svg" must be in the data folder
  // of the current sketch to load successfully
  s = loadShape("tinker.obj"); //or .svg
}

int x=0;
void draw() {
  background(100);
  fill(255);
  translate(width/2,height/2);
  rotateX(radians(x));
  shape(s, 0,0,200,200);
  x++;
}

```

---

<div class="post-metadata">

**Author:** ![Tiemen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tiemen/32/5477_2.png) [@Tiemen](https://discourse.processing.org/u/Tiemen)\
**Post date:** [August 18, 2019, 11:48pm UTC](https://discourse.processing.org/t/rendering-a-3d-shape-from-a-file/13458/2 "2019-08-18T23:48:05Z")

</div>

I believe svg files are two-dimensional, while object files are 3D. On the page [https://processing.org/reference/loadShape\_.html](https://processing.org/reference/loadShape_.html) they use two parameters instead of four for **shape(s, 0,0,200,200);**. Does adjusting that fix your issue?

---

<div class="post-metadata">

**Author:** ![GuilhermeVolker](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/guilhermevolker/32/5657_2.png) [@GuilhermeVolker](https://discourse.processing.org/u/GuilhermeVolker)\
**Post date:** [August 19, 2019, 12:09am UTC](https://discourse.processing.org/t/rendering-a-3d-shape-from-a-file/13458/3 "2019-08-19T00:09:32Z")

</div>

Yep, the .obj with 2 parameter works! It’s the only thing that i haven’t tried haha. Thanks

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [August 19, 2019, 12:51pm UTC](https://discourse.processing.org/t/rendering-a-3d-shape-from-a-file/13458/4 "2019-08-19T12:51:09Z")

</div>

You can place it in 3D space using translate with 3 parameters and then shape with 0,0
