Modcraft - The community dedicated to quality WoW modding!

Projects => Development and Presentation => Topic started by: tharo on July 26, 2011, 11:25:34 am

Title: Tîntai
Post by: tharo on July 26, 2011, 11:25:34 am
So hello. It was time for a new Thread bout the shit iam doing right now.
First of all I wish to give a short overview of the development itself.

Some Years ago I started to do WoW Tools. It all rellys more or less on the same bucn of code that is known as the "Taliis"-Core. This included as well the editor (later) as also many of the plugins that got written for it.

After almost tree years of development I noticed many weak points of this core. Thats why i did an entire restart called the Lyn-Core. It aimed to work completly just by using XML files based on the WoWDev Wiki. And of course it was fast an usable anyway. And a Fuck of work. After the first smal projects (such as a programm that ports cataclysm files back to wotlk) it turned out that doing tools is just absolute over complicated. In the WoW modder Scene its not only about clean and good code. Its more bout results. If u loose interest the result will be Zero. And thats why Lyn was a design failure.

Even Thought this I did a big merge of Taliis and Lyn concepts and designed a new, super smal Code that i want to call Tintai (after my Character on Aldor).

Tintai is not using any XML Files. But any of the core classes got redesigned to work even with complete unknown data. If a tool get written fast it will only work with one revision of the WOW Files. If it get written good it will work with most or any of them.  Tintai itself is less than 10 basic classes that brings anything along that is needed.

In this Thread I want to present results. Means: New Tools. New shit ive done but also ask question about things that wondered me. Maybe someone also noticed that.

Showoff:
Cataclysm on WoW WOTLK Live Server Summer 2010)
(http://img257.imageshack.us/img257/9056/wowscrnshot051210171945.jpg)
This was done by Lyn. A script took the new Stormwind.wmo from the leaked cata alpha and took out any linked ressource. Did the same for any m2 Model that was used, places of in any set. In the end a <900 Files string patch came out that made this possible.
Title: Re: Tintai
Post by: tharo on July 26, 2011, 11:27:34 am
I just noticed that in MOGN (http://pxr.dk/wowdev/wiki/index.php?title=WMO#MOGN_chunk) always two empty bytes padd the string container. Did someone found out why?
Title: Re: Tîntai
Post by: tharo on July 27, 2011, 12:23:34 pm
Seems that nobody cares a shit. However.

I did a smal WMO to OBJ Convertor (or let say im working on it) here some screens I made using glc_player - an open source OBJ viewer.

(http://img580.imageshack.us/img580/3739/redridgehumanfarmwmo.png)
(http://img269.imageshack.us/img269/1961/ndnecropoliscollisionno.png)

It was a bit nasty but in the end it was depressing easy (as always).
Atm I only export the shape itself and the corespodending groups. Next would be to also export normals and of course texture coordinates.
Title: Re: Tîntai
Post by: schlumpf on July 27, 2011, 01:15:46 pm
MOGN should pad to 4 byte alignment. Also, the only name with meaning is "antiportal". All others are purely informational for the developers and extracted from the .max file. These chunks are made for directly being loaded into RAM and have fast access to the entries. There is no copying from the file to RAM and then closing the file again in the client.
Title: Re: Tîntai
Post by: tharo on July 27, 2011, 02:02:52 pm
Oooh it should padd, huh? So then tell my the "logic" behind padding something to a 16 bit Boundary. I mean:

MAGIC (4 bytes)
size (4 bytes)
twoUselessSpaces (2 bytes)
Data ...

Thats "padding" ? Ahuh o.O Of course my friend of course  :ustupid:
I think its as barlow said: It was a running gag and the only person that was involved died by accident. thats why it came into the game as is it.
Title: Re: Tîntai
Post by: tharo on July 27, 2011, 04:51:55 pm
Okay im done for today. Absolute no motivation left.

(http://img847.imageshack.us/img847/3739/redridgehumanfarmwmo.png)

Thats the results. As u can see (or not) there some bugs happening.

1. The textures. I dont exactly know where to get the textures from. First of all I thought from MOBA - But this seems to be made for the Vertexes only and not rlly for the surfaces. Translating it makes absolute no sense o.O

Then I asked MOMT. Texture pointers, huh? Fuck that o.O - the wiki is outdated. Again...  Or in other words: useless.

2. So coz i dont knew where to get my infomations from i just decided to use MOPY. Its pretty good so far with only one problem: The result is as it is. Some textures get set wrong. Why? What do i know -.-" also some values are just fucked. Dont tell me theres a Material 80 or 77 somewhere  :usad:

Oh boy .. i see a lot of pain comming to get rid of this .. try and error, huh? In the end theres also some flickering happend. gosh ..
Title: Re: Tîntai
Post by: Soluhe on July 27, 2011, 05:41:05 pm
Quote from: "tharo"
Seems that nobody cares a shit. However.

I am interessetet in your project, but i can't help you much so I decide to don't answer to your posts :p "If you don't have to say something special ... shut up"
But you made a nice progress, so keep up :)

and you don't know where to find the right textures or you can't extract them (no client?)
because when you open your rootwmo whit notepad ... you can find what your textures you need ;)

if you don't have the client... maybe i can upload some textures for you!? just answer me

regards Soluhe
Title: Re: Tîntai
Post by: Tigurius on July 27, 2011, 05:48:23 pm
WoWModelViewer (http://code.google.com/p/wowmodelviewer/source/checkout) uses MOBA for it's texturing by vertices (http://pastebin.com/mEVVpy3z).
Title: Re: Tîntai
Post by: tharo on July 27, 2011, 06:18:42 pm
ah shit. obj files are surfave based instead of vertex based if it comes to this things. u cannot group vertexes only the faces... pfew.. i see a lot of dirty work incomming ..

On the other side: if someone knows a OBJ statement that allows to group vertexies .. wi would be happy to know. and no, "g" only affects the surface statements.
Title: Re: Tîntai
Post by: tharo on July 28, 2011, 09:35:09 am
Okay. After some mimimi yesterday I found a (more or less) good solution for this issue.
The Results:

(http://img842.imageshack.us/img842/3739/redridgehumanfarmwmo.png)
(http://img220.imageshack.us/img220/9553/redridgehumanfarmwmo2.png)

After all I think its not thaat bad for 3 days of work..
The obj File itself comes up later today.  (but yes, it will come of course ^^)
Title: Re: Tîntai
Post by: schlumpf on July 28, 2011, 10:06:00 am
Quote from: "tharo"
Oooh it should padd, huh? So then tell my the "logic" behind padding something to a 16 bit Boundary. I mean:

MAGIC (4 bytes)
size (4 bytes)
twoUselessSpaces (2 bytes)
Data ...

Thats "padding" ? Ahuh o.O Of course my friend of course  :ustupid:
I think its as barlow said: It was a running gag and the only person that was involved died by accident. thats why it came into the game as is it.

Ah, those. Nah, that's a zero padded zero-length string ended with a .. therefore one zero is the empty string and the second the padding. That string is referenced from somewhere as the referencing group has no name.

Alignment can be different for different data types. It does not have to be 16 bytes. It just has to be a power of two.
Title: Re: Tîntai
Post by: tharo on July 28, 2011, 10:39:02 am
Hey! I released something! Gimme my facking contributor color and script kiddie iconz nao!

Anyway. I was thinking about what to do next. Of course, and as u all can expect the main goal keeps manipulating the Data in the client.

After some remarks from Schlumpf i was checking how good or worse the OBJ format is for this matter. And in the end I think its okay. Of course the max formats are only there. And they DO support render batches for exsample...  But OBJ is just wonderfull to debug it.

Coverting wmo's - even "easy ones" to obj brings a heavy data loss. But atm it seems that i can recalculate any of them. Of course it wont be like the original file anymore. But it will still work and with some defragmenting algorythms there wont be any perfomace loss after all.

Of course im ONLY talking about the 3D Data itself. For music, portals, colligion and any other additional data u can bet your ass that some extra work will be needed anyway.
Title: Re: Tîntai
Post by: Pinkhair3d on July 30, 2011, 03:27:01 am
Amazing work! Bene hoping for something like this to come along for a long time.

As for format, Lightwave files have a lot of similarity to wow files in terms of the data that can be held- kjasi on the wowmodelviewer forums has been doing a bunch with it.
Title: Re: Tîntai
Post by: Steff on July 30, 2011, 09:13:34 pm
Hi THaro.
Nice to have you back on code. And to have working model tools whould be perfect.
Title: Re: Tîntai
Post by: tharo on July 31, 2011, 05:45:28 pm
Okay time for some updates.

Firs of all: Whats the state of development?
- Exporter for both formats are done.

Of course the next planed feature is the setup of own vertex structures. Unlucky there are some infomations that have do be known such as the entire MOBA.

I tryed several calculations and presentations of the datas to find em out... Some things got descovered. But many did not. Thats why atm i plan to do a longer test course that hopefully might show up the golden spot.

Point is:
AS LONG MOBA 0x0 - 0x12 is unknown there wont be a working import function.
Title: Re: Tîntai
Post by: Tigurius on July 31, 2011, 10:07:18 pm
I used for MOBA the struct from the Taliis-Source I gave you and it worked more or less:
(http://imagr.eu/up/4e35b4fa585a76_customwmo.jpg)
(http://imagr.eu/up/4e35b57985d912_Mat.jpg)
(http://imagr.eu/up/4e35b5d2ca5057_WoWScrnShot_040909_172539.jpg)
Title: Re: Tîntai
Post by: tharo on July 31, 2011, 10:48:40 pm
Where u just ignoring the fields i was talking about? or how had u managed em ?
I just dont know _whats_ the meaning of the  "start index" und "number if indicies"
Title: Re: Tîntai
Post by: Tigurius on July 31, 2011, 10:52:31 pm
MOVI.
The StartIndex is the count of the faces before this MOBA and the nIndices is the Number of Faces which is used in it.(atleast that's what i put in there.)
Title: Re: Tîntai
Post by: tharo on July 31, 2011, 11:20:40 pm
Hmm i also tought so, but the numbers had never realy fit. it always had been just "around"
But anyway. if you tryed it if should work. thanks for than :)
Title: Re: Tîntai
Post by: tharo on August 01, 2011, 09:44:56 am
Okay thanks again Tigu. I just tryed it out and your infomation seems to be just right.
WMO files seems to contains alot of surfaces that wont be used anymore. Thanks to the new infomation the whole rendering got a major plus in speed, logic and quality. thanks :)
Title: Re: Tîntai
Post by: TheBuG on August 02, 2011, 02:32:25 pm
Wow, just wow!

I haven't been able to properly check modcraft for a while due to holidays, but I must say I'm pretty damn well impressed with your work.

Keep up the good work!

[spoiler:307epo4o]Gimme gimme gimme gimme gimme :P
(Just kidding, get it stable and working first for as far as it isn't yet :).[/spoiler:307epo4o]
Title: Re: Tîntai
Post by: tharo on August 02, 2011, 02:38:43 pm
Since I favor Modcraft from mmowned I decided to put this download just here.
Have fun with it.
Title: Re: Tîntai
Post by: gorq on August 02, 2011, 04:22:16 pm
i can help u if u need some testing ;) I'm actually working on blender with m2mod and i think i have improved a bit my knowledge. Thanks to make this!
Title: Re: Tîntai
Post by: Steff on August 02, 2011, 09:20:53 pm
Thanks for the release. Just loading to do some siteseeing ;)

Thanks for your great work.
Hope the convert back to wmo v17 is soon ready to take a walk ingame :)
Title: Re: Tîntai
Post by: tharo on August 03, 2011, 09:04:23 am
I think ingame will take some time. After all i'm alone. + that I found out that its time to redesign the memory engine of Tîntai that, so far, was still the old one from Taliis.

Edit: Gimme colorz!!!

Edit2: Na. Suddenly lost my interest into redesigning it. however. it have to work -.-"

Edit3: oh lal and the "old" version is faster anyway ..
Title: Re: Tîntai
Post by: tharo on August 05, 2011, 02:55:53 pm
fixed

tenchar
Title: Re: Tîntai
Post by: LIMEEE on August 06, 2011, 12:43:15 am
Looks great keep up the good work!
Title: Re: Tîntai
Post by: Tigurius on August 06, 2011, 08:12:37 am
Maybe http://pxr.dk/wowdev/wiki/index.php?tit ... MOBR_chunk (http://pxr.dk/wowdev/wiki/index.php?title=WMO#MOBR_chunk" onclick="window.open(this.href);return false;)
Title: Re: Tîntai
Post by: tharo on August 06, 2011, 05:15:51 pm
Iam TALKING about this one -.-"
Title: Re: Tîntai
Post by: Guest on August 09, 2011, 06:40:22 pm
Which chunks are you expieriencing difficulty with and have you noticed that the gates of ironforge have some weird texture glitches it seems on alpha v14 and v17, (a few triangles do not look like correct texture was applied)
Title: Re: Tîntai
Post by: Steff on August 09, 2011, 07:45:33 pm
Its a normal problem.
Title: Re: Tîntai
Post by: tharo on August 09, 2011, 10:27:01 pm
This is not really a bug. All normals got set in that value as they are present in the WMO.
Title: Re: Tîntai
Post by: Serifaz on August 09, 2011, 10:52:09 pm
I love what you are doing... I spent countless hours trying to get a custom object working and after I finally got it working my dbcs got corrupted somehow after editing a new race, if there is anything I can do to assist please let me know I would love to help ;)
Title: Re: Tîntai
Post by: tharo on August 10, 2011, 11:00:38 am
You did custom models? Ahuh o.O

Hmm okay since u ask here is a short overview bout the "state" of the code atm.

That is working:
[WMO]
[aWMO]

That (should be) working but not tested by now:
[WMO]
[aWMO]

This is under construction atm
[WMO]
[aWMO]

The next "thing" that had to be done is the obj importer. The basic code is there and working. It have just become to be more fail-proove and needs a gentle handling of the WMO-File itself.

The first "import included" version of Tîntai will allow to "create" (by injection with a plain wmo that is internaly stored) a wmo file from an obj file. The entire surface will be set as 'cannot pass thought' collision and have a default light. No indoor will be supported.

Any futher version will need an config File for any action done. There just too many things that want to be justifyed .. and somehow this infomation have to be given to the programm.
This ALSO means, that people could create GUI's for Tîntai. To say it clear: I will not. I will never.

Another thing is the collision. WoW is using BSP for the collision. There is a strong need into a tool that creates a BSP from an OBJ File. And again: I wont do this kind of tool by myself. In worst case all models have to life with the default model what means: u can pass everything, or u cannot pass the skybox at all.
Title: Re: Tîntai
Post by: phucko1 on August 11, 2011, 12:13:38 am
Amazing, hope to see more from this tool and that you'll keeo on developing it so it does not end up as a dead project :P Thanks for the Alpha Ironforge btw <3 :)
Title: Re: Tîntai
Post by: LIMEEE on August 14, 2011, 10:49:06 pm
How is it going tharo?, Any new progress on the fantastic tool yet?.
Title: Re: Tîntai
Post by: tharo on August 16, 2011, 10:22:31 am
Code: [Select]
/* c/e/r */ myChildren.add(version = new MVER(this));
/* -/e/r */ myChildren.add(header = new MOHD(this));
/* -/e/r */ myChildren.add(textures = new StringChunk(this, "MOTX", true));
/* -/-/- */ myChildren.add(materials = new MOMT(this));
/* -/e/r */ myChildren.add(groupnames = new StringChunk(this, "MOGN"));
/* -/-/- */ myChildren.add(groups = new MOGI(this)); // group def
/* -/-/- */ myChildren.add( new Chunk(this, "MOSB")); // skybox
/* -/-/- */ myChildren.add( new Chunk(this, "MOPV")); // portal vertex
/* -/-/- */ myChildren.add(portalinfo = new MOPT(this)); // portal infos
/* -/-/- */ myChildren.add( new Chunk(this, "MOPR")); // portal relationships
/* c/e/r */ myChildren.add(VisibVert = new Chunk(this, "MOVV")); // visible block vert
/* c/e/r */ myChildren.add(VisibList = new Chunk(this, "MOVB")); // visible block list
/* -/-/- */ myChildren.add(lights = new MOLT(this)); // lightning blocks
/* -/-/- */ myChildren.add(doodadsets = new MODS(this)); // doodad sets
/* -/e/r */ myChildren.add(doodadfiles = new StringChunk(this, "MODN", true)); // doodad files
/* -/-/- */ myChildren.add( new Chunk(this, "MODD")); // doodad placements
/* -/-/- */ myChildren.add( new Chunk(this, "MFOG")); // FOG

Thats the state of the "root" wmo class.
c = can be created from scratch
e = can edit the containing values
r = can render (eg. save) the values

It looks sad but its almost enought to do obj->wmo based on the fact, that u only inject into a valid WMO file.

This injection is how Tintai will work the first releases.
Title: Re: Tîntai
Post by: Sho on August 26, 2011, 02:43:38 am
Hey, Tharo I had a  question, in a previous post I saw that you have one of your textures messed up and it went all wacko, there is a project that a team and I are working on and its based alot off of custom m2s, I know its not a wmo and probly isnt all worked out like one and they are probly way diffrent but I thought maby the way textures go on the objects is not and wanted to know how you fixed that problom of the wacko texture on that house. I will show the image of it happening to one of our custom models to show you what  I mean too. we have other objects messed up worse then this but this is one of the ones we have in the game. (http://i53.tinypic.com/35li874.png)
The top of the gates sighn and such there are supposed to be 3 diffrent ones but you see half of one and a twisted texture it looks like.


Cheers, Sho.

P.S Sorry for intruding and sorry if you didnt want me to post here (:



Jutsuonline.net Looking for New members for the team also.
Title: Re: Tîntai
Post by: tharo on August 29, 2011, 03:06:41 pm
Hmm in fact I cant tel the reason. In WMO it worked on the first try - I did nothing special with the texture indexies...
Title: Re: Tîntai
Post by: Sho on August 29, 2011, 08:10:40 pm
Maby I should try it in wmos see how it works tobad I dont have your program! lol (: would make life easy.


Hey can you add me on msn or windows live I wanna talk about it a little like playing around with wmo's or you can pm me on here with your email or somthing


 Zeltous@Hotmail.com


Cheers, Sho
Title: Re: Tîntai
Post by: Sho on September 03, 2011, 11:53:21 pm
Well, figured it out, here is the result, the only prob we have left is we can seem to only put custom models on npc, we want to learn how to make them soild once we do that our buildings will be soild, anyways here is the screenie [spoiler:2t2uus7a](http://i56.tinypic.com/2i8bsrp.jpg)[/spoiler:2t2uus7a] All in all I would love to have your tool or learn how to make wmos to support our custom models, and would be willing to pay for it ^^ if need be.
Title: Re: Tîntai
Post by: LIMEEE on October 06, 2011, 11:59:22 pm
Any news? or did you stop working on this? :/
Title: Re: Tîntai
Post by: tharo on October 30, 2011, 03:48:57 pm
Hi. Yesterday I had the first 8 hours of "bloody debuging" for the tintai injector.

The results are so far:
  - Exporting and re-injecting the booty bay plank works by 98% now.
  - But for some reason the result on "own" models went worse. Im not rlly sure why and how this happends. Thats why I need to make myself some test OBJ files.

So .. in fact the biggest problem is the "sort" algorythm i had to made. Basically its made to reorder triangles and surfaces to WoW-lookalike render branches.

In other words: Im working on it. it gotta be though :/


And i think that sho and his friends went far beyond :/
Title: Re: Tîntai
Post by: tharo on October 30, 2011, 04:23:44 pm
So ok. Just did a quickie with the Abey Gate:

(http://img821.imageshack.us/img821/7269/tintaiinj.jpg)


In fact i was surprised it worked "that" good after all. Seems that outdoor models will work pretty soon.
Title: Re: Tîntai
Post by: Steff on October 31, 2011, 08:20:45 am
Nice to see that you have got some motivation and time again :)
Title: Re: Tîntai
Post by: tharo on October 31, 2011, 05:09:47 pm
Okay. My Motivation is fading but as least a did a whole bunch of bugfixes last night.

(http://img839.imageshack.us/img839/9530/boxx.png)

It turned out that the whole "dissapearing" is a matter of a wrong colligion handling.
WoW seems to use the colligion model in wmos for loading, preloading and unloading puposes. If you put a whole big model to a single colligion mesh it might cause that everything will just dissapear.

Plus that every colligion node have a natural "limit" of maximum surfaces. But dont ask where it is ..

In the End this seems to be the last point that is under construction atm. After handling it tintai should be ready to put various outdoor objects ingame.


Ah but here comes an other problem. It seems that many 3D programms only export coordinates for 3D textures. They will, of course, NOT work wuith Tintai ..
Title: Re: Tîntai
Post by: TheBuG on October 31, 2011, 05:42:23 pm
Good too see you're still progressing :).

Too bad your motivation is fading :(. Though, that sounds quite familiar :P.
Title: Re: Tîntai
Post by: Mjollna on November 01, 2011, 03:51:07 pm
Hi !
 
So I made two models, I hope it's close to what you're looking for.
I didn't feel like making something from scratch, so I chose 2 Wow models, and I exported both from Wow Model Viewer as obj.
All the edits were done in Blender 2.59. I'm not really what you can call an expert 3D modeler, I now my UV-mapping has flaws, but I did my best in a few hours.
On both models I think the texture coords are 2D, and I exported normals every time.

[center:q65fem05]http://www.mjollna.org/docs/models.rar[/center:q65fem05]

---

- The first one is pvpentrance_nightelf.
On that one, I removed the rocks that were behind the house, as well as the sides, and I added a few faces to make the edge of the house cleaner where it previously touched the rocks. I also removed a part of the inside room and made a wall instead.
It's supposed to be out of reach, half into a cliff, on a map I'm editing.

It doesn't have too many vertices, and it's supposed to be quite small... If it's not small enough I can shrink it on saving, so tell me and I'll change that.

There are 2 weird faces in the model (on the roof) I can't correct, so I've made 2 saves in case they're really buggy : with thoses faces and without those faces.
The original model has 13 meshes. I made 2 versions of each : 13 meshes and 1 big mesh.

---

- The second one is much bigger (I hope not too much), it's the famous old CoT, or actually only a small part of it (1st wmo, part 8 as far as I remember).
I've made the edit for a friend, and if you can switch it back to wmo you'll make that someone very very happy :)
The edit I made consisted in deleting a lot of the remaining pieces in order to keep only the center spiral. I had then had to add something like 8 faces and re-stretch one texture, to close properly a hole that was left by the deleted bridge at the spiral base.

You'll have several versions of it in the zip file : It indeed looked very big, so I let the original size, and I also saved the model rescaled much much smaller.
The original saving has 13 meshes. I also made 2 versions : 13 meshes and one big mesh.

---

Tell me if there's anything I can change, if I forgot something, etc.
There are lots of different saving options for obj import/export in Blender and one way may be better than the others.

My email if necessary : mjollna.wow AT gmail.com
And I'm always on irc/Quakenet.
Title: Re: Tîntai
Post by: tharo on November 04, 2011, 11:58:27 am
Okay. Here a short Update:

- Tintai is not dead ^^ The work will continue next monday
- It seems that the reformating algo needs a major update. Sometimes just bugs happends and I dont know why. Thats odd but well, have to be done
- The BSP Code have to be done, hopefully that it will kill many weird things that still happend.

Well. Beside of that I think redoing the wmo2obj code is also a good idea. I would like to insert new flags for many things. just as "export colligion data" or "bounding boxes" or flags for different materials. In other words: make more of the "how a wmo file works" visible in the export. In worst case and as least as comments.

Quote
tintai WMO 0.2      (c)2011 Tharo Herberg
Usage: test [-options] [files...]

where options include:
   -o <???>
   -outdir <???>         to set the output direcotry
   -? -help              prints this help message
   -version              prints product version

I got bored in the office and wrote an auto generating extended argument handler.
Its odd to be not able to test anything here -.-" If this keeps going on i will extend it by an "pass all arguments via xml" handler ...

In fact the reason for doing it is, that The wmo-generator as well as the wmo-injector both need tons of additional input infomations ..
Title: Re: Tîntai
Post by: yubiyoy on November 08, 2011, 11:58:21 pm
Just motivate yourself and keep working! This will be a great tool when its done!
Title: Re: Tîntai
Post by: tharo on November 09, 2011, 03:26:56 pm
Heh, thanks for your motivation your little .....

So. Whats up.
First of all: No progress. Im still in the same situation. The reason is that I noticed many new "problems" in the colligion chunks. So for example it turned out, that some formats i expected seems to be wrong. Other wow wmos seem to use a complete different notation.

fe. The Booty bay plank have a list of surfaces indexies that have to be used. Everything seems to be in a single BSP. No problem so far.

But at the other hand the wmo for a typical house (u had seen the screenshots before) dont act anything like that. The def Chunk does tiny indexies and use alot of chunks. The index list is no index list after all. It looks more like a bunch of flag def's.

So of course this have to be re-reverse engined. But as i said. I lack at motivation atm.
Title: Re: Tîntai
Post by: tharo on November 15, 2011, 03:52:53 pm
Mjollna, your house6onemesh have dozens of errors.

You only have  939 texture pairs. But dozend of surfaces use indexies higher than that:

Quote
f 1031/844/939 1032/843/939 1033/865/939
f 1031/844/939 1032/843/939 1033/865/939
f 1031/844/939 1032/843/939 1033/865/939
f 1034/862/940 1035/864/940 1036/863/940
f 1034/862/940 1035/864/940 1036/863/940
f 1034/862/940 1035/864/940 1036/863/940
f 1037/863/941 1038/865/941 1039/862/941
f 1037/863/941 1038/865/941 1039/862/941
f 1037/863/941 1038/865/941 1039/862/941
f 1040/870/942 1041/869/942 1042/845/942
f 1040/870/942 1041/869/942 1042/845/942
f 1040/870/942 1041/869/942 1042/845/942
f 1043/850/7 1044/852/943 1045/851/8
f 1046/861/944 1047/859/944 1048/845/944
f 1046/861/944 1047/859/944 1048/845/944
f 1046/861/944 1047/859/944 1048/845/944
f 1049/873/945 1050/859/945 1051/861/945
f 1049/873/945 1050/859/945 1051/861/945
f 1049/873/945 1050/859/945 1051/861/945
f 1052/870/946 1053/845/946 1054/869/946
f 1052/870/946 1053/845/946 1054/869/946
f 1052/870/946 1053/845/946 1054/869/946
f 1055/869/947 1056/856/947 1057/846/947
f 1055/869/947 1056/856/947 1057/846/947
f 1055/869/947 1056/856/947 1057/846/947
f 1058/846/948 1059/848/948 1060/849/948
f 1058/846/948 1059/848/948 1060/849/948
f 1058/846/948 1059/848/948 1060/849/948

f.e.
Title: Re: Tîntai
Post by: Mjollna on November 15, 2011, 04:52:37 pm
Erf, I didn't see that -_-
I'll try to fix this, I post here a soon as I get rid of the problem.
Title: Re: Tîntai
Post by: Mjollna on November 15, 2011, 05:19:58 pm
Mmmh, should be ok with this one, I think...

Number of "vt" lines is 934, and ctrl+f in the whole file doesn't seem to have any "f" line with index > 935.

http://www.mjollna.org/docs/house6_onemesh2.rar

The other models seem to have the same problem, so if it's ok with this one tell me and I'll correct the others with the same method (Blender -> remove duplicates -> re-export).
Title: Re: Tîntai
Post by: tharo on November 15, 2011, 06:12:13 pm
same issue .. this time with normals ...
Title: Re: Tîntai
Post by: Mjollna on November 15, 2011, 10:18:31 pm
Mmh, then I guess I don't get what the problem is...

Here's what I understand :

In the latest model I sent, I get -->
v : 784 lines
vt : 935 lines
vn : 781 lines

Then if I get it right, it's ordered v/vt/vn in f lines.
I don't find indexes higher than 784 for v, 935 for vt and 781 for vn.

So what max number should I try to reach for vn ? Or is it because v & vn should have the exact same number of lines ?

---

Edit : just in case, I tried this directly in the obj txt file -->
- removed the last 3 vertices, so that there are 781 v & 781 vn.
- removed all the faces referencing the 3 vertices I removed.
There's a small hole on one side of the roof, but Blender seems to be still happy with the file, as well as Wings3D and Ayam and Milkshape3D. If it works that way for you I'll fix the hole later to have a nicer model.

The file : http://mjollna.org/docs/house6_onemesh_781.obj
Title: Re: Tîntai
Post by: tharo on November 16, 2011, 03:34:58 pm
I will try it later tonight (if i can find some spare time)

Of course I think that my obj parsing code is a big weak atm. Thats just because I was to lasy to put a "checker" in that is taking care bout this shit instead of make the programm crash.
Title: Re: Tîntai
Post by: Mjollna on January 02, 2012, 04:49:54 pm
Hi tharo !

First of all, Happy New Year to you :)

I think my question the other day ended buried in the abyssal depths of the chatbox, so I ask it again here.
I wanted to test the alpha release you made for Christmas, but I can't find any download link on the Bitbucket wiki... So sorry for that, but where is it ?

Thx !

Mjollnà
Title: Re: Tîntai
Post by: tharo on January 02, 2012, 09:33:59 pm
Here you go:

http://filebeam.com/8f2736597934934d48891e9c70875339 (http://filebeam.com/8f2736597934934d48891e9c70875339" onclick="window.open(this.href);return false;)

Feetback is MORE than just welcome
Title: Re: Tîntai
Post by: Mjollna on January 02, 2012, 09:36:36 pm
Yay thanks ! :)

I'll reply here when I test, in the next few days.
Title: Re: Tîntai
Post by: tharo on January 02, 2012, 09:58:15 pm
They should both work 100% acurate. Please convert your testmodel using it and report bugs/errors.

Ah and yes. it WONT work with uvw texture coordinates.
Title: Re: Tîntai
Post by: Steff on January 02, 2012, 11:19:34 pm
It would be very nice if everyone with 3D converting knowledge would test this. And as soon as possible.

And that means yesterday :) So Tharo gets feedback and can go on in development.
Title: Re: Tîntai
Post by: TheBuG on January 03, 2012, 12:23:44 am
I don't have much knowledge about 3d modelling and programming, even though I know how to create models, so I'll give it a shot and see how it works.

Edit: Small update, I exported a WMO and converted it to .obj (Which worked perfectly), however when I opened it in 3ds max the model was rotated a 90 degrees on the X-axis (in 3ds max atleast).

Giving another model a try tomorrow, bit sleepy at the moment.
Title: Re: Tîntai
Post by: Steff on January 03, 2012, 06:09:12 am
Just rotate, edit and rotate back....
Title: Re: Tîntai
Post by: Laniax on January 04, 2012, 03:38:14 pm
Quote from: "TheBuG"
I don't have much knowledge about 3d modelling and programming, even though I know how to create models, so I'll give it a shot and see how it works.

Edit: Small update, I exported a WMO and converted it to .obj (Which worked perfectly), however when I opened it in 3ds max the model was rotated a 90 degrees on the X-axis (in 3ds max atleast).

Giving another model a try tomorrow, bit sleepy at the moment.

I noticed this with more models i exported out of WoW (using a self made extractor that convert to lightwave(.lwo) and then to .3ds. I just wrote a piece of maxscript that'd rotate it back to default rotation when used.
Title: Re: Tîntai
Post by: Mjollna on January 05, 2012, 02:50:12 am
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: [Select]
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)
(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: [Select]
#!/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
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 (http://puu.sh/crH2" onclick="window.open(this.href);return false;).

- 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/crx0" onclick="window.open(this.href);return false;)
http://puu.sh/cryK (http://puu.sh/cryK" onclick="window.open(this.href);return false;)

Hope that helps... I'll post again later.
Title: Re: Tîntai
Post by: tharo on January 06, 2012, 07:45:19 pm
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 :)
Title: Re: Tîntai
Post by: schlumpf on January 07, 2012, 01:31:25 am
$ ./foo -o a a
$ ./foo -o a b/c.wmo

Code: [Select]
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());

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 (http://d.pr/NVBQ+)
$ (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 (http://d.pr/9oLA+)
$ cat log | grep -B 2 -A 10 -i exception > exceptions (http://d.pr/dLJJ+)
$ 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.
Title: Re: Tîntai
Post by: tharo on January 07, 2012, 04:14:52 pm
The svn is not up to date atm. but thank you very much ^^
Title: Re: Tîntai
Post by: Serifaz on March 20, 2012, 12:08:34 am
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?
Title: Re: Tîntai
Post by: tharo on June 21, 2012, 02:42:45 pm
No. Tintai got disconinued. But thoose days it seems that there will be an C++ restart of the "wmo" project.

This time it will be open source from the very beginning. Everyone that want to join is welcome.