Jump to content

How exactly does uv mapping work


ViceVersa

Recommended Posts

i read this page here http://greyminecraftcoder.blogspot.com.au/2014/12/block-models-texturing-quads-faces.html

and i thought i understood how uv mapping worked.  however on another one found here http://minecraft.gamepedia.com/Model

it says the the down uv mapping for a standing torch is from [7,13,9,15] to [7.6.9.8].  If the down face is right in the middle of the block, is only 2x2 pixels big, and the entire thing only stands 10 pixels high i dont understand where the numbers 13 and 15 fit into this at all.  If im not mistaken the down face is the x and z coordinates right?  How exactly is uv mapping measured i just dont understand.  Heres the json file im referring to

 

 

File: torch.json

 

{

    "ambientocclusion": false,

    "textures": {

        "particle": "#torch"

    },

    "elements": [

        {  "from": [ 7, 0, 7 ],

            "to": [ 9, 10, 9 ],

            "shade": false,

            "faces": {

                "down": { "uv": [ 7, 13, 9, 15 ], "texture": "#torch" },

                "up":  { "uv": [ 7,  6, 9,  8 ], "texture": "#torch" }

            }

        },

        {  "from": [ 7, 0, 0 ],

            "to": [ 9, 16, 16 ],

            "shade": false,

            "faces": {

                "west": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" },

                "east": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" }

            }

        },

        {  "from": [ 0, 0, 7 ],

            "to": [ 16, 16, 9 ],

            "shade": false,

            "faces": {

                "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" },

                "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" }

            }

        }

    ]

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.