Jump to content

Recommended Posts

Posted

I was able to convert a Techne item model into a JSON using MrCrayfish's Model Creator, but the item placement is a bit off. I would normally have the

"display": {
        "thirdperson": {
            "rotation": [ -90, 0, 0 ],
            "translation": [ 0, 1, -3 ],
            "scale": [ 0.55, 0.55, 0.55 ]
        },
        "firstperson": {
            "rotation": [ 0, -135, 15 ],
            "translation": [ 0, 6, 2 ],
            "scale": [ 1.7, 1.7, 1.7 ]
        }
    }

In normal model files that use textures, but it isn't present in my 3D model file.

 

3D Model File

{
    "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
    "textures": {
        "0": "pm:items/laser_arm_cannon_texture",
        "1": "pm:blocks/New canvas"
    },
    "elements": [
        {
            "name": "Cube1",
            "from": [ 5.5, 4.0, 4.0 ], 
            "to": [ 10.5, 9.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 2.0, 2.0, 3.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 2.0, 2.0, 3.2 ] },
                "south": { "texture": "#0", "uv": [ 6.5, 2.0, 5.3, 3.2 ] },
                "west": { "texture": "#0", "uv": [ 2.0, 2.0, 0.0, 3.2 ] },
                "up": { "texture": "#0", "uv": [ 4.0, 0.0, 4.0, 2.0 ] },
                "down": { "texture": "#0", "uv": [ 2.0, 0.0, 3.0, 2.0 ] }
            }
        },
        {
            "name": "Cube2",
            "from": [ 7.5, 9.0, 4.0 ], 
            "to": [ 8.5, 10.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 1.0, 16.0, 2.0, 15.0 ] },
                "east": { "texture": "#1", "uv": [ 2.0, 15.0, 1.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 1.0, 15.0, 2.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 1.0, 16.0, 2.0, 15.0 ] },
                "up": { "texture": "#1", "uv": [ 1.0, 15.0, 2.0, 16.0 ] },
                "down": { "texture": "#1", "uv": [ 1.0, 15.0, 2.0, 16.0 ] }
            }
        },
        {
            "name": "Cube3",
            "from": [ 7.0, 10.0, 4.0 ], 
            "to": [ 9.0, 12.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 1.0, 15.0, 2.0, 16.0 ] },
                "east": { "texture": "#1", "uv": [ 1.0, 15.0, 2.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 1.0, 15.0, 2.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 2.0, 15.0, 1.0, 16.0 ] },
                "up": { "texture": "#1", "uv": [ 1.0, 15.0, 2.0, 16.0 ] },
                "down": { "texture": "#1", "uv": [ 1.0, 15.0, 2.0, 16.0 ] }
            }
        },
        {
            "name": "Cube4",
            "from": [ 7.5, 9.0, 11.0 ], 
            "to": [ 8.5, 10.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] },
                "east": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] },
                "south": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] },
                "west": { "texture": "#1", "uv": [ 5.0, 1.0, 6.0, 2.0 ] },
                "up": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] },
                "down": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] }
            }
        },
        {
            "name": "Cube5",
            "from": [ 5.0, 6.0, 5.0 ], 
            "to": [ 6.0, 7.0, 10.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 1.0 ] },
                "east": { "texture": "#1", "uv": [ 1.0, 3.0, 2.0, 4.0 ] },
                "south": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] },
                "west": { "texture": "#1", "uv": [ 4.0, 2.0, 5.0, 1.0 ] },
                "up": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] },
                "down": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] }
            }
        },
        {
            "name": "Cube6",
            "from": [ 10.0, 6.0, 5.0 ], 
            "to": [ 11.0, 7.0, 10.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] },
                "east": { "texture": "#1", "uv": [ 5.0, 1.0, 6.0, 2.0 ] },
                "south": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] },
                "west": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] },
                "up": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] },
                "down": { "texture": "#1", "uv": [ 4.0, 1.0, 5.0, 2.0 ] }
            }
        },
        {
            "name": "Cube7",
            "from": [ 7.5, -0.5, 5.8 ], 
            "to": [ 8.5, 3.5, 7.8 ], 
            "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "x", "angle": 22.5 },
            "faces": {
                "north": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "east": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "south": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "west": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "up": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "down": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] }
            }
        },
        {
            "name": "Cube8",
            "from": [ 7.5, 2.0, 5.0 ], 
            "to": [ 8.5, 3.0, 9.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "east": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "south": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "west": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "up": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "down": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] }
            }
        },
        {
            "name": "Cube9",
            "from": [ 7.5, 2.0, 8.0 ], 
            "to": [ 8.5, 4.0, 9.0 ], 
            "faces": {
                "north": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "east": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "south": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "west": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "up": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] },
                "down": { "texture": "#1", "uv": [ 1.0, 7.0, 2.0, 7.0 ] }
            }
        }
    ]
}

 

Where and how can I change my rotation, translation, and scale?

Posted

Just add the

"display"

object to the top-level object like you would any other JSON model.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.