1
$\begingroup$

I am using Blender version 2.74 and I am using an OpenSCAD file someone else made. I am new to Blender.

The OpenSCAD file comes from this website: http://kitwallace.co.uk/3d/solid-to-scad.xq?id=Tetrahedron&scad=shell I picked "engrave" for the OpenSCAD option.

I am trying to create UV coordinates for the shape after I import the OpenSCAD file in Blender, so that I can dynamically display a unique image on each face of the tetrahedron as an exported or "finished" JSON file using JavaScript. Whether I export into whatever format using some type of technology such as JavaScript - I don't know if that part is relevant. But the question I have is how to compute/make the UV coordinates for this shape in Blender to make this eventually happen.

Below is the JSON file, the blend file couldn't be shown in text format:

{
    "name": "Tetrahedron.001Geometry",
    "uvs": [],
    "faces": [32,0,1,2,0,1,2,32,3,2,1,3,2,1,32,3,0,2,3,0,2,32,3,1,0,3,1,0],
    "vertices": [-2.42416,0,4.19877,-2.42416,-0,-4.19877,4.84832,0,-0,-0,6.85655,-0],
    "metadata": {
        "type": "Geometry",
        "version": 3,
        "vertices": 4,
        "generator": "io_three",
        "faces": 4,
        "uvs": 0,
        "normals": 4
    },
    "normals": [-0.471389,-0.333323,0.816492,-0.471389,-0.333323,-0.816492,0.942808,-0.333323,0,0,1,0]
}

$\endgroup$
  • $\begingroup$ Have you searched the siteāø® See this question $\endgroup$ – someonewithpc Jul 31 '15 at 14:04
  • $\begingroup$ Can each face be UV mapped separately or do you need to keep the mesh unwrapped as one joined uv island via seams? $\endgroup$ – Todd McIntosh Jul 31 '15 at 14:34
  • $\begingroup$ If the file import is not the issue, perhaps post the blend of the already imported tetrahedron mesh object. $\endgroup$ – Todd McIntosh Jul 31 '15 at 14:36
  • $\begingroup$ { "name": "Tetrahedron.001Geometry", "uvs": [], "faces": [32,0,1,2,0,1,2,32,3,2,1,3,2,1,32,3,0,2,3,0,2,32,3,1,0,3,1,0], "vertices": [-2.42416,0,4.19877,-2.42416,-0,-4.19877,4.84832,0,-0,-0,6.85655,-0], "metadata": { "type": "Geometry", "version": 3, "vertices": 4, "generator": "io_three", "faces": 4, "uvs": 0, "normals": 4 }, "normals": [-0.471389,-0.333323,0.816492,-0.471389,-0.333323,-0.816492,0.942808,-0.333323,0,0,1,0] } $\endgroup$ – ACoder Jul 31 '15 at 14:58
  • $\begingroup$ The JSON won't really help us. You'll have to upload the blend file elsewhere and post a link. This is a good option: blend-exchange.giantcowfilms.com $\endgroup$ – Todd McIntosh Jul 31 '15 at 15:02
1
$\begingroup$

You can unwrap the tetrahedron in one of 2 ways:

  1. You can create seams (CTRL+E > Mark Seams) running along the 3 edges from the base to the tip. Then select all vertices and press U > UV Unwrap.

enter image description here enter image description here

  1. You can create seams on all edges (CTRL+E >Mark Seams) , and overlay each uv island on top of itself. Then select all vertices and press U > UV Unwrap.

enter image description here enter image description here

Please note the tetrahedron shape in my example is an approximate shape only in order to demonstrate the unwrap technique.

$\endgroup$
  • $\begingroup$ How do I create seams in Blender? What is the purpose of creating seams - sorry I just don't know much about this. $\endgroup$ – ACoder Jul 31 '15 at 15:13
  • $\begingroup$ @ACoder Select the edge(s), Ctrl + E > Mark Seam $\endgroup$ – p2or Jul 31 '15 at 15:20
  • $\begingroup$ Updated my answer to include mark seam command. $\endgroup$ – Todd McIntosh Jul 31 '15 at 16:43
  • $\begingroup$ Adding seams is just like seams in a fabric pattern for a piece of clothing. If you want all the faces to be connected in the UV map, they can't be connected on every side to unwrap flat and undistorted. $\endgroup$ – Todd McIntosh Jul 31 '15 at 16:46
  • $\begingroup$ Thank your for your ongoing explanation and procedures in doing so. I do have a question about 2nd way of unwrapping the tetrahedron. You said to select all edges and mark the seams on those, and it was the second part of that sentence I had a question about: overlay each uv island on top of itself. I'm unclear on how to do that. What or how do I do that? Sorry for the constant questions - I'm just curious. $\endgroup$ – ACoder Jul 31 '15 at 18:11

Your Answer

By clicking ā€œPost Your Answerā€, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.