1

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]
}

ACoder
  • 13
  • 3
  • Have you searched the site⸮ See this question – someonewithpc Jul 31 '15 at 14:04
  • Can each face be UV mapped separately or do you need to keep the mesh unwrapped as one joined uv island via seams? – Todd McIntosh Jul 31 '15 at 14:34
  • If the file import is not the issue, perhaps post the blend of the already imported tetrahedron mesh object. – Todd McIntosh Jul 31 '15 at 14:36
  • { "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] } – ACoder Jul 31 '15 at 14:58
  • 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: http://blend-exchange.giantcowfilms.com – Todd McIntosh Jul 31 '15 at 15:02
  • Here is the URL for the blend file: – ACoder Jul 31 '15 at 15:08

1 Answers1

1

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.

Todd McIntosh
  • 9,421
  • 25
  • 50
  • How do I create seams in Blender? What is the purpose of creating seams - sorry I just don't know much about this. – ACoder Jul 31 '15 at 15:13
  • @ACoder Select the edge(s), Ctrl + E > Mark Seam – p2or Jul 31 '15 at 15:20
  • Updated my answer to include mark seam command. – Todd McIntosh Jul 31 '15 at 16:43
  • 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. – Todd McIntosh Jul 31 '15 at 16:46
  • 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. – ACoder Jul 31 '15 at 18:11
  • Hover over the uv island and press L to select, then G to move and S to scale. You would overlay them if you will be using different texture for each face but you want the uv island in the same location for each texture. If you 're just going to use one texture to cover all the faces, you don't have to overlay the islands. – Todd McIntosh Jul 31 '15 at 20:19
  • What is a UV island? Is it the face or side of the shape? Do I create one? I am doing exactly that; I am trying to use a different texture for each face on my shape. – ACoder Aug 04 '15 at 19:13
  • A UV island is just a group of connected vertices/edges/faces in the UV editor. You can have multiple islands within the UV layout for a mesh. – Todd McIntosh Aug 05 '15 at 04:14
  • Thank you. I was wondering, even though I am eventually doing this in a website through JavaScript (a website); are blender files or the Blender program used to make movies (e.g. making a 3D character to move around)? – ACoder Aug 05 '15 at 13:55
  • Absolutely! Among other things... – Todd McIntosh Aug 05 '15 at 20:16
  • Blender's advantage is that it is a fairly full 3D production suite. Modelling, texturing, animation, lighting, UV unwrapping, rendering and compositing can all be done with the one application. – Todd McIntosh Aug 05 '15 at 20:17
  • I'm sorry; but I need to go back to the question of UV islands. Suppose I want to overlay each uv island onto itself so I can apply a different texture to each side of the shape, but I don't want to move or scale it; I just want to leave it as is (untarnished so to speak). Do I still need to go about the business of selecting each face and not modifying it? Then I'm wondering, then how will it know that I'm making a UV island for each side? This is before I go through the step of selecting all vertices and unwrapping of course. – ACoder Sep 24 '15 at 01:27