CABAL .EBM Can't Open 3D model
Posted: Wed Jul 06, 2016 4:03 am
Some one know tihs ploblem or help
DeathKnight_boss.7z
http://www10.zippyshare.com/v/J0s7nWIz/file.html
DeathKnight_boss.7z
http://www10.zippyshare.com/v/J0s7nWIz/file.html
thx but don't workAceWell wrote:
search for FF FF FF FF and that will take you to where the models are
the byte after that is the mesh ID
the 2 bytes after that are the number of vertices
the 2 bytes after that you must multiply by 3 to get face count
2 bytes after that are padding and then the vertex block starts
have you tried the cabal scripts here?
viewtopic.php?p=91804#p91804
this old ebm work on noesis mdf_mamuo.ebmshakotay2 wrote:@godskin: use a hexeditor to look into that EBM, you'll find the strings 'DDS' and 'DXT1'
delete everything before 'DDS' and save the rest as as whatevername.dds
as simple as that: (There's another two dds contained (DXT3) - but I'll leave that task to be solved by you. )
edit: upps, seems AceWell was active during my typing
i need new .ebm can open in noesis only pls share how to fixgodskin wrote:this old ebm work on noesis mdf_mamuo.ebmshakotay2 wrote:@godskin: use a hexeditor to look into that EBM, you'll find the strings 'DDS' and 'DXT1'
delete everything before 'DDS' and save the rest as as whatevername.dds
as simple as that: (There's another two dds contained (DXT3) - but I'll leave that task to be solved by you. )
edit: upps, seems AceWell was active during my typing
http://www117.zippyshare.com/v/FyYTyr9k/file.html
cabal korea have protection some .ebm file ??
Code: Select all
if idstring not in [0x0003ED03, 0x0003EE03, 0x0003EF03, 0x0003F003, 0x0003F103]:
i added u codeshakotay2 wrote:in function noepyCheckType(data) in fmt_CabalOnline_ebm.py add a further idstring:
But you won't get too far - the script freezes Noesis then with DeathKnight_boss.EBM because finale00's script can't handle ebms of type 0x0003F103.Code: Select all
if idstring not in [0x0003ED03, 0x0003EE03, 0x0003EF03, 0x0003F003, 0x0003F103]:
So if you want the textures you should try out my method.
you don't read what other people write, do you?godskin wrote:noesis freezy and not reponding after open Deatking
Ok thank you Sorryshakotay2 wrote:you don't read what other people write, do you?godskin wrote:noesis freezy and not reponding after open Deatking
Yes, it freezes - that's what I wrote.
Also WHY didn't you write that you don't need textures?
I really hate it when people waste my time.
This is the model: Try out hex2obj or let it be.
thx very much work !!Szkaradek123 wrote:Noesis plugin new line: 160 -
self.inFile.readUShort()
Code: Select all
//--------------------------------------##
// Game: CABAL Online
// File Format: EBM/ECH
// Description: Template for CABAL's model files
//--------------------------------------##
// Author: Yamachi
// Team: The Divinity Project
// Website: http://board.thedivinityproject.com
//--------------------------------------##
#include "Common_Cabal.bt"
//-Local-Variables----------------------
local string estType = "EBM";
local int tex_offsets[256], tex_lengths[256], dds_offsets[256];
local int index = 0;
//-Enumerations-------------------------
typedef enum <uint32> {
MATERIAL = 0x41470201,
MESH = 0x41470202,
ARMATURE = 0x41470203,
ANIMATION = 0x41470204,
INFLUENCE = 0x41470205,
} CID; // Chunk ID's
typedef enum <int32> {
MULTIPLY = 0x04,
GRAIN_MERGE = 0x08,
HARD_LIGHT = 0x09,
MULTIPLY__INVERT_PARENT = 0x0A,
ODD_FLICKER_EFFECT = 0x0E,
BELOW = 0x10,
SCREEN = 0x12,
SOME_PURE_WHITE_THING = 0x13,
CHROME = 0x18,
} RenderFlag; // 2nd layer render flag
//-Structures---------------------------
typedef struct {
uint magic <format=hex>;
ushort unkus;
byte model_flag <format=hex>;
byte alpha_threshold;
ushort unkus;
Vector3 bound_min; // Bounding box lower vertex
Vector3 bound_max; // Bounding box upper vertex
uint scale_percentage; // Scale of model (default = 100%)
CID chunk_id <format=hex>; // ID for the next chunk
} Header;
typedef struct {
float r, g, b, a;
} RGBA <read=RGBARead, write=RGBAWrite>;
typedef struct {
RGBA r <hidden=true>;
ParseRGBA(r);
RGBA ambient;
RGBA r <hidden=true>;
ParseRGBA(r);
RGBA diffuse;
RGBA r <hidden=true>;
ParseRGBA(r);
RGBA specular;
RGBA r <hidden=true>;
ParseRGBA(r);
RGBA emissive;
SetBackColor(cNone);
float power;
} MatProps; // Material properties
typedef struct {
ubyte unkba[9];
int material_index <read=MaterialIndexReadI>;
Bool is_faceted;
Vector2 speed;
RenderFlag render_flags;
} Layer;
typedef struct {
Text id;
tex_lengths[index] = id.length;
tex_offsets[index] = FTell() - id.length;
uint size;
dds_offsets[index] = FTell();
ubyte data[size];
index++;
} IndexedTexture;
typedef struct {
MatProps material_properties;
IndexedTexture texture;
Layer layer;
} Material;
typedef struct {
uint count;
if (count != 0) {
uint vertex_index[count];
float weight[count]; }
} InfluenceBone;
typedef struct {
InfluenceBone influence_for_bone[skeleton.count] <optimize=false>;
} Influence;
typedef struct {
Text id;
Matrix world_matrix;
Matrix local_matrix;
int root_bone_id; // Bone to attach mesh to. Causes entire mesh to "stick" to that bone, moving when it does.
ubyte material_index <read=MaterialIndexRead>;
ushort vertex_count;
ushort face_count;
Vertex vertices[vertex_count];
Face faces[face_count];
/*CID chunk_id; // INFLUENCE
if (chunk_id == INFLUENCE) {
ushort influence_count;
if (influence_count != 0)
Influence influences[influence_count] <optimize=false>; }
else {FSeek(FTell() - 4) ; }*/
// Hopefully this works for all models. It should do.
if (vertex_count > 0) {
CID chunk_id;
ushort influence_count;
if (influence_count != 0)
Influence influences[influence_count] <optimize=false>; }
} Mesh;
typedef struct {
Text id;
int parent_bone_index;
Matrix bone_space_matrix;
Matrix parent_bone_space_matrix;
} Bone <read=BoneRead>;
typedef struct {
Text id;
uint translation_count;
Translation translations[translation_count] <optimize=false>;
uint rotation_count;
Rotation rotations[rotation_count] <optimize=false>;
} Transformation <read=TransformationRead>;
typedef struct {
Text id;
ushort count;
Transformation transformations[count] <optimize=false>;
} Animation <read=AnimationRead>;
typedef struct {
ushort count;
local ushort tex_name_lengths[count];
local short i = 0;
Material materials[count] <optimize=false>;
CID chunk_id <format=hex>;
} MT <read=CommentMT>;
typedef struct {
ushort count;
Mesh meshes[count] <optimize=false>;
CID chunk_id <format=hex>;
} GE <read=CommentGE>;
typedef struct {
ushort count;
if (count != 0)
Bone bones[count] <optimize=false>;
CID chunk_id <format=hex>;
} SK <read=CommentSK>;
typedef struct {
ushort count;
if (count != 0)
Animation animations[count] <optimize=false>;
} AN <read=CommentAN>;
typedef struct {
local int i;
for (i = 0; i < 210; i++)
{
Colour c <hidden=true>;
ParseColour(c);
Colour glow_colour;
SetBackColor(cNone);
SetForeColor(cNone);
}
} GL;
//-Main---------------------------------
FSeek(0);
Header model_header <read=CommentHDR>;
local CID chunk_id = model_header.chunk_id;
local ushort x = 0;
while (x < 4) {
if (chunk_id == MATERIAL) {
MT materials_and_textures;
chunk_id = materials_and_textures.chunk_id;
x++;
}
else if (chunk_id == MESH) {
GE geometry;
chunk_id = geometry.chunk_id;
x++;
}
else if (chunk_id == ARMATURE) {
SK skeleton;
chunk_id = skeleton.chunk_id;
x++;
}
else if (chunk_id == ANIMATION) {
AN animations;
x++;
}
else { x = 4; }
}
if (FileSize() - FTell() > 4)
GL glows;
//-Functions----------------------------
void ParseRGBA(RGBA &r) {
FSeek(FTell() - 16);
local float blue = (r.b * 255.0f);
local float green = (r.g * 255.0f);
local float red = (r.r * 255.0f);
local int bc = (int)blue * 0x10000 + (int)green * 0x100 + (int)red;
SetBackColor(bc);
}
//-Chunk-Descriptors--------------------
string CommentHDR(Header &voi) {
return ("Unknown values, model flag, bounding box, and following chunk ID.");
}
string CommentMT(MT &voi) {
return ("Materials and textures.");
}
string CommentGE(GE &voi) {
return ("Meshes.");
}
string CommentSK(SK &voi) {
return ("Bones.");
}
string CommentAN(AN &voi) {
return ("Animation sequences.");
}
//-English------------------------------
string MaterialIndexRead(ubyte i) {
string name = ReadString(tex_offsets[i]);
name = SubStr(name, 0, tex_lengths[i]);
string s;
SPrintf(s, "%i ( %s )", i, name);
return s;
}
string MaterialIndexReadI(int i) {
string name;
if (i == -1)
name = "NULL";
else {
name = ReadString(tex_offsets[i]);
name = SubStr(name, 0, tex_lengths[i]); }
string s;
SPrintf(s, "%i ( %s )", i, name);
return s;
}
string AnimationRead(Animation &a) {
return (a.id.text);
}
string TransformationRead(Transformation &t) {
string s;
SPrintf(s, "%s: %s", "Bones", t.id.text);
return s;
}
string RGBARead(RGBA &r) {
string s;
SPrintf(s, "(%f %f %f %f)", r.r, r.g, r.b, r.a);
return s;
}
void RGBAWrite(RGBA &r, string s ) {
SScanf(s, "(%f %f %f %f)", r.r, r.g, r.b, r.a);
}
string BoneRead(Bone &b) {
string s;
SPrintf(s, "%s", b.id.text);
return s;
}