CMP Editor
-
**Since I am already using DX in the program (texture viewer) I may just make it like HardCMP. This way you could see it in full 3D and edit that way as well. That will take quite a bit of work to pull off but seeing it makes it so much easier to edit it.
The good thing is I’ve already written a full DX animation program, so I can just pull code from that to help with showing it in 3D.**
-
;D I once imported that into a CMP and tried to import it into milkshape, I could see the “stats” for the model but just couldn’t load the mesh, to many groups & material assignments for MS3D to cope with.
Looking forward to “playing” with this sometime LS
you just gave me an idea. lol
-
well, if you have enough time and patience… i believe you can edit the interface PROVIDED you have…
- patience.
- patience.
- patience.
if you print out the VMeshData in UTF, and tick the print triangles and vertexes, you get a list of all the vertexes that are in that node. a simple search in a hex editor and edit away… reason why you need patience is… theres in total… over 11,000 vertexes you need to edit. another thing is, the printed vertexes information has a ONE digit missing on the end. the last digit is either rounded up, or down due to a limit on windows (i cant remember what LS told me about that… many moons ago) so you’d have to use something like 010 Editor and use a variance search (so on the last digit give or take 0.000001 or something.)
-
Well I have found ou thru trial and error that FL supports 10 digit precision on the floats. As far as VMeshData exports from UTF editor 1.4, it doesn’t even output the mesh at all. Actually it only exports part 1 of the 3 mesh sections in the VMeshData. Part 3 defines the actual vertices of the mesh, not part 1. Part 1 is simply pointers to part 2 of the VMeshData, which is the vertices indices.
-
**Here is the first test version of the CMP Editor…
[Click here to download the test version
Thanks to Friendly Fire for testing earlier versions.
I have only tested this on a few files. The program will create a ‘Temp’ and an ‘Output’ folder. When you load the UTF file the data within it will be saved to the Temp folder. When you save the UTF or save a script, it will go to the output folder.
It will not overwrite the file you are editing. At this time you wil have to copy it to the correct folder. I will change this later but we have to make sure the program is working right before I do this.
Warning, make a backup of the UTF file you are messing with if you intend on replacing it with the files this program generates. I do not know at this time if the loader and saver are stable. They appear to be on the few files I have tested but I have yet to test all of the files in FL with this program.
For editable leaves simply double-click them to edit them. I don’t have every type built in yet but the main types can be edited.
When you click on a texture, you can see it on the right side bar. Also, when you load or save raw textures or sounds, they will have the proper extensions on them (thanks FF for suggesting that).
Each leaf node that is supported is auto-detected. This means that when you click ‘Edit’ or double-click on the leaf, it will pop up the correct edit box for that leaf name. As in you double-click on a ‘Dc’ node, it will pop up the color picker.
VMeshData is the only leaf that currently supports script export. I haven’t written the importer yet but that will be coming soon. This feature supercedes the one in UTF Editor 1.4, it has everything listed in it and is built as a compilable script that my code can read.](http://www.galacticenigma.com/LS/CMP_Editor.zip)**
-
Description updated
-
I’m sry to say this but when i try to run the exe i get a error message saying:
Component not found:
The programm couldnt start because d3dx9_28.dll could not be found. Reinstalling the programm may fix the problem.(translated from german)
Well there was nothing to install, i also tryed to replace the HardCMP exe in my installfolder with the new one but i still get that error.
Greetings
MindEdit: I found the dll at http://www.dll-files.com/dllindex/dll-files.shtml?d3dx9_28
For the other peoples who cant wait to test: Just download the dll and past it into the same folder as the exe. -
**Do you have the latest version of DX installed?
Click here for the latest DX runtime installer
That DLL you mentioned is part of your DX install, this program requires an up-to-date DX install to work. The texture viewer uses DX to convert the texture to bitmap which the program can load.**
-
Ok, it time for suggestions on what you want to see in the program.
-
Well, I tested the editor to edit DFM files (character body files), because all UTF editors screw the vertices up, v4 included. Anyway, as a test, I opened rh_male_guard_body.dfm (one of the ones UTF editor screws up, though it’s hardly noticable) and saved it, no changes. The file size increased by two kilobytes, but did it work? Did it replicate the body without messing it up? Don’t ask me, the game crashed as soon as I loaded a room with the body file in it. I got this Spit at me:
WARNING:General:create_texture: D3DERR_INVALIDCALL
WARNING:General:load_tga_mips: rh_guard_male_2.tga: failed to create texture!
WARNING:General:load_tga_mips: rh_guard_male_2.tga: mip invalid!
WARNING:General:load_tga_mips: rh_guard_male_2.tga: mip invalid!
WARNING:General:load_tga_mips: rh_guard_male_2.tga: mip invalid!
WARNING:General:load_tga_mips: rh_guard_male_2.tga: mip invalid!
WARNING:General:load_tga_mips: rh_guard_male_2.tga: mip invalid!
WARNING:General:load_tga_mips: rh_guard_male_2.tga: mip invalid!
WARNING:General:load_tga_mips: rh_guard_male_2.tga: mip invalid!Meh. I’m not sure if you intend to make DFM files editable, but they show up well enough. Something’s screwed up, though…
MK
-
**It is intended to edit any UTF file. I will check and see what has changed that makes it crash.
This editor makes every string separate so that is the most likely cause of the size increase.
The data is stored as binary files in the ‘Temp’ folder, so until I get the editors working for every part, it should not change any data stored in the leaf nodes that you can’t edit.**
-
I did test it last night and you are correct, it causes a crash. Has anyone tested any other UTF files to see if they work? I’ve only tested it so far to see if the UTF editor and HardCMP loads them up.
-
I’ve tested u’r editor and it looks like its going to be one of the best tools around.
I’ve not found a bug or crash so far but i’ve not rly tested it.But i have two ideas/wishes for the editor.
1. A copy and paste function for nodes would be very helpful, also if u could select more than 1 node, this would let us copy whole trees or parts of it.
2. A safe function for nodes, lets say i want to copy a part or a tree into another model, would be cool if i could select the nodes i want to copy and safe them in the editor and paste them into as many models as i want.
Those two things would make my life much easier.
Greetings
MindNote: Keep up the good work LS
-
**1 ) A very good idea, hadn’t considered multi-selection on the nodes
2 ) Saving them is the way I had intended on implementing the copy and paste, I never use the clipboard since I simulate it with an actual image of the data on the HD**
-
@Lancer:
I did test it last night and you are correct, it causes a crash. Has anyone tested any other UTF files to see if they work? I’ve only tested it so far to see if the UTF editor and HardCMP loads them up.
I was use other UTF editor, all of UTF editor has same DFM files problem.
-
**DFM files can be loaded and saved using the next version I will be releasing. It turns out that the dfm file has a huge number of tree nodes so I increased the maximum nodes to 32k.
Also, I found a major bug in the save routine, none of the saved UTF from the current version should even work. It was a test version so that is to be expected.**
-
@Lancer:
**DFM files can be loaded and saved using the next version I will be releasing. It turns out that the dfm file has a huge number of tree nodes so I increased the maximum nodes to 32k.
Also, I found a major bug in the save routine, none of the saved UTF from the current version should even work. It was a test version so that is to be expected.**
If you edit DFM files of nodes, and update it, UTF editor will add something and change the nodes size, please check it too.
Thanks for your hard work LS.
-
**The current version above is bugged badly. It can’t be used to edit any file properly. I will put up another test version this afternoon (or after midnight ur time Jong).
The next version should properly allow you to load and save the DFM files. I do have an add and remove node feature but it is incomplete. I’ve also added in the normal ASCII and HEX preview boxes like in the other UTF editors out there.
Another thing is I have been going through every UTF file and hunting down all of the missing nodes that I didn’t already have in it. I still haven’t added in the OpenFLAME stuff. Once I do that it will effectively double the number of nodes that can be edited.
I have found one thing though. The data size is the actual size of the data stored in the node. The allocated size is long aligned (as in every 4 bytes) and has a minimum size of 8 bytes. This is very important to FL and is not done in the version listed above.**