• 0

    posted a message on Help understanding Sc2 .m3 file

    I double post instead editing to a) bump thread b) this is good discovery for me to share.

    I wrote to pdf file how to understand what you see on http://code.google.com/p/libm3/wiki/MODL page or any libm3 page. After reading this you should look different way on libm3 writings. It is like you almost can read the code. PDF is attached as attachment.

    Posted in: Artist Tavern
  • 0

    posted a message on The Eccentric Ship

    High poly version looks cool. Does sc2mapster do not have reputation system or something?

    Posted in: Artist Tavern
  • 0

    posted a message on Help understanding Sc2 .m3 file

    Google is no longer enough?

    "Hey, this 4 character data represents feature X in a real model"

    Blender python script does this for you, if you understand python code you understand where something is stored in hex.

    I give example (could someone upload sc2 default cube.m3? [plane or triangle would be even better, vertex.m3 would be pure awsomeness]). Export cube to Blender with python script. Go to UV editor (how ever it is called), pick one UV coordinate. Apply on its coordinates wisdom: From m3lib: Note: Important that you read in UV coordinates as signed short values realUV = 1771 / 2048.0 realUV = 0.8647

    1771 in HEX is 6eb (1771 might be UV's U or V, it does not matter for example). Search from m3 file 06eb (or be60 if it is stored reverse) and you will find:

    feature X in a real model

    Then to further evolve this theory (from m3lib, formatting is thx to forum formatting scrambled, how do I add tags?): struct Vertex32 32 byte { Vec3D pos; char boneWeight[4]; char boneIndex[4]; index in boneLookup of vertex submesh char normal[4]; x, y, z, w (w is the scale) int16 uv[2]; char tangents[4]; };

    char is 1 byte, char boneWeight[4] means 1 byte x 4 = 4 bytes, that makes 16 char bytes total. int16 is 2 bytes, int16 uv[2] means 2 bytes x 2 = 4 bytes. 16 + 4 bytes = 20 bytes struct Vertex32 32 byte, but where are the missing 32 - 20 = 12 bytes? I am using C variable types as base. In HEX file I think you always search for cluster of bytes. Because byte on its own can not give info.

    EDIT:

    For everybody motivation: http://wacco.mveas.com/index.php?entry=18

    Posted in: Artist Tavern
  • 0

    posted a message on Help understanding Sc2 .m3 file

    You are saying, Cory Perry (muraj), writer of Blender 2.58(!) M3 IO python script is no longer maintaining the code? I consider maintaining keeping script compatile with Blender latest version. Adding new features to script is different story. Well done, if you managed by yourself, pushing Blender community to update old m3 IO script to work with 2.5x realeases. To short this thing out: Cory Perry (muraj) != sc2mapster thread starter, yes? My pdf writing style is from humanitarian to humanitarian. If you know something about m3 hex file (how to search tags, specific tag, how to interpret what you see in hex file, etc) share your findings. I' m into learning m3 hex file structure.

    About learning curve, I first have to learn how to understand gurus (or any) comments. What they write is mystery at its own :)

    Posted in: Artist Tavern
  • 0

    posted a message on Help understanding Sc2 .m3 file

    Recommend any good SC2 viewer?

    EDIT: I downloaded HEX editor from this thread and read blog about format and looked m3lib project. Then I had heureka! moment and I wrote down my learnings. Flamephonix check it out, it is pdf 3 pages file with examples and easy reading how to understand m3 file in HEX format (or is it binary?). Still I am in early steps of learning. If we are able to document one m3 file like I have written in my pdf. Maybe exporter is not ages away. Sad that 010 Editor is 30 days trial, when it expires I am in darkness.

    EDIT1: M3 file uses reverse byte ordering, if you are looking for MODL tag, write to HEX editor search LDOM and you find what you are looking for.

    EDIT2: It seems exporter for 2.56a Blender does exist: http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/Import-Export/M3_Import Key to understanding is examining others people code. I somewhat understand how things are ordered in m3 hex file, but fail to find them (where does what start? For that there are these "headers" like MODL).

    EDIT3: Things have been evolved rapidly, I found out (with tend to be pretty obvious) that oven hot Blender 2.58 suports vanilla m3 import. Though I had problems with texture (I might dig into it later) but main things like vertices and normals were loaded from m3 hex file without a problem. Took even picture of it. Importer (I guess eporter) can be enabled from "User Preferences" Add-Ons (just tick box M3 importer). Then go to File > Import > M3 Blizzard. Good things about all this is we got now python script which reads HEX M3 file to learn from and many (link I posted and turns out at sc2mapster has also Blender M3 import script) to learn from. To make it short: Blender is under rapid development and IO scripts which worked with old version will not work with newest version only because a) IO script initialization script needs cosmetic update (API calls remain same) which gives fals impression "OMG it is abandoned!". To get old script working open already working IO python script observe it and write new initialization script (or modify existing old IO script accordingly). Actually for modeling needs fixed Blender version (get it from repository of old Blender programs @ Blender.org) and version specific IO M3 script is all you need for lifetime SC2 modding. I know jump from 2.49 to 2.5x Blender had huge changes which I liked and I am glad importers for M3 files are supported. Otherwise we would had to come up with our own solution (luckily it was done for us already). Still I am interested to understand M3 HEX format and how python script interprets it. If someone is willing to comment what that code exactly does then we can have solid support for upcoming Blender versions too.

    Just crazy how fast Blender scene evolves Link to picture: http://imageshack.us/photo/my-images/694/blender258m3importvanil.jpg/

    Posted in: Artist Tavern
  • 0

    posted a message on Help understanding Sc2 .m3 file

    I joined the buzz. Longer story @ thehive, thehelper.net. Because username Sooda was taken I use here SoodaTH.

    I downloaded cube.m3 and white_diffuse128.dds. To start thanks for your input who have replyed and offered resources. I must admit loading this test model vanilla does not work. To make it short: Name white_diffuse128.dds to cube_diffuse.dds For some reason m3 viewer which I have is unable to load white_diffuse128 correctly (it is in viewer transparent or black on black background). therefore I used armory_diffuse.dds instead. Result what I got looks like this (attached under post). It is way different than cube (texture needs to be scrambled, that is ok, but vertices are off. Was it in other modeling program a real cube?). I am asking this because my m3 viwer renders default bunker, armory, etc flawlessly. Anyway it is good model to start learning from nevertheless because it is so basic.

    Posted in: Artist Tavern
  • To post a comment, please or register a new account.