1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-22 15:00:18 +01:00

Convert door model to B3D (#2906)

Using a B3D model I worked out that it would be possible to have only two models (instead of the current four) for the doors and still keep all the mirroring correct when the door is open/closed.
This commit is contained in:
An0n3m0us 2021-12-12 15:37:50 +00:00 committed by GitHub
parent ad183c48ee
commit 3aaabce7a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 4 additions and 194 deletions

View File

@ -448,16 +448,16 @@ function doors.register(name, def)
def.collision_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
def.use_texture_alpha = "clip"
def.mesh = "door_a.obj"
def.mesh = "door_a.b3d"
minetest.register_node(":" .. name .. "_a", table.copy(def))
def.mesh = "door_b.obj"
def.mesh = "door_b.b3d"
minetest.register_node(":" .. name .. "_b", table.copy(def))
def.mesh = "door_a2.obj"
def.mesh = "door_b.b3d"
minetest.register_node(":" .. name .. "_c", table.copy(def))
def.mesh = "door_b2.obj"
def.mesh = "door_a.b3d"
minetest.register_node(":" .. name .. "_d", table.copy(def))
doors.registered_doors[name .. "_a"] = true

Binary file not shown.

Binary file not shown.

View File

@ -1,40 +0,0 @@
# Blender v2.76 (sub 0) OBJ File: 'door_a.blend'
# www.blender.org
mtllib door_a.mtl
o door_a
v 0.499000 -0.499000 -0.499000
v 0.499000 1.499000 -0.499000
v 0.499000 -0.499000 -0.375000
v 0.499000 1.499000 -0.375000
v -0.499000 -0.499000 -0.499000
v -0.499000 1.499000 -0.499000
v -0.499000 -0.499000 -0.375000
v -0.499000 1.499000 -0.375000
vt 0.842105 1.000000
vt 0.894737 1.000000
vt 0.894737 0.000000
vt 0.842105 0.000000
vt 0.421053 1.000000
vt 0.421053 0.000000
vt 0.947368 1.000000
vt 0.947368 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.500000
vt 0.947368 0.500000
vt 1.000000 1.000000
vt 1.000000 0.000000
vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 1.000000
vn -1.000000 0.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
usemtl None
s off
f 2/1/1 4/2/1 3/3/1 1/4/1
f 4/5/2 8/1/2 7/4/2 3/6/2
f 8/2/3 6/7/3 5/8/3 7/3/3
f 6/9/4 2/5/4 1/6/4 5/10/4
f 1/11/5 3/12/5 7/7/5 5/13/5
f 6/14/6 8/8/6 4/12/6 2/11/6

View File

@ -1,50 +0,0 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib door_a2.mtl
o door_a2
v -0.499000 1.499000 -0.499000
v -0.499000 -0.499000 -0.499000
v -0.499000 -0.499000 -0.375000
v -0.499000 1.499000 -0.375000
v 0.499000 -0.499000 -0.375000
v 0.499000 1.499000 -0.375000
v 0.499000 -0.499000 -0.499000
v 0.499000 1.499000 -0.499000
vt 0.894737 1.000000
vt 0.894737 0.000000
vt 0.842105 0.000000
vt 0.842105 1.000000
vt 0.421052 1.000000
vt 0.421052 0.000000
vt 0.000001 0.000000
vt 0.000001 1.000000
vt 0.894737 1.000000
vt 0.894737 0.000000
vt 0.947368 0.000000
vt 0.947368 1.000000
vt 0.842105 1.000000
vt 0.842105 0.000000
vt 0.421052 0.000000
vt 0.421052 1.000000
vt 0.947368 0.000000
vt 0.947368 0.500000
vt 1.000000 0.500000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 1.000000 0.500000
vt 0.947368 0.500000
vt 0.947368 1.000000
vn -1.0000 -0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None.009
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/5/2 3/6/2 5/7/2 6/8/2
f 6/9/3 5/10/3 7/11/3 8/12/3
f 8/13/4 7/14/4 2/15/4 1/16/4
f 2/17/5 7/18/5 5/19/5 3/20/5
f 8/21/6 1/22/6 4/23/6 6/24/6

Binary file not shown.

View File

@ -1,50 +0,0 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib door_b.mtl
o door_b
v 0.499000 1.499000 -0.499000
v 0.499000 1.499000 -0.375000
v 0.499000 -0.499000 -0.375000
v 0.499000 -0.499000 -0.499000
v -0.499000 1.499000 -0.375000
v -0.499000 -0.499000 -0.375000
v -0.499000 1.499000 -0.499000
v -0.499000 -0.499000 -0.499000
vt 0.894736 1.000000
vt 0.947368 1.000000
vt 0.947368 0.000000
vt 0.894736 0.000000
vt 0.842105 1.000000
vt 0.421053 1.000000
vt 0.421053 0.000000
vt 0.842105 0.000000
vt 0.842105 1.000000
vt 0.894736 1.000000
vt 0.894736 0.000000
vt 0.842105 0.000000
vt 0.421053 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 0.421053 0.000000
vt 1.000000 0.500000
vt 0.947368 0.500000
vt 0.947368 1.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 0.947368 0.000000
vt 0.947368 0.500000
vt 1.000000 0.500000
vn 1.0000 0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None.007
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 2/5/2 5/6/2 6/7/2 3/8/2
f 5/9/3 7/10/3 8/11/3 6/12/3
f 7/13/4 1/14/4 4/15/4 8/16/4
f 4/17/5 3/18/5 6/19/5 8/20/5
f 7/21/6 5/22/6 2/23/6 1/24/6

View File

@ -1,50 +0,0 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib door_b2.mtl
o door_b2
v 0.499000 1.499000 -0.499000
v 0.499000 1.499000 -0.375000
v 0.499000 -0.499000 -0.375000
v 0.499000 -0.499000 -0.499000
v -0.499000 1.499000 -0.375000
v -0.499000 -0.499000 -0.375000
v -0.499000 1.499000 -0.499000
v -0.499000 -0.499000 -0.499000
vt 0.842105 1.000000
vt 0.894737 1.000000
vt 0.894737 0.000000
vt 0.842105 0.000000
vt 0.421052 1.000000
vt 0.000001 1.000000
vt 0.000001 0.000000
vt 0.421052 0.000000
vt 0.894737 1.000000
vt 0.947368 1.000000
vt 0.947368 0.000000
vt 0.894737 0.000000
vt 0.842105 1.000000
vt 0.421052 1.000000
vt 0.421052 0.000000
vt 0.842105 0.000000
vt 1.000000 0.500000
vt 0.947368 0.500000
vt 0.947368 1.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 0.947368 0.000000
vt 0.947368 0.500000
vt 1.000000 0.500000
vn 1.0000 0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None.010
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 2/5/2 5/6/2 6/7/2 3/8/2
f 5/9/3 7/10/3 8/11/3 6/12/3
f 7/13/4 1/14/4 4/15/4 8/16/4
f 4/17/5 3/18/5 6/19/5 8/20/5
f 7/21/6 5/22/6 2/23/6 1/24/6