- 473
- 6
Я тут задумался... как из Techne экспортировать модель в json код ? (допустим для 3D ресурспака).
Есть конечно 1 способ: залить модель на оф. сайт течне, скачать от туда, распковать архиватором и там будет модель на json коде такого типа
Но я посмотрел, в 3D ресурспаках структура кода вообще другая:
(это код печки)
Вопросы:
1. Как из течне экспортировать модель в json код без заливания на оф. сайт (может можно в Java а потом конвертировать в json как-то) ?
2. Как json код течновской модели подогнать под json код для 3D текстурпака ?
Есть конечно 1 способ: залить модель на оф. сайт течне, скачать от туда, распковать архиватором и там будет модель на json коде такого типа
Код:
{
"Techne": {
"@Version": "2.2",
"Author": "ZeuX",
"DateCreated": "",
"Description": "",
"Models": [
{
"Model": {
"@texture": "pistoltexture.png",
"BaseClass": "ModelBase",
"Geometry": {
"Shape": [
{
"@type": "d9e621f7-957f-4b77-b1ae-20dcd0da7751",
"@name": "Shape1",
"Animation": {
"AnimationAngles": "0,0,0",
"AnimationDuration": "0,0,0",
"AnimationType": "0,0,0"
},
"IsDecorative": "False",
"IsFixed": "False",
"IsMirrored": "False",
"Offset": "0,0,0",
"Position": "0,13,-2",
"Rotation": "0,0,0",
"Size": "1,1,7",
"TextureOffset": "0,0"
},
{
"@type": "d9e621f7-957f-4b77-b1ae-20dcd0da7751",
"@name": "Shape2",
"Animation": {
"AnimationAngles": "0,0,0",
"AnimationDuration": "0,0,0",
"AnimationType": "0,0,0"
},
"IsDecorative": "False",
"IsFixed": "False",
"IsMirrored": "False",
"Offset": "0,0,0",
"Position": "0,14,2",
"Rotation": "15,0,0",
"Size": "1,5,2",
"TextureOffset": "0,0"
},
{
"@type": "d9e621f7-957f-4b77-b1ae-20dcd0da7751",
"@name": "Shape3",
"Animation": {
"AnimationAngles": "0,0,0",
"AnimationDuration": "0,0,0",
"AnimationType": "0,0,0"
},
"IsDecorative": "False",
"IsFixed": "False",
"IsMirrored": "False",
"Offset": "0,0,0",
"Position": "0,14,-2",
"Rotation": "0,0,0",
"Size": "1,1,9",
"TextureOffset": "0,0"
},
{
"@type": "d9e621f7-957f-4b77-b1ae-20dcd0da7751",
"@name": "Shape4",
"Animation": {
"AnimationAngles": "0,0,0",
"AnimationDuration": "0,0,0",
"AnimationType": "0,0,0"
},
"IsDecorative": "False",
"IsFixed": "False",
"IsMirrored": "False",
"Offset": "0,0,0",
"Position": "0,13.8,4.1",
"Rotation": "40,0,0",
"Size": "1,1,1",
"TextureOffset": "0,0"
},
{
"@type": "d9e621f7-957f-4b77-b1ae-20dcd0da7751",
"@name": "Shape5",
"Animation": {
"AnimationAngles": "0,0,0",
"AnimationDuration": "0,0,0",
"AnimationType": "0,0,0"
},
"IsDecorative": "False",
"IsFixed": "False",
"IsMirrored": "False",
"Offset": "0,0,0",
"Position": "0,12.5,0",
"Rotation": "-25,0,0",
"Size": "1,1,2",
"TextureOffset": "0,0"
},
{
"@type": "d9e621f7-957f-4b77-b1ae-20dcd0da7751",
"@name": "Shape6",
"Animation": {
"AnimationAngles": "0,0,0",
"AnimationDuration": "0,0,0",
"AnimationType": "0,0,0"
},
"IsDecorative": "False",
"IsFixed": "False",
"IsMirrored": "False",
"Offset": "0,0,0",
"Position": "0,13.2,-2.1",
"Rotation": "0,0,0",
"Size": "1,1,1",
"TextureOffset": "0,0"
},
{
"@type": "d9e621f7-957f-4b77-b1ae-20dcd0da7751",
"@name": "Shape7",
"Animation": {
"AnimationAngles": "0,0,0",
"AnimationDuration": "0,0,0",
"AnimationType": "0,0,0"
},
"IsDecorative": "False",
"IsFixed": "False",
"IsMirrored": "False",
"Offset": "0,0,0",
"Position": "0,14,1.5",
"Rotation": "-7,0,0",
"Size": "1,2,1",
"TextureOffset": "0,0"
},
{
"@type": "d9e621f7-957f-4b77-b1ae-20dcd0da7751",
"@name": "Shape8",
"Animation": {
"AnimationAngles": "0,0,0",
"AnimationDuration": "0,0,0",
"AnimationType": "0,0,0"
},
"IsDecorative": "False",
"IsFixed": "False",
"IsMirrored": "False",
"Offset": "0,0,-1",
"Position": "0,16.2,0.9",
"Rotation": "54.8224852071006,0,0",
"Size": "1,1,2",
"TextureOffset": "0,0"
},
{
"@type": "d9e621f7-957f-4b77-b1ae-20dcd0da7751",
"@name": "Shape9",
"Animation": {
"AnimationAngles": "0,0,0",
"AnimationDuration": "0,0,0",
"AnimationType": "0,0,0"
},
"IsDecorative": "False",
"IsFixed": "False",
"IsMirrored": "False",
"Offset": "0,0,0",
"Position": "0,13.85,4.5",
"Rotation": "0,0,0",
"Size": "1,1,2",
"TextureOffset": "0,0"
}
]
},
"GlScale": "1,1,1",
"Name": "pistol",
"TextureSize": "20,10"
}
}
],
"Name": "pistol",
"PreviewImage": "",
"ProjectName": "pistol",
"ProjectType": "Minecraft"
}
}
Но я посмотрел, в 3D ресурспаках структура кода вообще другая:
(это код печки)
Код:
{
"__comment": "Model by @Georg_Schmo",
"ambientocclusion": false,
"inventoryRender3D": false,
"textures": {
"down": "blocks/furnace_top",
"up": "blocks/furnace_top",
"north": "blocks/furnace_front_off",
"south": "blocks/furnace_side",
"west": "blocks/furnace_side",
"east": "blocks/furnace_side",
"particle": "blocks/furnace_front_off"
},
"elements": [
{
"from": [ 0, 0, 15 ],
"to": [ 16, 16, 16 ],
"__comment": "OUT",
"faces": {
"down": { "uv": [ 0, 15, 16, 16 ], "texture": "#down" },
"up": { "uv": [ 0, 15, 16, 16 ], "texture": "#up" },
"north": { "uv": [ 16, 0, 0, 16 ], "texture": "#north" },
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#south" },
"west": { "uv": [ 15, 0, 16, 16 ], "texture": "#west" },
"east": { "uv": [ 16, 0, 15, 16 ], "texture": "#east" }
}
},
{
"from": [ 0, 0, 0 ],
"to": [ 1, 16, 15 ],
"__comment": "OUT",
"faces": {
"down": { "uv": [ 0, 0, 1, 15 ], "texture": "#down" },
"up": { "uv": [ 0, 0, 1, 15 ], "texture": "#up" },
"north": { "uv": [ 1, 0, 0, 16 ], "texture": "#north" },
"west": { "uv": [ 0, 0, 15, 16 ], "texture": "#west" },
"east": { "uv": [ 15, 0, 0, 16 ], "texture": "#east" }
}
},
{
"from": [ 15, 0, 0 ],
"to": [ 16, 16, 15 ],
"__comment": "OUT",
"faces": {
"down": { "uv": [ 15, 0, 16, 15 ], "texture": "#down" },
"up": { "uv": [ 15, 0, 16, 15 ], "texture": "#up" },
"north": { "uv": [ 16, 0, 15, 16 ], "texture": "#north" },
"west": { "uv": [ 0, 0, 15, 16 ], "texture": "#west" },
"east": { "uv": [ 15, 0, 0, 16 ], "texture": "#east" }
}
},
{
"from": [ 1, 0, 0 ],
"to": [ 15, 1, 15 ],
"__comment": "OUT",
"faces": {
"down": { "uv": [ 1, 0, 15, 15 ], "texture": "#down" },
"up": { "uv": [ 1, 0, 15, 15 ], "texture": "#up" },
"north": { "uv": [ 15, 15, 1, 16 ], "texture": "#north" }
}
},
{
"from": [ 1, 15, 0 ],
"to": [ 15, 16, 15 ],
"__comment": "OUT",
"faces": {
"down": { "uv": [ 1, 0, 15, 15 ], "texture": "#down" },
"up": { "uv": [ 1, 0, 15, 15 ], "texture": "#up" },
"north": { "uv": [ 15, 0, 1, 1 ], "texture": "#north" }
}
},
{
"from": [ 1, 12, 0 ],
"to": [ 15, 15, 1 ],
"faces": {
"down": { "uv": [ 1, 0, 15, 1 ], "texture": "#down" },
"north": { "uv": [ 15, 1, 1, 4 ], "texture": "#north" },
"south": { "uv": [ 1, 1, 15, 4 ], "texture": "#south" }
}
},
{
"from": [ 1, 1, 0 ],
"to": [ 3, 12, 1 ],
"faces": {
"north": { "uv": [ 3, 4, 1, 15 ], "texture": "#north" },
"south": { "uv": [ 1, 4, 3, 15 ], "texture": "#south" },
"east": { "uv": [ 1, 4, 0, 15 ], "texture": "#east" }
}
},
{
"from": [ 3, 3, 0 ],
"to": [ 4, 12, 1 ],
"faces": {
"down": { "uv": [ 3, 0, 4, 1 ], "texture": "#down" },
"north": { "uv": [ 4, 4, 3, 13 ], "texture": "#north" },
"south": { "uv": [ 3, 4, 4, 13 ], "texture": "#south" },
"east": { "uv": [ 1, 4, 0, 13 ], "texture": "#east" }
}
},
{
"from": [ 12, 3, 0 ],
"to": [ 13, 12, 1 ],
"__comment": "Cube*",
"faces": {
"down": { "uv": [ 12, 0, 13, 1 ], "texture": "#down" },
"north": { "uv": [ 13, 4, 12, 13 ], "texture": "#north" },
"south": { "uv": [ 12, 4, 13, 13 ], "texture": "#south" },
"west": { "uv": [ 0, 4, 1, 13 ], "texture": "#west" }
}
},
{
"from": [ 13, 1, 0 ],
"to": [ 15, 12, 1 ],
"__comment": "Cube*",
"faces": {
"north": { "uv": [ 15, 4, 13, 15 ], "texture": "#north" },
"south": { "uv": [ 13, 4, 15, 15 ], "texture": "#south" },
"west": { "uv": [ 0, 4, 1, 15 ], "texture": "#west" }
}
},
{
"from": [ 4, 11, 0 ],
"to": [ 5, 12, 1 ],
"faces": {
"down": { "uv": [ 4, 0, 5, 1 ], "texture": "#down" },
"north": { "uv": [ 5, 4, 4, 5 ], "texture": "#north" },
"east": { "uv": [ 1, 4, 0, 5 ], "texture": "#east" }
}
},
{
"from": [ 11, 11, 0 ],
"to": [ 12, 12, 1 ],
"__comment": "Cube*",
"faces": {
"down": { "uv": [ 11, 0, 12, 1 ], "texture": "#down" },
"north": { "uv": [ 12, 4, 11, 5 ], "texture": "#north" },
"west": { "uv": [ 0, 4, 1, 5 ], "texture": "#west" }
}
},
{
"from": [ 4, 5, 0 ],
"to": [ 12, 9, 1 ],
"faces": {
"down": { "uv": [ 4, 0, 12, 1 ], "texture": "#down" },
"up": { "uv": [ 4, 0, 12, 1 ], "texture": "#up" },
"north": { "uv": [ 12, 7, 4, 11 ], "texture": "#north" },
"south": { "uv": [ 4, 7, 12, 11 ], "texture": "#south" }
}
},
{
"from": [ 4, 4, 0 ],
"to": [ 6, 5, 1 ],
"faces": {
"down": { "uv": [ 4, 0, 6, 1 ], "texture": "#down" },
"north": { "uv": [ 6, 11, 4, 12 ], "texture": "#north" },
"east": { "uv": [ 1, 11, 0, 12 ], "texture": "#east" }
}
},
{
"from": [ 10, 4, 0 ],
"to": [ 12, 5, 1 ],
"__comment": "Cube*",
"faces": {
"down": { "uv": [ 10, 0, 12, 1 ], "texture": "#down" },
"north": { "uv": [ 12, 11, 10, 12 ], "texture": "#north" },
"west": { "uv": [ 0, 11, 1, 12 ], "texture": "#west" }
}
},
{
"from": [ 4, 8, 1 ],
"to": [ 12, 9, 4 ],
"__comment": "TOP INSIDE",
"faces": {
"down": { "uv": [ 4, 1, 12, 4 ], "texture": "#down" },
"up": { "uv": [ 4, 1, 12, 4 ], "texture": "#up" },
"south": { "uv": [ 4, 7, 12, 8 ], "texture": "#south" },
"west": { "uv": [ 1, 7, 4, 8 ], "texture": "#west" },
"east": { "uv": [ 4, 7, 1, 8 ], "texture": "#east" }
}
},
{
"from": [ 12, 9, 1 ],
"to": [ 13, 11, 4 ],
"__comment": "TOP INSIDE",
"faces": {
"down": { "uv": [ 12, 1, 13, 4 ], "texture": "#down" },
"up": { "uv": [ 12, 1, 13, 4 ], "texture": "#up" },
"south": { "uv": [ 12, 5, 13, 7 ], "texture": "#south" },
"west": { "uv": [ 1, 5, 4, 7 ], "texture": "#west" },
"east": { "uv": [ 1, 5, 4, 7 ], "texture": "#east" }
}
},
{
"from": [ 3, 9, 1 ],
"to": [ 4, 11, 4 ],
"__comment": "TOP INSIDE",
"faces": {
"down": { "uv": [ 3, 1, 4, 4 ], "texture": "#down" },
"up": { "uv": [ 3, 1, 4, 4 ], "texture": "#up" },
"south": { "uv": [ 3, 5, 4, 7 ], "texture": "#south" },
"west": { "uv": [ 1, 5, 4, 7 ], "texture": "#west" },
"east": { "uv": [ 1, 5, 4, 7 ], "texture": "#east" }
}
},
{
"from": [ 4, 11, 1 ],
"to": [ 5, 12, 4 ],
"__comment": "TOP INSIDE",
"faces": {
"down": { "uv": [ 4, 1, 5, 4 ], "texture": "#down" },
"up": { "uv": [ 4, 1, 5, 4 ], "texture": "#up" },
"west": { "uv": [ 1, 4, 4, 5 ], "texture": "#west" },
"east": { "uv": [ 1, 4, 4, 5 ], "texture": "#east" }
}
},
{
"from": [ 11, 11, 1 ],
"to": [ 12, 12, 4 ],
"__comment": "TOP INSIDE",
"faces": {
"down": { "uv": [ 4, 1, 5, 4 ], "texture": "#down" },
"up": { "uv": [ 4, 1, 5, 4 ], "texture": "#up" },
"west": { "uv": [ 1, 4, 4, 5 ], "texture": "#west" },
"east": { "uv": [ 1, 4, 4, 5 ], "texture": "#east" }
}
},
{
"from": [ 5, 12, 1 ],
"to": [ 11, 13, 4 ],
"__comment": "TOP INSIDE",
"faces": {
"down": { "uv": [ 5, 1, 11, 4 ], "texture": "#down" },
"up": { "uv": [ 5, 1, 11, 4 ], "texture": "#up" },
"south": { "uv": [ 5, 3, 11, 4 ], "texture": "#south" },
"west": { "uv": [ 1, 3, 4, 4 ], "texture": "#west" },
"east": { "uv": [ 1, 3, 4, 4 ], "texture": "#east" }
}
},
{
"from": [ 4, 9, 4 ],
"to": [ 12, 12, 5 ],
"__comment": "TOP INSIDE",
"faces": {
"down": { "uv": [ 4, 4, 12, 5 ], "texture": "#down" },
"up": { "uv": [ 4, 4, 12, 5 ], "texture": "#up" },
"north": { "uv": [ 12, 4, 4, 7 ], "texture": "#north" },
"south": { "uv": [ 4, 4, 12, 7 ], "texture": "#south" },
"west": { "uv": [ 4, 4, 5, 7 ], "texture": "#west" },
"east": { "uv": [ 5, 4, 4, 7 ], "texture": "#east" }
}
},
{
"from": [ 2, 0, 1 ],
"to": [ 14, 5, 2 ],
"faces": {
"down": { "uv": [ 2, 1, 14, 2 ], "texture": "#down" },
"up": { "uv": [ 2, 1, 14, 2 ], "texture": "#up" },
"north": { "uv": [ 14, 11, 2, 16 ], "texture": "#north" },
"south": { "uv": [ 2, 11, 14, 16 ], "texture": "#south" },
"west": { "uv": [ 1, 11, 2, 16 ], "texture": "#west" },
"east": { "uv": [ 2, 11, 1, 16 ], "texture": "#east" }
}
}
]
}
Вопросы:
1. Как из течне экспортировать модель в json код без заливания на оф. сайт (может можно в Java а потом конвертировать в json как-то) ?
2. Как json код течновской модели подогнать под json код для 3D текстурпака ?
P.S. я знаю что есть спец. проги для создания моделей для 3D ресурспаков (MrCrayfish's Model Creator или opl's Model Creator), но всё же на течне много моделей...