Forum > Development and Presentation

Tîntai

<< < (14/15) > >>

Mjollna:
Hello !

So first part of the test... It's already late so I'll continue later.
I have only started with WMOtoOBJ, I'll test the other tool in a few days too.

Important note : all my tests were made with files extracted (and so wmo) from the current 4.3 Wow.

Here's what I've done so far :

# I started file by file, to test the options.

- Dropping the files on the exe : works perfectly.
tested with :
AzerothBuildingsAltarOfStormsAltarOfStorms.wmo (2 subgroups)
AzerothBuildingsCastlecastle01.wmo (1 subgroup)

The following command with no option returns an exception (on Windows cmd and Cygwin) :


--- Code: ---C:UsersmyusernameDesktoptintai_alpha>WMOtoOBJ-032.exe castle01.wmo
Tintai WMO 0.32 - (c)2011-2012 Tharo Herberg
Exception in thread "main" java.lang.NullPointerException
        at java.io.File.<init>(Unknown Source)
        at me.tharo.tools.WMOtoOBJ.main(Unknown Source)
--- End code ---
(something I didn't get maybe ?)

But when I specify an output folder it's ok :
./WMOtoOBJ-032.exe -o test castle01.wmo

- Changing the extension with -text option is ok.

- Adding -tflat is ok too (tested with -text at the same time).

# Then after 2 models I got desperate about all the subfolders and the textures everywhere to convert, and I decided to go for mass scale.

- So I extracted all textures from several MPQ (art & expansions), and also all wmo from world.mpq -> worldwmo.

- I ran this script :


--- Code: ---#!/bin/bash
for i in `find . -not -path '*_[0-9][0-9][0-9].wmo' -and -path '*.wmo'`
do
./WMOtoOBJ-032.exe -o /mypath/tintai_tests -text png $i
done
--- End code ---
I realized afterwards I should have saved the errors in a file together with the filename. I'll see if can do that, I had 4 errors out of the 1494 wmo converted (ArrayIndexOutOfBoundsException). Since the script takes almost 20 minutes to go through everything, I prefer not to do that now.
Here's one example : http://puu.sh/crH2.

- And I also batch converted all the textures into png (that took forever O_o). I chose to keep the paths for the textures, so that it doesn't get too messy with everything in a single folder.

- I only had the time to open a dozen files, but so far they seem really perfect. Some Blender screens :
http://puu.sh/crx0
http://puu.sh/cryK

Hope that helps... I'll post again later.

tharo:
wow yeah. that looks excactly like that kind of test I wished someone to do :)
im happy that the texture options work well and seems to have a reason to exist. Otherwise im not sure wth is wrong with the ./ thing. It might be caused by the exe wrapper that rolls "around" the pure java application. i will check it - thank for figuring out.

And alooot of thanks for doing the mass test! of course im very interested where it went wrong. so if you may figure out the files i would like to know theyr names in order to do some test myself :)

in any case of an error the most important info is always the filename and the wow version where it comes from ... so i can check it myself.

Anyway. Thank you very much :)

schlumpf:
$ ./foo -o a a
$ ./foo -o a b/c.wmo


--- Code: ---diff --git a/src/me/tharo/tintai/util/WMO2OBJ.java b/src/me/tharo/tintai/util/WMO2OBJ.java
index 93ee5bc..dac4aa4 100644
--- a/src/me/tharo/tintai/util/WMO2OBJ.java
+++ b/src/me/tharo/tintai/util/WMO2OBJ.java
@@ -123,6 +123,7 @@ public class WMO2OBJ {
        private void writeMainOBJ(String fname, String dest)
        {
                File obj = new File(dest + "/" + fname + ".obj");
+               obj.getParentFile().mkdirs();
                System.out.println("  Writett" + obj.getAbsolutePath());
         try {
             BufferedWriter out = new BufferedWriter(new FileWriter(obj));
@@ -144,6 +145,7 @@ public class WMO2OBJ {
        private void writeMTL(String fname, String dest)
        {
                File mtl = new File(dest + "/" + fname + ".mtl");
+               mtl.getParentFile().mkdirs();
                System.out.println("  Writett" + mtl.getAbsolutePath());
         try {
             BufferedWriter out = new BufferedWriter(new FileWriter(mtl));
@@ -161,6 +163,7 @@ public class WMO2OBJ {
        private void writeColliOBJ(String fname, String dest)
        {
                File colf = new File(dest + "/" + fname + "_col.obj");
+               colf.getParentFile().mkdirs();
                System.out.println("  Writett" + colf.getAbsolutePath());
         try {
             BufferedWriter out = new BufferedWriter(new FileWriter(colf));
diff --git a/src/me/tharo/tools/WMOtoOBJ.java b/src/me/tharo/tools/WMOtoOBJ.java
index f1014b6..04254d8 100644
--- a/src/me/tharo/tools/WMOtoOBJ.java
+++ b/src/me/tharo/tools/WMOtoOBJ.java
@@ -57,7 +57,11 @@ public class WMOtoOBJ {
                        for(String filename : com.getList())
                        {
                                File f = new File(filename);
-                               if(!f.canRead()) continue;
+                               if(!f.isFile() || !f.canRead())
+                               {
+                                 System.out.println ("Skipped " + filename + ": could not be read or is not a file.");
+                                 continue;
+                               }
                                if(outdir==null) outdir = f.getParentFile();
                               
                                Vector<WoWFile> objs = WMO.LoadSet(filename, new StdFileHandler());
--- End code ---

You may want to set permissions on the file streams so one can use them on read only devices.

$ for i in `echo common-2 common expansion lichking patch patch-2 patch-3`; do mkdir $i; ./mount_mpq $i "/Applications/World of Warcraft/Data/$i.MPQ"; done
$ find . | grep ".wmo" | grep -v "_[0-9][0-9][0-9].wmo" > all_root_wmos
$ (time (while read i; do echo "$i"; time java -cp ~/Documents/tintai/bin/ me.tharo.tools.WMOtoOBJ -o converted "$i"; done < all_root_wmos)) 2>&1 > log
$ cat log | grep -B 2 -A 10 -i exception > exceptions
$ echo patch-2/component.wow-data.txt
<componentinfo format="1">
    <component name="wow-data" version="12340" />
</componentinfo>

total time: 38m40.615s

Not a single file extracted to disk btw. All in RAM.

tharo:
The svn is not up to date atm. but thank you very much ^^

Serifaz:
Hey is this project still going... if so can I beta test... I have gained quite a bit of knowledge on C++ and m2 wmo/m2 structure... and I was wondering if I could help at all?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version