View Issue Details

IDProjectCategoryView StatusLast Update
0003058DarkRadiantScriptingpublic03.01.2018 08:50
Reporterangua Assigned Togreebo  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version1.8.0 
Summary0003058: Export ASE script sometimes exports wrong shader on some faces
DescriptionAfter export, the ase model sometimes has the wrong shader on some faces
Steps To ReproduceExport the sarcophagus in the attached test map. There are skulls on two sides. The ase model only shows the skull on the left, and the grey stone on the right.

It seems that the script fails to separate the two non-caulked faces of the brush. The mesh in the ase file is mesh17, containing both the side and the bottom of the brush. If I change the material to *MATERIAL_REF 3, the skull appears both on the side and the bottom.
Additional InformationThe happens regardless whether I export the sarcophagus as func_static or as primitives.
When I include caulk, it also happens, and there is another occurence of the bug at one of the top faces which is textured in caulk on the ase model.
The bug doesn't happen when I only export the single brush in question. If I do this, both faces show the correct shader.
TagsNo tags attached.
Attached Files
export_ase_shader_test.map (43,112 bytes)   
Version 2
// entity 0
{
"classname" "func_static"
"name" "func_static_3"
"model" "func_static_3"
"origin" "0 0 0"
// primitive 0
{
brushDef3
{
( 0 0 -1 -20 ) ( ( 0.01302083302289248 0 236.5338897705078 ) ( 0 0.01302083302289248 18.99739456176758 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 -1 0 -23 ) ( ( 0.01302083302289248 0 18.68489646911621 ) ( 0 0.01302083302289248 19.21875 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 0 1 -9 ) ( ( 0.03125 0 44.0625 ) ( 0 0.03125 46.5 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -37 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 -37 ) ( ( 0.03125 0 43.3125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 -23 ) ( ( 0.01302083302289248 0 237.3151245117188 ) ( 0 0.01302083302289248 19.21875 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
}
}
// primitive 1
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 1 4 0 0 0 )
(
( ( 42.5 17.5 -20 236.7617492675781 18.44400978088379 ) ( 37 17.5 -20 236.7617492675781 18.51562309265137 ) ( 37 23 -20 236.8333587646484 18.51562309265137 ) )
( ( 37 17.5 -20 236.7617492675781 18.51562309265137 ) ( 37 17.5 -20 236.7617492675781 18.51562309265137 ) ( 37 17.5 -20 236.7617492675781 18.51562309265137 ) )
( ( 37 17.5 -20 236.7617492675781 18.51562309265137 ) ( 37 17.5 -20 236.7617492675781 18.51562309265137 ) ( 37 17.5 -20 236.7617492675781 18.51562309265137 ) )
)
}
}
// primitive 2
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 1 4 0 0 0 )
(
( ( 48 12 -20 236.6901245117188 18.37239456176758 ) ( 42.5 12 -20 236.6901245117188 18.44400978088379 ) ( 42.5 17.5 -20 236.7617492675781 18.44400978088379 ) )
( ( 42.5 12 -20 236.6901245117188 18.44400978088379 ) ( 42.5 12 -20 236.6901245117188 18.44400978088379 ) ( 42.5 12 -20 236.6901245117188 18.44400978088379 ) )
( ( 42.5 12 -20 236.6901245117188 18.44400978088379 ) ( 42.5 12 -20 236.6901245117188 18.44400978088379 ) ( 42.5 12 -20 236.6901245117188 18.44400978088379 ) )
)
}
}
// primitive 3
{
brushDef3
{
( 0 -0.7071068286895752 0.7071068286895752 -30.40574264526367 ) ( ( 0.01302083302289248 0 18.68489646911621 ) ( 0 0.01302083395421505 226.5003662109375 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 0 -1 18 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( -0.7071068286895752 0.7071068286895752 0 -9.899532318115234 ) ( ( 0.03125 0 44.82165145874023 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0.7071068286895752 0.7071068286895752 0 -9.899532318115234 ) ( ( 0.03125 0 44.8658447265625 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 23 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 4
{
brushDef3
{
( 0 0 -1 18 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 0 1 -20 ) ( ( 0.02357020042836666 0 0.511785089969635 ) ( 0 0.01071373373270035 0.5053467750549316 ) ) "textures/darkmod/stone/sculpted/corpse" 0 0 0
( 0 -1 0 12 ) ( ( 0.03125 0 43.921875 ) ( 0 0.03125 46.265625 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 -42.5 ) ( ( 0.03125 0 44.8125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -42.5 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 -17.5 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 5
{
brushDef3
{
( -1 0 0 -50 ) ( ( 0.0833333283662796 0 35.43552780151367 ) ( 0 0.1428571492433548 2.565965175628662 ) ) "textures/darkmod/stone/sculpted/carved_design_bones02" 0 0 0
( 1 0 0 -50 ) ( ( 0.0833333283662796 0 218.0701446533203 ) ( 0 0.1428571492433548 2.566579818725586 ) ) "textures/darkmod/stone/sculpted/carved_design_bones02" 0 0 0
( 0 0 1 -18 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 0 -1 11 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 -14 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 -14 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 6
{
brushDef3
{
( 0 -1 0 -25 ) ( ( 0.0833333283662796 0 33.02617645263672 ) ( 0 0.1428571492433548 2.565057277679443 ) ) "textures/darkmod/stone/sculpted/carved_design_bones02" 0 0 0
( 0 0 1 -18 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 0 -1 11 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 14 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 -39 ) ( ( 0.03125 0 44.8125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -39 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 7
{
brushDef3
{
( 0 1 0 -25 ) ( ( 0.0833333283662796 0 71.10857391357422 ) ( 0 0.1428571492433548 2.565753936767578 ) ) "textures/darkmod/stone/sculpted/carved_design_bones02" 0 0 0
( 0 0 1 -18 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 0 -1 11 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 14 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 -39 ) ( ( 0.03125 0 44.8125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -39 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 8
{
patchDef3
{
"textures/darkmod/stone/sculpted/carved_design_bones02"
( 3 3 4 1 0 0 0 )
(
( ( -44.5 -19.5 18 -217.5816802978516 256 ) ( -44.5 -19.5 14.5 -217.5816802978516 256.5 ) ( -44.5 -19.5 11 -217.5816802978516 257 ) )
( ( -44.5 -14 18 -218.4983520507813 256 ) ( -44.5 -14 14.5 -218.4983520507813 256.5 ) ( -44.5 -14 11 -218.4983520507813 257 ) )
( ( -50 -14 18 -219.4150085449219 256 ) ( -50 -14 14.5 -219.4150085449219 256.5 ) ( -50 -14 11 -219.4150085449219 257 ) )
)
}
}
// primitive 9
{
brushDef3
{
( 0 0 -1 18 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 0 1 -20 ) ( ( 0.02357020042836666 0 0.511785089969635 ) ( 0 0.01071373373270035 0.5053467750549316 ) ) "textures/darkmod/stone/sculpted/corpse" 0 0 0
( 0 1 0 17.5 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 -37 ) ( ( 0.03125 0 44.8125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -37 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 -23 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 10
{
brushDef3
{
( 0 0 -1 18 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 0 1 -20 ) ( ( 0.02357020042836666 0 0.511785089969635 ) ( 0 0.01071373373270035 0.5053467750549316 ) ) "textures/darkmod/stone/sculpted/corpse" 0 0 0
( 0 -1 0 -12 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 -12 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 -48 ) ( ( 0.03125 0 44.8125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -48 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 11
{
brushDef3
{
( 0 0.7071068286895752 0.7071068286895752 -30.40574264526367 ) ( ( 0.01302083302289248 0 237.3151245117188 ) ( 0 0.01302083395421505 56.67903518676758 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 0 -1 18 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( -0.7071068286895752 -0.7071068286895752 0 -9.899532318115234 ) ( ( 0.03125 0 44.8216552734375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0.7071068286895752 -0.7071068286895752 0 -9.899532318115234 ) ( ( 0.03125 0 44.86584854125977 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 23 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 12
{
brushDef3
{
( 0.7071068286895752 0 0.7071068286895752 -48.08345794677734 ) ( ( 0.01302083302289248 0 60.9375 ) ( 0 0.01302083395421505 26.80192756652832 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 0 -1 18 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( -0.7071068286895752 -0.7071068286895752 0 25.45592880249023 ) ( ( 0.03125 0 44.8216552734375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -0.7071068286895752 0.7071068286895752 0 25.45592880249023 ) ( ( 0.03125 0 44.82165145874023 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 48 ) ( ( 0.03125 0 44.8125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 13
{
brushDef3
{
( 0.7071068286895752 0 -0.7071068286895752 -27.57723045349121 ) ( ( 0.01302083302289248 0 18.69791603088379 ) ( 0 0.01302083395421505 19.20306396484375 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 0 1 -11 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( -0.7071068286895752 -0.7071068286895752 0 25.45592880249023 ) ( ( 0.03125 0 44.8216552734375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -0.7071068286895752 0.7071068286895752 0 25.45592880249023 ) ( ( 0.03125 0 44.82165145874023 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 48 ) ( ( 0.03125 0 44.8125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 14
{
brushDef3
{
( -0.7071068286895752 0 -0.7071068286895752 -27.57723045349121 ) ( ( 0.01302083302289248 0 18.67187690734863 ) ( 0 0.01302083395421505 19.20306396484375 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 0 1 -11 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0.7071068286895752 -0.7071068286895752 0 25.45592880249023 ) ( ( 0.03125 0 44.66957855224609 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0.7071068286895752 0.7071068286895752 0 25.45592880249023 ) ( ( 0.03125 0 44.8658447265625 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 48 ) ( ( 0.03125 0 43.71875 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 15
{
brushDef3
{
( 0 -0.7071068286895752 -0.7071068286895752 -9.899504661560059 ) ( ( 0.01302083302289248 0 18.68489646911621 ) ( 0 0.01302083395421505 19.21227264404297 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 0 1 -11 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( -0.7071068286895752 0.7071068286895752 0 -9.899532318115234 ) ( ( 0.03125 0 44.82165145874023 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0.7071068286895752 0.7071068286895752 0 -9.899532318115234 ) ( ( 0.03125 0 44.8658447265625 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 23 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 16
{
brushDef3
{
( 0 0.7071068286895752 -0.7071068286895752 -9.899507522583008 ) ( ( 0.01302083302289248 0 237.3151245117188 ) ( 0 0.01302083395421505 19.17543983459473 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 0 1 -11 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( -0.7071068286895752 -0.7071068286895752 0 -9.899532318115234 ) ( ( 0.03125 0 44.8216552734375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0.7071068286895752 -0.7071068286895752 0 -9.899532318115234 ) ( ( 0.03125 0 44.86584854125977 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 23 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 17
{
brushDef3
{
( -1 0 0 -48 ) ( ( 0.04281816631555557 0 1.505345344543457 ) ( 0 0.0357142835855484 0.285033643245697 ) ) "textures/darkmod/stone/sculpted/carved_design_skull01" 0 0 0
( 0 0 -1 -20 ) ( ( 0.01302083302289248 0 236.5338897705078 ) ( 0 0.01302083302289248 18.99739456176758 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 0 1 -9 ) ( ( 0.03125 0 43.71875 ) ( 0 0.03125 46.15625 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 -12 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 -12 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 37 ) ( ( 0.03125 0 44.0625 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 18
{
brushDef3
{
( 0 0 -1 -20 ) ( ( 0.01302083302289248 0 236.5338897705078 ) ( 0 0.01302083302289248 18.99739456176758 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 1 0 0 -48 ) ( ( 0.0416666753590107 0 0.4973805844783783 ) ( 0 0.03589900955557823 0.2820197939872742 ) ) "textures/darkmod/stone/sculpted/carved_design_skull01" 0 0 0
( 0 0 1 -9 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 -12 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 -12 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 37 ) ( ( 0.03125 0 44.8125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 19
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( -37 -23 9 18.0625 19.1015625 ) ( -37 -23 -6 18.0625 19.296875 ) ( -37 -23 -20 18.0625 19.47916603088379 ) )
( ( -37 -17.5 9 18.13411521911621 19.1015625 ) ( -37 -17.5 -6 18.13411521911621 19.296875 ) ( -37 -17.5 -20 18.13411521911621 19.47916603088379 ) )
( ( -42.5 -17.5 9 18.20573043823242 19.1015625 ) ( -42.5 -17.5 -6 18.20573043823242 19.296875 ) ( -42.5 -17.5 -20 18.20573043823242 19.47916603088379 ) )
)
}
}
// primitive 20
{
patchDef3
{
"textures/darkmod/stone/sculpted/carved_design_bones02"
( 3 3 4 1 0 0 0 )
(
( ( -39 -25 18 -217.5816802978516 256 ) ( -39 -25 14.5 -217.5816802978516 256.5 ) ( -39 -25 11 -217.5816802978516 257 ) )
( ( -39 -19.5 18 -218.4983520507813 256 ) ( -39 -19.5 14.5 -218.4983520507813 256.5 ) ( -39 -19.5 11 -218.4983520507813 257 ) )
( ( -44.5 -19.5 18 -219.4150085449219 256 ) ( -44.5 -19.5 14.5 -219.4150085449219 256.5 ) ( -44.5 -19.5 11 -219.4150085449219 257 ) )
)
}
}
// primitive 21
{
brushDef3
{
( 0 0 -1 18 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 0 1 -20 ) ( ( 0.02357020042836666 0 0.511785089969635 ) ( 0 0.01071373373270035 0.5053467750549316 ) ) "textures/darkmod/stone/sculpted/corpse" 0 0 0
( 0 1 0 12 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 -42.5 ) ( ( 0.03125 0 44.8125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -42.5 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 -17.5 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 22
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( -48 12 20 18.203125 -29.46278190612793 ) ( -49 13 19 18.17305374145508 -29.45215034484863 ) ( -50 14 18 18.15569305419922 -29.44601249694824 ) )
( ( -42.5 12 20 18.203125 -29.56406021118164 ) ( -43.5 13 19 18.18186187744141 -29.55654144287109 ) ( -44.5 14 18 18.16059875488281 -29.54902458190918 ) )
( ( -42.5 17.5 20 18.203125 -29.66533851623535 ) ( -43.5 18.5 19 18.18576240539551 -29.65920066833496 ) ( -44.5 19.5 18 18.15569305419922 -29.64856910705566 ) )
)
}
}
// primitive 23
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( -39 -25 11 18.17708396911621 18.88081550598145 ) ( -38 -24 10 18.19010543823242 18.89922904968262 ) ( -37 -23 9 18.203125 18.91764450073242 ) )
( ( -39 -19.5 11 18.17708396911621 18.93145370483398 ) ( -38 -18.5 10 18.19010543823242 18.94986915588379 ) ( -37 -17.5 9 18.203125 18.96828269958496 ) )
( ( -44.5 -19.5 11 18.10546875 18.93145370483398 ) ( -43.5 -18.5 10 18.11849021911621 18.94986915588379 ) ( -42.5 -17.5 9 18.13151168823242 18.96828269958496 ) )
)
}
}
// primitive 24
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( -44.5 -19.5 11 18.10546875 18.93145370483398 ) ( -43.5 -18.5 10 18.11849021911621 18.94986915588379 ) ( -42.5 -17.5 9 18.13151168823242 18.96828269958496 ) )
( ( -44.5 -14 11 18.10546875 18.98209381103516 ) ( -43.5 -13 10 18.11849021911621 19.00050735473633 ) ( -42.5 -12 9 18.13151168823242 19.01892280578613 ) )
( ( -50 -14 11 18.03385543823242 18.98209381103516 ) ( -49 -13 10 18.046875 19.00050735473633 ) ( -48 -12 9 18.05989646911621 19.01892280578613 ) )
)
}
}
// primitive 25
{
patchDef3
{
"textures/darkmod/stone/sculpted/corpse"
( 3 3 1 4 0 0 0 )
(
( ( -42.5 17.5 20 512.9006958007813 1024.050048828125 ) ( -37 17.5 20 512.9006958007813 1024.109008789063 ) ( -37 23 20 513.0303344726563 1024.109008789063 ) )
( ( -37 17.5 20 512.9006958007813 1024.109008789063 ) ( -37 17.5 20 512.9006958007813 1024.109008789063 ) ( -37 17.5 20 512.9006958007813 1024.109008789063 ) )
( ( -37 17.5 20 512.9006958007813 1024.109008789063 ) ( -37 17.5 20 512.9006958007813 1024.109008789063 ) ( -37 17.5 20 512.9006958007813 1024.109008789063 ) )
)
}
}
// primitive 26
{
patchDef3
{
"textures/darkmod/stone/sculpted/carved_design_bones02"
( 3 3 4 1 0 0 0 )
(
( ( -44.5 19.5 18 -217.5816802978516 256 ) ( -44.5 19.5 14.5 -217.5816802978516 256.5 ) ( -44.5 19.5 11 -217.5816802978516 257 ) )
( ( -39 19.5 18 -218.4983520507813 256 ) ( -39 19.5 14.5 -218.4983520507813 256.5 ) ( -39 19.5 11 -218.4983520507813 257 ) )
( ( -39 25 18 -219.4150085449219 256 ) ( -39 25 14.5 -219.4150085449219 256.5 ) ( -39 25 11 -219.4150085449219 257 ) )
)
}
}
// primitive 27
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( -42.5 17.5 20 18.203125 -29.46278190612793 ) ( -43.5 18.5 19 18.17305374145508 -29.45215034484863 ) ( -44.5 19.5 18 18.15569305419922 -29.44601249694824 ) )
( ( -37 17.5 20 18.203125 -29.56406021118164 ) ( -38 18.5 19 18.18186187744141 -29.55654144287109 ) ( -39 19.5 18 18.16059875488281 -29.54902458190918 ) )
( ( -37 23 20 18.203125 -29.66533851623535 ) ( -38 24 19 18.18576240539551 -29.65920066833496 ) ( -39 25 18 18.15569305419922 -29.64856910705566 ) )
)
}
}
// primitive 28
{
patchDef3
{
"textures/darkmod/stone/sculpted/carved_design_bones02"
( 3 3 4 1 0 0 0 )
(
( ( -50 14 18 -217.5816802978516 256 ) ( -50 14 14.5 -217.5816802978516 256.5 ) ( -50 14 11 -217.5816802978516 257 ) )
( ( -44.5 14 18 -218.4983520507813 256 ) ( -44.5 14 14.5 -218.4983520507813 256.5 ) ( -44.5 14 11 -218.4983520507813 257 ) )
( ( -44.5 19.5 18 -219.4150085449219 256 ) ( -44.5 19.5 14.5 -219.4150085449219 256.5 ) ( -44.5 19.5 11 -219.4150085449219 257 ) )
)
}
}
// primitive 29
{
patchDef3
{
"textures/darkmod/stone/sculpted/corpse"
( 3 3 1 4 0 0 0 )
(
( ( -48 12 20 512.7710571289063 1023.991088867188 ) ( -42.5 12 20 512.7710571289063 1024.050048828125 ) ( -42.5 17.5 20 512.9006958007813 1024.050048828125 ) )
( ( -42.5 12 20 512.7710571289063 1024.050048828125 ) ( -42.5 12 20 512.7710571289063 1024.050048828125 ) ( -42.5 12 20 512.7710571289063 1024.050048828125 ) )
( ( -42.5 12 20 512.7710571289063 1024.050048828125 ) ( -42.5 12 20 512.7710571289063 1024.050048828125 ) ( -42.5 12 20 512.7710571289063 1024.050048828125 ) )
)
}
}
// primitive 30
{
brushDef3
{
( 0 0 -1 18 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 0 1 -20 ) ( ( 0.02357020042836666 0 0.511785089969635 ) ( 0 0.01071373373270035 0.5053467750549316 ) ) "textures/darkmod/stone/sculpted/corpse" 0 0 0
( -1 0 0 -37 ) ( ( 0.03125 0 44.8125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -37 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 -23 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 17.5 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 31
{
patchDef3
{
"textures/darkmod/stone/sculpted/carved_design_bones02"
( 3 3 4 1 0 0 0 )
(
( ( 44.5 19.5 18 -217.5816802978516 256 ) ( 44.5 19.5 14.5 -217.5816802978516 256.5 ) ( 44.5 19.5 11 -217.5816802978516 257 ) )
( ( 44.5 14 18 -218.4983520507813 256 ) ( 44.5 14 14.5 -218.4983520507813 256.5 ) ( 44.5 14 11 -218.4983520507813 257 ) )
( ( 50 14 18 -219.4150085449219 256 ) ( 50 14 14.5 -219.4150085449219 256.5 ) ( 50 14 11 -219.4150085449219 257 ) )
)
}
}
// primitive 32
{
patchDef3
{
"textures/darkmod/stone/sculpted/corpse"
( 3 3 1 4 0 0 0 )
(
( ( 42.5 17.5 20 512.9006958007813 1024.960693359375 ) ( 42.5 12 20 512.7710571289063 1024.960693359375 ) ( 48 12 20 512.7710571289063 1025.019653320313 ) )
( ( 42.5 12 20 512.7710571289063 1024.960693359375 ) ( 42.5 12 20 512.7710571289063 1024.960693359375 ) ( 42.5 12 20 512.7710571289063 1024.960693359375 ) )
( ( 42.5 12 20 512.7710571289063 1024.960693359375 ) ( 42.5 12 20 512.7710571289063 1024.960693359375 ) ( 42.5 12 20 512.7710571289063 1024.960693359375 ) )
)
}
}
// primitive 33
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( 37 23 20 18.203125 -29.46278190612793 ) ( 38 24 19 18.17305374145508 -29.45215034484863 ) ( 39 25 18 18.15569305419922 -29.44601249694824 ) )
( ( 37 17.5 20 18.203125 -29.56406021118164 ) ( 38 18.5 19 18.18186187744141 -29.55654144287109 ) ( 39 19.5 18 18.16059875488281 -29.54902458190918 ) )
( ( 42.5 17.5 20 18.203125 -29.66533851623535 ) ( 43.5 18.5 19 18.18576240539551 -29.65920066833496 ) ( 44.5 19.5 18 18.15569305419922 -29.64856910705566 ) )
)
}
}
// primitive 34
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( 42.5 17.5 20 18.203125 -29.46278190612793 ) ( 43.5 18.5 19 18.17305374145508 -29.45215034484863 ) ( 44.5 19.5 18 18.15569305419922 -29.44601249694824 ) )
( ( 42.5 12 20 18.203125 -29.56406021118164 ) ( 43.5 13 19 18.18186187744141 -29.55654144287109 ) ( 44.5 14 18 18.16059875488281 -29.54902458190918 ) )
( ( 48 12 20 18.203125 -29.66533851623535 ) ( 49 13 19 18.18576240539551 -29.65920066833496 ) ( 50 14 18 18.15569305419922 -29.64856910705566 ) )
)
}
}
// primitive 35
{
patchDef3
{
"textures/darkmod/stone/sculpted/carved_design_bones02"
( 3 3 4 1 0 0 0 )
(
( ( 39 25 18 -217.5816802978516 256 ) ( 39 25 14.5 -217.5816802978516 256.5 ) ( 39 25 11 -217.5816802978516 257 ) )
( ( 39 19.5 18 -218.4983520507813 256 ) ( 39 19.5 14.5 -218.4983520507813 256.5 ) ( 39 19.5 11 -218.4983520507813 257 ) )
( ( 44.5 19.5 18 -219.4150085449219 256 ) ( 44.5 19.5 14.5 -219.4150085449219 256.5 ) ( 44.5 19.5 11 -219.4150085449219 257 ) )
)
}
}
// primitive 36
{
patchDef3
{
"textures/darkmod/stone/sculpted/corpse"
( 3 3 1 4 0 0 0 )
(
( ( 37 23 20 513.0303344726563 1024.901733398438 ) ( 37 17.5 20 512.9006958007813 1024.901733398438 ) ( 42.5 17.5 20 512.9006958007813 1024.960693359375 ) )
( ( 37 17.5 20 512.9006958007813 1024.901733398438 ) ( 37 17.5 20 512.9006958007813 1024.901733398438 ) ( 37 17.5 20 512.9006958007813 1024.901733398438 ) )
( ( 37 17.5 20 512.9006958007813 1024.901733398438 ) ( 37 17.5 20 512.9006958007813 1024.901733398438 ) ( 37 17.5 20 512.9006958007813 1024.901733398438 ) )
)
}
}
// primitive 37
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( 48 -12 20 18.203125 -29.46278190612793 ) ( 49 -13 19 18.17305374145508 -29.45215034484863 ) ( 50 -14 18 18.15569305419922 -29.44601249694824 ) )
( ( 42.5 -12 20 18.203125 -29.56406021118164 ) ( 43.5 -13 19 18.18186187744141 -29.55654144287109 ) ( 44.5 -14 18 18.16059875488281 -29.54902458190918 ) )
( ( 42.5 -17.5 20 18.203125 -29.66533851623535 ) ( 43.5 -18.5 19 18.18576240539551 -29.65920066833496 ) ( 44.5 -19.5 18 18.15569305419922 -29.64856910705566 ) )
)
}
}
// primitive 38
{
patchDef3
{
"textures/darkmod/stone/sculpted/corpse"
( 3 3 1 4 0 0 0 )
(
( ( 42.5 -17.5 20 512.0993041992188 1024.960693359375 ) ( 37 -17.5 20 512.0993041992188 1024.901733398438 ) ( 37 -23 20 511.9696655273438 1024.901733398438 ) )
( ( 37 -17.5 20 512.0993041992188 1024.901733398438 ) ( 37 -17.5 20 512.0993041992188 1024.901733398438 ) ( 37 -17.5 20 512.0993041992188 1024.901733398438 ) )
( ( 37 -17.5 20 512.0993041992188 1024.901733398438 ) ( 37 -17.5 20 512.0993041992188 1024.901733398438 ) ( 37 -17.5 20 512.0993041992188 1024.901733398438 ) )
)
}
}
// primitive 39
{
patchDef3
{
"textures/darkmod/stone/sculpted/carved_design_bones02"
( 3 3 4 1 0 0 0 )
(
( ( 44.5 -19.5 18 -217.5816802978516 256 ) ( 44.5 -19.5 14.5 -217.5816802978516 256.5 ) ( 44.5 -19.5 11 -217.5816802978516 257 ) )
( ( 39 -19.5 18 -218.4983520507813 256 ) ( 39 -19.5 14.5 -218.4983520507813 256.5 ) ( 39 -19.5 11 -218.4983520507813 257 ) )
( ( 39 -25 18 -219.4150085449219 256 ) ( 39 -25 14.5 -219.4150085449219 256.5 ) ( 39 -25 11 -219.4150085449219 257 ) )
)
}
}
// primitive 40
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( 42.5 -17.5 20 18.203125 -29.46278190612793 ) ( 43.5 -18.5 19 18.17305374145508 -29.45215034484863 ) ( 44.5 -19.5 18 18.15569305419922 -29.44601249694824 ) )
( ( 37 -17.5 20 18.203125 -29.56406021118164 ) ( 38 -18.5 19 18.18186187744141 -29.55654144287109 ) ( 39 -19.5 18 18.16059875488281 -29.54902458190918 ) )
( ( 37 -23 20 18.203125 -29.66533851623535 ) ( 38 -24 19 18.18576240539551 -29.65920066833496 ) ( 39 -25 18 18.15569305419922 -29.64856910705566 ) )
)
}
}
// primitive 41
{
patchDef3
{
"textures/darkmod/stone/sculpted/carved_design_bones02"
( 3 3 4 1 0 0 0 )
(
( ( 50 -14 18 -217.5816802978516 256 ) ( 50 -14 14.5 -217.5816802978516 256.5 ) ( 50 -14 11 -217.5816802978516 257 ) )
( ( 44.5 -14 18 -218.4983520507813 256 ) ( 44.5 -14 14.5 -218.4983520507813 256.5 ) ( 44.5 -14 11 -218.4983520507813 257 ) )
( ( 44.5 -19.5 18 -219.4150085449219 256 ) ( 44.5 -19.5 14.5 -219.4150085449219 256.5 ) ( 44.5 -19.5 11 -219.4150085449219 257 ) )
)
}
}
// primitive 42
{
patchDef3
{
"textures/darkmod/stone/sculpted/corpse"
( 3 3 1 4 0 0 0 )
(
( ( 48 -12 20 512.2289428710938 1025.019653320313 ) ( 42.5 -12 20 512.2289428710938 1024.960693359375 ) ( 42.5 -17.5 20 512.0993041992188 1024.960693359375 ) )
( ( 42.5 -12 20 512.2289428710938 1024.960693359375 ) ( 42.5 -12 20 512.2289428710938 1024.960693359375 ) ( 42.5 -12 20 512.2289428710938 1024.960693359375 ) )
( ( 42.5 -12 20 512.2289428710938 1024.960693359375 ) ( 42.5 -12 20 512.2289428710938 1024.960693359375 ) ( 42.5 -12 20 512.2289428710938 1024.960693359375 ) )
)
}
}
// primitive 43
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( -50 14 11 33.3125 -9.671875 ) ( -49 13 10 33.3203125 -9.6640625 ) ( -48 12 9 33.328125 -9.65625 ) )
( ( -44.5 14 11 33.3125 -9.62890625 ) ( -43.5 13 10 33.3203125 -9.62109375 ) ( -42.5 12 9 33.328125 -9.61328125 ) )
( ( -44.5 19.5 11 33.26953125 -9.62890625 ) ( -43.5 18.5 10 33.27734375 -9.62109375 ) ( -42.5 17.5 9 33.28515625 -9.61328125 ) )
)
}
}
// primitive 44
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( -44.5 19.5 11 33.26953125 -9.62890625 ) ( -43.5 18.5 10 33.27734375 -9.62109375 ) ( -42.5 17.5 9 33.28515625 -9.61328125 ) )
( ( -39 19.5 11 33.26953125 -9.5859375 ) ( -38 18.5 10 33.27734375 -9.578125 ) ( -37 17.5 9 33.28515625 -9.5703125 ) )
( ( -39 25 11 33.2265625 -9.5859375 ) ( -38 24 10 33.234375 -9.578125 ) ( -37 23 9 33.2421875 -9.5703125 ) )
)
}
}
// primitive 45
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( 44.5 19.5 11 236.7357025146484 18.89462471008301 ) ( 43.5 18.5 10 236.7487182617188 18.91303825378418 ) ( 42.5 17.5 9 236.7617340087891 18.93145370483398 ) )
( ( 44.5 14 11 236.7357025146484 18.94526481628418 ) ( 43.5 13 10 236.7487182617188 18.96367835998535 ) ( 42.5 12 9 236.7617340087891 18.98209190368652 ) )
( ( 50 14 11 236.6640777587891 18.94526481628418 ) ( 49 13 10 236.6771087646484 18.96367835998535 ) ( 48 12 9 236.6901245117188 18.98209190368652 ) )
)
}
}
// primitive 46
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( 39 25 11 236.8073120117188 18.84398651123047 ) ( 38 24 10 236.8203277587891 18.86240005493164 ) ( 37 23 9 236.8333587646484 18.88081359863281 ) )
( ( 39 19.5 11 236.8073120117188 18.89462471008301 ) ( 38 18.5 10 236.8203277587891 18.91303825378418 ) ( 37 17.5 9 236.8333587646484 18.93145370483398 ) )
( ( 44.5 19.5 11 236.7357025146484 18.89462471008301 ) ( 43.5 18.5 10 236.7487182617188 18.91303825378418 ) ( 42.5 17.5 9 236.7617340087891 18.93145370483398 ) )
)
}
}
// primitive 47
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( 44.5 -19.5 11 19.26432418823242 18.93145370483398 ) ( 43.5 -18.5 10 19.25130271911621 18.94986915588379 ) ( 42.5 -17.5 9 19.23828125 18.96828269958496 ) )
( ( 39 -19.5 11 19.19270896911621 18.93145370483398 ) ( 38 -18.5 10 19.1796875 18.94986915588379 ) ( 37 -17.5 9 19.16666793823242 18.96828269958496 ) )
( ( 39 -25 11 19.19270896911621 18.88081550598145 ) ( 38 -24 10 19.1796875 18.89922904968262 ) ( 37 -23 9 19.16666793823242 18.91764450073242 ) )
)
}
}
// primitive 48
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( 50 -14 11 19.3359375 18.98209381103516 ) ( 49 -13 10 19.32291793823242 19.00050735473633 ) ( 48 -12 9 19.30989646911621 19.01892280578613 ) )
( ( 44.5 -14 11 19.26432418823242 18.98209381103516 ) ( 43.5 -13 10 19.25130271911621 19.00050735473633 ) ( 42.5 -12 9 19.23828125 19.01892280578613 ) )
( ( 44.5 -19.5 11 19.26432418823242 18.93145370483398 ) ( 43.5 -18.5 10 19.25130271911621 18.94986915588379 ) ( 42.5 -17.5 9 19.23828125 18.96828269958496 ) )
)
}
}
// primitive 49
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( -42.5 -17.5 9 18.31510353088379 19.11458206176758 ) ( -42.5 -17.5 -6 18.31510353088379 19.296875 ) ( -42.5 -17.5 -20 18.31510353088379 19.47916603088379 ) )
( ( -42.5 -12 9 18.38671875 19.11458206176758 ) ( -42.5 -12 -6 18.38671875 19.296875 ) ( -42.5 -12 -20 18.38671875 19.47916603088379 ) )
( ( -48 -12 9 18.45833206176758 19.11458206176758 ) ( -48 -12 -6 18.45833206176758 19.296875 ) ( -48 -12 -20 18.45833206176758 19.47916603088379 ) )
)
}
}
// primitive 50
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( -42.5 17.5 9 237.9401245117188 19.1015625 ) ( -42.5 17.5 -6 237.9401245117188 19.296875 ) ( -42.5 17.5 -20 237.9401245117188 19.47916603088379 ) )
( ( -37 17.5 9 237.8685150146484 19.1015625 ) ( -37 17.5 -6 237.8685150146484 19.296875 ) ( -37 17.5 -20 237.8685150146484 19.47916603088379 ) )
( ( -37 23 9 237.7968902587891 19.1015625 ) ( -37 23 -6 237.7968902587891 19.296875 ) ( -37 23 -20 237.7968902587891 19.47916603088379 ) )
)
}
}
// primitive 51
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( -48 12 9 237.8515625 19.0986385345459 ) ( -48 12 -6 237.8515625 19.2939510345459 ) ( -48 12 -20 237.8515625 19.47624206542969 ) )
( ( -42.5 12 9 237.7799530029297 19.0986385345459 ) ( -42.5 12 -6 237.7799530029297 19.2939510345459 ) ( -42.5 12 -20 237.7799530029297 19.47624206542969 ) )
( ( -42.5 17.5 9 237.7083435058594 19.0986385345459 ) ( -42.5 17.5 -6 237.7083435058594 19.2939510345459 ) ( -42.5 17.5 -20 237.7083435058594 19.47624206542969 ) )
)
}
}
// primitive 52
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( 42.5 17.5 9 236.7617340087891 19.1015625 ) ( 42.5 17.5 -6 236.7617340087891 19.296875 ) ( 42.5 17.5 -20 236.7617340087891 19.47916603088379 ) )
( ( 42.5 12 9 236.6901245117188 19.1015625 ) ( 42.5 12 -6 236.6901245117188 19.296875 ) ( 42.5 12 -20 236.6901245117188 19.47916603088379 ) )
( ( 48 12 9 236.6185150146484 19.1015625 ) ( 48 12 -6 236.6185150146484 19.296875 ) ( 48 12 -20 236.6185150146484 19.47916603088379 ) )
)
}
}
// primitive 53
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( 37 23 9 236.8333587646484 19.1015625 ) ( 37 23 -6 236.8333587646484 19.296875 ) ( 37 23 -20 236.8333587646484 19.47916603088379 ) )
( ( 37 17.5 9 236.7617340087891 19.1015625 ) ( 37 17.5 -6 236.7617340087891 19.296875 ) ( 37 17.5 -20 236.7617340087891 19.47916603088379 ) )
( ( 42.5 17.5 9 236.6901245117188 19.1015625 ) ( 42.5 17.5 -6 236.6901245117188 19.296875 ) ( 42.5 17.5 -20 236.6901245117188 19.47916603088379 ) )
)
}
}
// primitive 54
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( 42.5 -17.5 9 18.13150978088379 19.11458206176758 ) ( 42.5 -17.5 -6 18.13150978088379 19.296875 ) ( 42.5 -17.5 -20 18.13150978088379 19.47916603088379 ) )
( ( 37 -17.5 9 18.203125 19.11458206176758 ) ( 37 -17.5 -6 18.203125 19.296875 ) ( 37 -17.5 -20 18.203125 19.47916603088379 ) )
( ( 37 -23 9 18.27473831176758 19.11458206176758 ) ( 37 -23 -6 18.27473831176758 19.296875 ) ( 37 -23 -20 18.27473831176758 19.47916603088379 ) )
)
}
}
// primitive 55
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( 48 -12 9 18.203125 19.11458206176758 ) ( 48 -12 -6 18.203125 19.296875 ) ( 48 -12 -20 18.203125 19.47916603088379 ) )
( ( 42.5 -12 9 18.27473831176758 19.11458206176758 ) ( 42.5 -12 -6 18.27473831176758 19.296875 ) ( 42.5 -12 -20 18.27473831176758 19.47916603088379 ) )
( ( 42.5 -17.5 9 18.34635353088379 19.11458206176758 ) ( 42.5 -17.5 -6 18.34635353088379 19.296875 ) ( 42.5 -17.5 -20 18.34635353088379 19.47916603088379 ) )
)
}
}
// primitive 56
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( -37 -23 20 18.203125 -29.46278190612793 ) ( -38 -24 19 18.17305374145508 -29.45215034484863 ) ( -39 -25 18 18.15569305419922 -29.44601249694824 ) )
( ( -37 -17.5 20 18.203125 -29.56406021118164 ) ( -38 -18.5 19 18.18186187744141 -29.55654144287109 ) ( -39 -19.5 18 18.16059875488281 -29.54902458190918 ) )
( ( -42.5 -17.5 20 18.203125 -29.66533851623535 ) ( -43.5 -18.5 19 18.18576240539551 -29.65920066833496 ) ( -44.5 -19.5 18 18.15569305419922 -29.64856910705566 ) )
)
}
}
// primitive 57
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 4 1 0 0 0 )
(
( ( -42.5 -17.5 20 18.203125 -29.46278190612793 ) ( -43.5 -18.5 19 18.17305374145508 -29.45215034484863 ) ( -44.5 -19.5 18 18.15569305419922 -29.44601249694824 ) )
( ( -42.5 -12 20 18.203125 -29.56406021118164 ) ( -43.5 -13 19 18.18186187744141 -29.55654144287109 ) ( -44.5 -14 18 18.16059875488281 -29.54902458190918 ) )
( ( -48 -12 20 18.203125 -29.66533851623535 ) ( -49 -13 19 18.18576240539551 -29.65920066833496 ) ( -50 -14 18 18.15569305419922 -29.64856910705566 ) )
)
}
}
// primitive 58
{
patchDef3
{
"textures/darkmod/stone/sculpted/corpse"
( 3 3 1 4 0 0 0 )
(
( ( -37 -23 20 511.9696655273438 1024.109008789063 ) ( -37 -17.5 20 512.0993041992188 1024.109008789063 ) ( -42.5 -17.5 20 512.0993041992188 1024.050048828125 ) )
( ( -37 -17.5 20 512.0993041992188 1024.109008789063 ) ( -37 -17.5 20 512.0993041992188 1024.109008789063 ) ( -37 -17.5 20 512.0993041992188 1024.109008789063 ) )
( ( -37 -17.5 20 512.0993041992188 1024.109008789063 ) ( -37 -17.5 20 512.0993041992188 1024.109008789063 ) ( -37 -17.5 20 512.0993041992188 1024.109008789063 ) )
)
}
}
// primitive 59
{
patchDef3
{
"textures/darkmod/stone/sculpted/corpse"
( 3 3 1 4 0 0 0 )
(
( ( -42.5 -17.5 20 512.0993041992188 1024.050048828125 ) ( -42.5 -12 20 512.2289428710938 1024.050048828125 ) ( -48 -12 20 512.2289428710938 1023.991088867188 ) )
( ( -42.5 -12 20 512.2289428710938 1024.050048828125 ) ( -42.5 -12 20 512.2289428710938 1024.050048828125 ) ( -42.5 -12 20 512.2289428710938 1024.050048828125 ) )
( ( -42.5 -12 20 512.2289428710938 1024.050048828125 ) ( -42.5 -12 20 512.2289428710938 1024.050048828125 ) ( -42.5 -12 20 512.2289428710938 1024.050048828125 ) )
)
}
}
// primitive 60
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 1 4 0 0 0 )
(
( ( -48 -12 -20 236.3776245117188 19.62239456176758 ) ( -42.5 -12 -20 236.3776245117188 19.55077934265137 ) ( -42.5 -17.5 -20 236.3060150146484 19.55077934265137 ) )
( ( -42.5 -12 -20 236.3776245117188 19.55077934265137 ) ( -42.5 -12 -20 236.3776245117188 19.55077934265137 ) ( -42.5 -12 -20 236.3776245117188 19.55077934265137 ) )
( ( -42.5 -12 -20 236.3776245117188 19.55077934265137 ) ( -42.5 -12 -20 236.3776245117188 19.55077934265137 ) ( -42.5 -12 -20 236.3776245117188 19.55077934265137 ) )
)
}
}
// primitive 61
{
brushDef3
{
( -0.7071068286895752 0 0.7071068286895752 -48.08345794677734 ) ( ( 0.0078125 0 33.4140625 ) ( 0 -0.0078125 1.441847920417786 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 0 -1 18 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0.7071068286895752 -0.7071068286895752 0 25.45592880249023 ) ( ( 0.03125 0 44.86584854125977 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0.7071068286895752 0.7071068286895752 0 25.45592880249023 ) ( ( 0.03125 0 44.8658447265625 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 48 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 62
{
brushDef3
{
( 0 0 1 -9 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 -17.5 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -42.5 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 0 -1 -20 ) ( ( 0.01302083302289248 0 236.5338897705078 ) ( 0 0.01302083302289248 18.99739456176758 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 -1 0 12 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 37 ) ( ( 0.03125 0 44.8125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 63
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 1 4 0 0 0 )
(
( ( 37 -23 -20 236.2344055175781 18.51562309265137 ) ( 37 -17.5 -20 236.3060150146484 18.51562309265137 ) ( 42.5 -17.5 -20 236.3060150146484 18.44400978088379 ) )
( ( 37 -17.5 -20 236.3060150146484 18.51562309265137 ) ( 37 -17.5 -20 236.3060150146484 18.51562309265137 ) ( 37 -17.5 -20 236.3060150146484 18.51562309265137 ) )
( ( 37 -17.5 -20 236.3060150146484 18.51562309265137 ) ( 37 -17.5 -20 236.3060150146484 18.51562309265137 ) ( 37 -17.5 -20 236.3060150146484 18.51562309265137 ) )
)
}
}
// primitive 64
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 1 4 0 0 0 )
(
( ( 42.5 -17.5 -20 236.3060150146484 18.44400978088379 ) ( 42.5 -12 -20 236.3776245117188 18.44400978088379 ) ( 48 -12 -20 236.3776245117188 18.37239456176758 ) )
( ( 42.5 -12 -20 236.3776245117188 18.44400978088379 ) ( 42.5 -12 -20 236.3776245117188 18.44400978088379 ) ( 42.5 -12 -20 236.3776245117188 18.44400978088379 ) )
( ( 42.5 -12 -20 236.3776245117188 18.44400978088379 ) ( 42.5 -12 -20 236.3776245117188 18.44400978088379 ) ( 42.5 -12 -20 236.3776245117188 18.44400978088379 ) )
)
}
}
// primitive 65
{
brushDef3
{
( 0 0 1 -9 ) ( ( 0 0.03125 44.09375 ) ( -0.03125 0 47.53125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 -42.5 ) ( ( 0.03125 0 44.0625 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 -17.5 ) ( ( 0.03125 0 44.09375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 0 -1 -20 ) ( ( 0.01302083302289248 0 236.5338897705078 ) ( 0 0.01302083302289248 18.99739456176758 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( -1 0 0 37 ) ( ( 0.03125 0 45.625 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 12 ) ( ( 0.03125 0 45.59375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 66
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 1 4 0 0 0 )
(
( ( -37 23 -20 236.8333587646484 19.47916603088379 ) ( -37 17.5 -20 236.7617492675781 19.47916603088379 ) ( -42.5 17.5 -20 236.7617492675781 19.55077934265137 ) )
( ( -37 17.5 -20 236.7617492675781 19.47916603088379 ) ( -37 17.5 -20 236.7617492675781 19.47916603088379 ) ( -37 17.5 -20 236.7617492675781 19.47916603088379 ) )
( ( -37 17.5 -20 236.7617492675781 19.47916603088379 ) ( -37 17.5 -20 236.7617492675781 19.47916603088379 ) ( -37 17.5 -20 236.7617492675781 19.47916603088379 ) )
)
}
}
// primitive 67
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 1 4 0 0 0 )
(
( ( -42.5 -17.5 -20 236.3060150146484 19.55077934265137 ) ( -37 -17.5 -20 236.3060150146484 19.47916603088379 ) ( -37 -23 -20 236.2344055175781 19.47916603088379 ) )
( ( -37 -17.5 -20 236.3060150146484 19.47916603088379 ) ( -37 -17.5 -20 236.3060150146484 19.47916603088379 ) ( -37 -17.5 -20 236.3060150146484 19.47916603088379 ) )
( ( -37 -17.5 -20 236.3060150146484 19.47916603088379 ) ( -37 -17.5 -20 236.3060150146484 19.47916603088379 ) ( -37 -17.5 -20 236.3060150146484 19.47916603088379 ) )
)
}
}
// primitive 68
{
brushDef3
{
( 0 0 1 -9 ) ( ( -0.03125 0 44.875 ) ( 0 -0.03125 46.75 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 -17.5 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 -42.5 ) ( ( 0.03125 0 44.875 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 0 -1 -20 ) ( ( 0.01302083302289248 0 236.5338897705078 ) ( 0 0.01302083302289248 18.99739456176758 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 0 1 0 12 ) ( ( 0.03125 0 44.84375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 1 0 0 37 ) ( ( 0.03125 0 44.8125 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 69
{
patchDef3
{
"textures/darkmod/stone/natural/dark_dirty"
( 3 3 1 4 0 0 0 )
(
( ( -42.5 17.5 -20 236.7617492675781 19.55077934265137 ) ( -42.5 12 -20 236.6901245117188 19.55077934265137 ) ( -48 12 -20 236.6901245117188 19.62239456176758 ) )
( ( -42.5 12 -20 236.6901245117188 19.55077934265137 ) ( -42.5 12 -20 236.6901245117188 19.55077934265137 ) ( -42.5 12 -20 236.6901245117188 19.55077934265137 ) )
( ( -42.5 12 -20 236.6901245117188 19.55077934265137 ) ( -42.5 12 -20 236.6901245117188 19.55077934265137 ) ( -42.5 12 -20 236.6901245117188 19.55077934265137 ) )
)
}
}
// primitive 70
{
brushDef3
{
( 0 0 1 -9 ) ( ( 0 -0.03125 44.09375 ) ( 0.03125 0 47.53125 ) ) "textures/common/caulk" 0 0 0
( -1 0 0 -42.5 ) ( ( 0.03125 0 44.0625 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 1 0 -17.5 ) ( ( 0.03125 0 44.09375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 0 -1 -20 ) ( ( 0.01302083302289248 0 236.5338897705078 ) ( 0 0.01302083302289248 18.99739456176758 ) ) "textures/darkmod/stone/natural/dark_dirty" 0 0 0
( 1 0 0 37 ) ( ( 0.03125 0 45.625 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
( 0 -1 0 12 ) ( ( 0.03125 0 45.59375 ) ( 0 0.03125 46.125 ) ) "textures/common/caulk" 0 0 0
}
}
}
export_ase_shader_test.map (43,112 bytes)   
ase_export.py (17,254 bytes)   
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
# ***** END GPL LICENCE BLOCK *****

#TODO:

# Set the command name so that DarkRadiant recognises this file
__commandName__ = 'aseExport'
__commandDisplayName__ = 'Export ASE...'

# The actual algorithm called by DarkRadiant is contained in the execute() function
def execute():
    script = "Dark Radiant ASCII Scene Export (*.ase)"
    author = "Richard Bartlett, some additions by greebo, tels and Obsttorte"
    version = "0.7"

    # Check if we have a valid selection

    selectionInfo = GlobalSelectionSystem.getSelectionInfo()

    # Don't allow empty selections or selected components only
    if selectionInfo.totalCount == 0 or selectionInfo.totalCount == selectionInfo.componentCount:
        errMsg = GlobalDialogManager.createMessageBox('No selection', 'Nothing selected, cannot run exporter.', Dialog.ERROR)
        errMsg.run()
        return

    shaderlist = []
    geomlist = []

    # simple linear triangulation of n-sided poly

    def triangulate(pointset):
        tris = []
        for count in range(1, len(pointset) - 1):
            tris.append([pointset[0], pointset[count], pointset[count + 1]])
        return tris

    # skin patch matrix with tris

    def skinmatrix(pointset, width, height):
        tris = []
        for h in range(height-1):
            for w in range(width-1):
                tris.append([pointset[w+(h*width)], pointset[w+1+(h*width)], pointset[w+width+(h*width)]])
                tris.append([pointset[w+1+(h*width)], pointset[w+1+width+(h*width)], pointset[w+width+(h*width)]])
        return tris

    def processBrush(brushnode):
        verts = []
        faces = []

        numfaces = brushnode.getNumFaces()
        for index in range(numfaces):
            facenode = brushnode.getFace(index)
            shader = facenode.getShader()

            # Tels: skip if caulk and no caulk should be exported
            if (shader == 'textures/common/caulk') and (int(GlobalRegistry.get('user/scripts/aseExport/exportcaulk'))) == 0:
                continue

            if not shader in shaderlist:
                shaderlist.append(shader)
            winding = facenode.getWinding()
            tris = triangulate([x+len(verts) for x in range(len(winding))])
            for x in tris:
                x.append(shaderlist.index(shader))
                faces.append(x)
            for x in reversed(winding):
                verts.append([x.vertex.x(), x.vertex.y(), x.vertex.z(), x.texcoord.x(), x.texcoord.y() * -1, x.normal.x(), x.normal.y(), x.normal.z()])

        geomlist.append([verts, faces])
        return

    def checkNAN(x):
	if x[5]!=x[5]:
	    x[5]=0
	if x[6]!=x[6]:
	    x[6]=0
	if x[7]!=x[7]:
	    x[7]=0
	return x

    def processPatch(patchnode):
        verts = []
        faces = []

        shader = patchnode.getShader()

        # Tels: skip if caulk and no caulk should be exported
        if shader == 'textures/common/caulk' and int(GlobalRegistry.get('user/scripts/aseExport/exportcaulk')) == 0:
            return

        if not shader in shaderlist:
            shaderlist.append(shader)
        mesh = patchnode.getTesselatedPatchMesh()
        for x in mesh.vertices:
            verts.append(checkNAN([x.vertex.x(), x.vertex.y(), x.vertex.z(), x.texcoord.x(), x.texcoord.y() * -1, x.normal.x(), x.normal.y(), x.normal.z()]))
        tris = skinmatrix([x for x in range(len(verts))], mesh.width, mesh.height)
        for x in tris:
            x.append(shaderlist.index(shader))
            faces.append(x)

        geomlist.append([verts, faces])
        return

    # Branch on primitive nodes
    def processPrimitive(scenenode):
        if scenenode.isBrush():
            processBrush(scenenode.getBrush())
        elif scenenode.isPatch():
            processPatch(scenenode.getPatch())
        return

    # Traversor class to visit child primitives of entities
    class nodeVisitor(SceneNodeVisitor):
        def pre(self, scenenode):
            # Brush?
            if scenenode.isBrush():
                processBrush(scenenode.getBrush())
            # Patch?
            elif scenenode.isPatch():
                processPatch(scenenode.getPatch())

            # Traverse all child nodes, regardless of type
            return 1

    class dataCollector(SelectionVisitor):
        fs_origin = Vector3(0,0,0)
        def visit(self, scenenode):
            if scenenode.getNodeType() == 'primitive':
                processPrimitive(scenenode)
            elif scenenode.isEntity():
                import re

                # greebo: Found an entity, this could be a func_static or similar
                # Traverse children of this entity using a new walker
                nodewalker = nodeVisitor()
                scenenode.traverse(nodewalker)

                entitynode = scenenode.getEntity()

                if not entitynode.getKeyValue("origin") == '':
                    origin = entitynode.getKeyValue("origin");
                    coords = re.findall(r'([\-\d.]+)', origin)
                    self.fs_origin = Vector3(float(coords[0]), float(coords[1]), float(coords[2]))
                    
            else:
                print('WARNING: unsupported node type selected. Skipping: ' + scenenode.getNodeType())

    # Dialog
    dialog = GlobalDialogManager.createDialog(script + 'v' + version)

    # Add an entry box and remember the handle
    fileHandle = dialog.addEntryBox("Filename:")
    dialog.setElementValue(fileHandle, GlobalRegistry.get('user/scripts/aseExport/recentFilename'))

    # Add an entry box and remember the handle
    pathHandle = dialog.addPathEntry("Save path:", True)
    dialog.setElementValue(pathHandle, GlobalRegistry.get('user/scripts/aseExport/recentPath'))

    # Add a checkbox
    centerObjectsHandle = dialog.addCheckbox("Center objects at 0,0,0 origin")
    dialog.setElementValue(centerObjectsHandle, GlobalRegistry.get('user/scripts/aseExport/centerObjects'))

    # Add another checkbox
    exportCaulkHandle = dialog.addCheckbox("Export caulked faces")
    dialog.setElementValue(exportCaulkHandle, GlobalRegistry.get('user/scripts/aseExport/exportcaulk'))

    # Add a checkbox for single entity
    checkedOrigin = 0
    if selectionInfo.entityCount == 1:
	keepOriginHandle = dialog.addCheckbox("Keep origin")
	dialog.setElementValue(keepOriginHandle, GlobalRegistry.get('user/scripts/aseExport/keepOrigin'))
        checkedOrigin = 1

    if dialog.run() == Dialog.OK:
        fullpath = dialog.getElementValue(pathHandle) + '/' + dialog.getElementValue(fileHandle)
        if not fullpath.endswith('.ase'):
            fullpath = fullpath + '.ase'

        # Save the path for later use
        GlobalRegistry.set('user/scripts/aseExport/recentFilename', dialog.getElementValue(fileHandle))
        GlobalRegistry.set('user/scripts/aseExport/recentPath', dialog.getElementValue(pathHandle))
        GlobalRegistry.set('user/scripts/aseExport/centerObjects', dialog.getElementValue(centerObjectsHandle))
        GlobalRegistry.set('user/scripts/aseExport/exportcaulk', dialog.getElementValue(exportCaulkHandle))
	if selectionInfo.entityCount == 1:	
	    GlobalRegistry.set('user/scripts/aseExport/keepOrigin',dialog.getElementValue(keepOriginHandle))
	    checkedOrigin *= dialog.getElementValue(keepOriginHandle)
        
        try:
            file = open(fullpath, 'r')
            file.close()
            prompt = GlobalDialogManager.createMessageBox('Warning', 'The file ' + fullpath + ' already exists. Do you wish to overwrite it?', Dialog.ASK)
            if prompt.run() == Dialog.YES:
                overwrite = True
            else:
                overwrite = False
        except IOError:
            overwrite = True

        if overwrite:

            # Tels: Only collect the data if we are going to export it
            walker = dataCollector()
            GlobalSelectionSystem.foreachSelected(walker)
	    
	    found_func_static_origin = walker.fs_origin
    	    
   	    #Obsttorte: check if we should keep the origin
	    if int(checkedOrigin) == 1:
		#Keep origin
                xcenter = found_func_static_origin.x()
            	ycenter = found_func_static_origin.y()
            	zcenter = found_func_static_origin.z()
		for item in geomlist:
                    for vert in item[0]:
                        vert[0] = vert[0] - xcenter
                        vert[1] = vert[1] - ycenter
                        vert[2] = vert[2] - zcenter

            # greebo: Check if we should center objects at the 0,0,0 origin
	    # Obsttorte: ... if not already kept at origin
            elif int(dialog.getElementValue(centerObjectsHandle)) == 1:
                #center objects at 0,0,0
                xlist = []
                ylist = []
                zlist = []
                for item in geomlist:
                    for vert in item[0]:
                        xlist.append(vert[0])
                        ylist.append(vert[1])
                        zlist.append(vert[2])
                xcenter=(max(xlist)+min(xlist))/2
                ycenter=(max(ylist)+min(ylist))/2
                zcenter=(max(zlist)+min(zlist))/2
                for item in geomlist:
                    for vert in item[0]:
                        vert[0] = vert[0] - xcenter
                        vert[1] = vert[1] - ycenter
                        vert[2] = vert[2] - zcenter
	    
	    # Obsttorte: merge faces with same texture
	    geomlist2 = []
	    facetlist = []
	    pointlist = []
	    for shaderNumb, shader in enumerate(shaderlist):
		for x in geomlist:
		    for i, facet in enumerate(x[1]):
			if facet[3] == shaderNumb:
			    for l in range(3):
				pointlist.append(x[0][x[1][i][l]])
				x[1][i][l] = len(pointlist)-1
			    facetlist.append(x[1][i])
		geomlist2.append([pointlist[:], facetlist[:]])
		del facetlist[:]
		del pointlist[:]
	    del geomlist[:]
	    geomlist = geomlist2
    	    
            scene = '''\t*SCENE_FILENAME "{0}"
\t*SCENE_FIRSTFRAME 0
\t*SCENE_LASTFRAME 100
\t*SCENE_FRAMESPEED 30
\t*SCENE_TICKSPERFRAME 160
\t*SCENE_BACKGROUND_STATIC 0.0000\t0.0000\t0.0000
\t*SCENE_AMBIENT_STATIC 0.0000\t0.0000\t0.0000'''.format(GlobalMap.getMapName())

            materials = str()
            for x in shaderlist:
                materials = materials + '''\t*MATERIAL {0} {{
\t\t*MATERIAL_NAME "{1}"
\t\t*MATERIAL_CLASS "Standard"
\t\t*MATERIAL_AMBIENT 0.5882\t0.5882\t0.5882
\t\t*MATERIAL_DIFFUSE 0.5882\t0.5882\t0.5882
\t\t*MATERIAL_SPECULAR 0.9000\t0.9000\t0.9000
\t\t*MATERIAL_SHINE 0.1000
\t\t*MATERIAL_SHINESTRENGTH 0.0000
\t\t*MATERIAL_TRANSPARENCY 0.0000
\t\t*MATERIAL_WIRESIZE 1.0000
\t\t*MATERIAL_SHADING Blinn
\t\t*MATERIAL_XP_FALLOFF 0.0000
\t\t*MATERIAL_SELFILLUM 0.0000
\t\t*MATERIAL_FALLOFF In
\t\t*MATERIAL_XP_TYPE Filter
\t\t*MAP_DIFFUSE {{
\t\t\t*MAP_NAME "{2}"
\t\t\t*MAP_CLASS "Bitmap"
\t\t\t*MAP_SUBNO 1
\t\t\t*MAP_AMOUNT 1.0000
\t\t\t*BITMAP "\\\\purgatory\\purgatory\\doom\\base\{2}"
\t\t\t*MAP_TYPE Screen
\t\t\t*UVW_U_OFFSET 0.0000
\t\t\t*UVW_V_OFFSET 0.0000
\t\t\t*UVW_U_TILING 1.0000
\t\t\t*UVW_V_TILING 1.0000
\t\t\t*UVW_ANGLE 0.0000
\t\t\t*UVW_BLUR 1.0000
\t\t\t*UVW_BLUR_OFFSET 0.0000
\t\t\t*UVW_NOUSE_AMT 1.0000
\t\t\t*UVW_NOISE_SIZE 1.0000
\t\t\t*UVW_NOISE_LEVEL 1
\t\t\t*UVW_NOISE_PHASE 0.0000
\t\t\t*BITMAP_FILTER Pyramidal
\t\t}}
\t}}
'''.format(shaderlist.index(x), x, x.replace('/','\\'))

            geomobjects = str()
	    
	    # Obsttorte: point-mapping to save multiple storage of the same point coordinates
	    mapping = []
	    vertMap = []
	    for x in geomlist:
		j = 1
		for count, data in enumerate(x[0]):
		    if count == 0:
			vertMap.append(0)
		    else:
			k=len(vertMap)
			for i in range(k):
			    if (x[0][i][0] == data[0] and x[0][i][1] == data[1] and x[0][i][2] == data[2]):
				vertMap.append(vertMap[i])
				break
			if len(vertMap) <= count:
			    vertMap.append(j)
			    j += 1
		mapping.append(vertMap[:])
		del vertMap[:]
		
	    # Obsttorte: same thing for CVERTICES
	    Cmapping = []
	    for x in geomlist:
		j = 1
		for count, data in enumerate(x[0]):
		    if count == 0:
			vertMap.append(0)
		    else:
			k=len(vertMap)
			for i in range(k):
			    if (x[0][i][3] == data[3] and x[0][i][4] == data[4]):
				vertMap.append(vertMap[i])
				break
			if len(vertMap) <= count:
			    vertMap.append(j)
			    j += 1
		Cmapping.append(vertMap[:])
		del vertMap[:]
		
	    j = -1
            for x in geomlist:
		
		j += 1
                # x[0] = vertices
                # vert[0] - vert[2] = vertex coords
                # vert[3] - vert[4] = texture coords
                # vert[5] - vert[7] = normal
                # x[1] = faces
                vertlist = str()
		i = 0
		Ci = 0
                for count, data in enumerate(x[0]):
		    if mapping[j][count] == i:
                    	vertlist = vertlist + '''\t\t\t*MESH_VERTEX {0}\t{1: 10.4g}\t{2: 10.4g}\t{3: 10.4g}\n'''.format(i, data[0], data[1], data[2])
			i += 1
		
                facelist = str()
                for count, data in enumerate(x[1]):
                    facelist = facelist + '''\t\t\t*MESH_FACE     {0}:  A:   {1} B:   {2} C:     {3} AB:       0 BC:    0 CA:    0\t *MESH_SMOOTHING 1 \t*MESH_MTLID {4}\n'''.format(count, mapping[j][data[0]], mapping[j][data[1]], mapping[j][data[2]], data[3])
                tvertlist = str()
                for count, data in enumerate(x[0]):
		    if Cmapping[j][count] == Ci:
                        tvertlist = tvertlist + '''\t\t\t*MESH_TVERT {0}\t{1: 10.4g}\t{2: 10.4g}\t0\n'''.format(Ci, data[3], data[4])
			Ci += 1
                tfacelist = str()
                for count, data in enumerate(x[1]):
                    tfacelist = tfacelist + '''\t\t\t*MESH_TFACE {0}\t{1}\t{2}\t{3}\n'''.format(count, Cmapping[j][data[0]], Cmapping[j][data[1]], Cmapping[j][data[2]])
                
                normals = str()
                for count, data in enumerate(x[1]):
                    normals += '''\t\t\t*MESH_FACENORMAL {0}\t{1: 10.4g}\t{2: 10.4g}\t{3: 10.4g}\n'''.format(count, x[0][data[0]][5], x[0][data[0]][6], x[0][data[0]][7]) # greebo: use first vertex normal as face normal
                    normals += '''\t\t\t\t*MESH_VERTEXNORMAL {0}\t{1: 10.4g}\t{2: 10.4g}\t{3: 10.4g}\n'''.format(mapping[j][data[0]], x[0][data[0]][5], x[0][data[0]][6], x[0][data[0]][7])
                    normals += '''\t\t\t\t*MESH_VERTEXNORMAL {0}\t{1: 10.4g}\t{2: 10.4g}\t{3: 10.4g}\n'''.format(mapping[j][data[1]], x[0][data[1]][5], x[0][data[1]][6], x[0][data[1]][7])
                    normals += '''\t\t\t\t*MESH_VERTEXNORMAL {0}\t{1: 10.4g}\t{2: 10.4g}\t{3: 10.4g}\n'''.format(mapping[j][data[2]], x[0][data[2]][5], x[0][data[2]][6], x[0][data[2]][7])

                if len(x[1]) == 0:
                    continue

                geomobjects = geomobjects + '''*GEOMOBJECT {{
\t*NODE_NAME "{0}"
\t*NODE_TM {{
\t\t*NODE_NAME "{0}"
\t\t*INHERIT_POS 0 0 0
\t\t*INHERIT_ROT 0 0 0
\t\t*INHERIT_SCL 0 0 0
\t\t*TM_ROW0 1.0000\t0.0000\t0.0000
\t\t*TM_ROW1 0.0000\t1.0000\t0.0000
\t\t*TM_ROW2 0.0000\t0.0000\t1.0000
\t\t*TM_ROW3 0.0000\t0.0000\t0.0000
\t\t*TM_POS 0.0000\t0.0000\t0.0000
\t\t*TM_ROTAXIS 0.0000\t0.0000\t0.0000
\t\t*TM_ROTANGLE 0.0000
\t\t*TM_SCALE 1.0000\t1.0000\t1.0000
\t\t*TM_SCALEAXIS 0.0000\t0.0000\t0.0000
\t\t*TM_SCALEAXISANG 0.0000
\t}}
\t*MESH {{
\t\t*TIMEVALUE 0
\t\t*MESH_NUMVERTEX {1}
\t\t*MESH_NUMFACES {2}
\t\t*MESH_VERTEX_LIST {{
{3}\t\t}}
\t\t*MESH_FACE_LIST {{
{4}\t\t}}
\t\t*MESH_NUMTVERTEX {5}
\t\t*MESH_TVERTLIST {{
{6}\t\t}}
\t\t*MESH_NUMTVFACES {7}
\t\t*MESH_TFACELIST {{
{8}\t\t}}
\t\t*MESH_NUMCVERTEX 0
\t\t*MESH_NUMCVFACES 0
\t\t*MESH_NORMALS {{
{9}\t\t}}
\t}}
\t*PROP_MOTIONBLUR 0
\t*PROP_CASTSHADOW 1
\t*PROP_RECVSHADOW 1
\t*MATERIAL_REF {10}
}}\n'''.format('mesh' + str(geomlist.index(x)), \
        i, \
        len(x[1]), \
        vertlist, \
        facelist, \
        Ci, \
        tvertlist, \
        len(x[1]), \
        tfacelist, \
        normals, \
        x[1][0][3]) # material reference from first face

                data = '''*3DSMAX_ASCIIEXPORT\t200
*COMMENT "{0} v{1}"
*SCENE {{
{2}
}}
*MATERIAL_LIST {{
\t*MATERIAL_COUNT {3}
{4}}}
{5}'''.format(script, version, scene, len(shaderlist), materials, geomobjects)

                # Write the compiled data to the output file
                file = open(fullpath, 'w')
                file.write(data)
                file.close()

# __executeCommand__ evaluates to true after DarkRadiant has successfully initialised
if __executeCommand__:
    execute()
ase_export.py (17,254 bytes)   

Activities

angua

angua

12.03.2012 06:00

manager   ~0004398

Interestingly, this also didn't happen any more when I deleted the offending brush and cloned and rotated the one from the other side.
tels

tels

17.03.2012 11:14

reporter   ~0004410

I posted here about probably the same problem, depending on what you export, some faces have the missing shader:

http://forums.thedarkmod.com/topic/10906-ase-export-script-for-dark-radiant/page__view__findpost__p__249919
tels

tels

15.12.2012 15:09

reporter   ~0004964

Last edited: 15.12.2012 15:09

Here is a new version of the ASE exporter script. This version fixes the issue that the normals on exported patches got NaN, these are now set to 0, making patches appear correctly shaded and bumbmapped. Fix provided by Obsttorte, and discussed here:

http://forums.thedarkmod.com/topic/13692-dr-ase-exporter-replaces-textures-randomly/page__view__findpost__p__301763

Obsttorte

Obsttorte

19.12.2012 09:55

developer   ~0004974

I made changes to the script that seems to fix the problem with the wrong texturing, too. The sarcophagus and an example provided by tels worked properly. If there are other examples I could test that, too. But I think it is fixed.
Obsttorte

Obsttorte

21.12.2012 09:28

developer   ~0004978

I just uploaded the actual version of the script.

user81

06.08.2013 20:14

  ~0005977

Just tried Ob's script under windows 8 and it doesn't work, in fact it dosen't export anything.
Obsttorte

Obsttorte

17.08.2013 20:51

developer   ~0006038

I've uploaded a new version in the specific thread in the forum. Sotha tested it under linux and it worked for him were the latter script failed. Also the sarcophagus is exporting properly.

@Biker, you wanted to test the new one ;)

The change I've made was under the assumption that the script itself is correct but some of the methods used there on some predefined objects aren't working as intented. Actually, I'm pretty sure the script WAS ALWAYS correct. I never found a mistake in it.
greebo

greebo

03.01.2018 08:50

administrator   ~0009966

Closed due to age.

Issue History

Date Modified Username Field Change
11.03.2012 06:27 angua New Issue
11.03.2012 06:27 angua File Added: export_ase_shader_test.map
12.03.2012 06:00 angua Note Added: 0004398
17.03.2012 11:14 tels Note Added: 0004410
15.12.2012 15:09 tels Note Added: 0004964
15.12.2012 15:09 tels Note Edited: 0004964
15.12.2012 15:22 tels File Added: ase_export_2.py
19.12.2012 09:55 Obsttorte Note Added: 0004974
21.12.2012 09:27 Obsttorte File Added: ase_export.py
21.12.2012 09:28 Obsttorte Note Added: 0004978
21.12.2012 10:24 tels File Deleted: ase_export_2.py
06.08.2013 20:14 user81 Note Added: 0005977
17.08.2013 20:51 Obsttorte Note Added: 0006038
03.01.2018 08:50 greebo Note Added: 0009966
03.01.2018 08:50 greebo Status new => closed
03.01.2018 08:50 greebo Assigned To => greebo
03.01.2018 08:50 greebo Resolution open => no change required