Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 08:02

  • Please register to post and access all features, it's quick, easy and FREE!

 

[Release] BTRF reader/writer source

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 766
[Release] BTRFdom DLL reader/writer + BTRFReader.exe source

It was asked some time ago and Gr4ph0s asked too, for the source of the BTRF parser.

This project is a BTRF reader/writer that represent a model of these file. So it can write BTRF files, but you need to add data to blocks in order to write something in a file.

For more information about how to use it, see dll-client-cpp/main.cpp and dll-client-python/print-content.py for a python script.

The code is made using C++, so I don't expect so much contribution, but if someone want to contribute, this project on github, make a branch to add your contribution and then post a .

If you don't have git, then using might be easier than using the command line.


So for now, @commit 714ab8e7aa, the DLL can read and write BTRF file from the BTRF model (BtrfRootBlock and BtrfBlock) and template files that describe the BTRF file (TmlFile and TmlBlock). I made a C interface (InterfaceC.cpp/h) to be able to use the DLL in python without too much things to do (in fact nothing more than what is done is needed, just open the .py file with the DLL in the current directory and the nx3 file and it should works)

So now, the needed part is the blender export plugin which will be made using python using calls to my library to add mesh/material data and then write the file.
(And for now, creating DIFK files will not be supported, but that might not be a problem for the client event if the previous file was not using the BTRF format)

So here the link to the project:
(It should compile under linux as well, or with minor changes)
Read the file for information about how to compile this project using MSVC 2010 (or later) or MinGW

If you want a compiled version of this program, see there:
There is NO compiled version of any program that can convert a model file made with a 3D software like blender or 3DSMax to a Rappelz NX3 file. It will be released soon, but is not complete at this time. This project can read/write BTRF file, but the current missing thing is that it need to have a representation of what to write, and this is what is missing currently. (it will be implemented as a export script for blender 2.64 in python)


Also, read commit message to know what's changed. But as of 16/08/2013, there are now 2 python script, one that output the content of a NX3 file, and the other create a BTRF file with nx3_tm template (which is neither a nx3 file nor anything else, Rappelz can't read it as it does not contain required templates).
These python script are there to show an example of how the DLL works (it use the C interface, but the DLL provide also a C++ interface that can be used later (for me at least))


Another edit:
I added the export script for blender 2.64 (don't know if it will work for other blender version), exporting a cube an then reimporting it via DAE works.
Mesh have to have triangles, the default cube in blender use quads, so you need to go in the 3D viewport menus: mesh->faces->triangulate (or so)

I haven't tested if Rappelz works Ok with static meshes, that may work if the mesh doesn't have bones and animation data. (I also haven't tested if UV texture coords are correctly mapped)

Note that the compiled BTRFdom.dll has to be in the blender folder where blender.exe is.

And a third edit:
I added an import script, as the nx3 -> dae -> blender cause bones to have a wrong transformation matrix (the rotation was missing, that's why the axe on the last thread here was not with the right rotation)
So now, with the import script, blender can import directly nx3 files. 1hand_smallaxe.nx3 (or so) seems to fully imported correctly including mesh vertices, faces, textures, UV coords, weights, bones (with rotation).
I still need to do some more checks and verify if the exported axe has the right rotation.

The goal is to be able to do:
nx3 -> import -> blender -> export -> nx3
with the imported and exported nx3 files being identical.

The convertion from nx3 to dae will still be possible using BTRFReader.exe, but I will not improve it (as support for collada is in fact incomplete, and collada libraries or not well documented. And python is far easier about matrix arithmetics )



glandu2 is offline  
Thanks
19 Users
Old   #2
 
elite*gold: 0
Join Date: Dec 2012
Posts: 68
Received Thanks: 2
Good release thank you


Nada92 is offline  
Old   #3
 
elite*gold: 0
Join Date: Aug 2012
Posts: 312
Received Thanks: 252
Hey thanks... each time I log you make so much progress
gr4ph0s is offline  
Old   #4
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 766
yes, but the API isn't so much stable for now, as this project is very young (almost one week now)

The blender python script is being developed but still not complete, version & material are done (but it's a very bare bone implementation, for materials there is only the texture filepath, no light parameter or anything else ^^)

Beside, using directly blender structs is far more easier than making a dae => nx3 converter (as in a python script, I can get whatever I want to create the BTRF file)

I expect to have a working minimal exporter in blender within 1 week

----------------------------
I tried to change the gaia axe we have when creating a new character.
Here what's changed in blender (original on the right, modified on the left):
You must register and activate your account in order to view images.

And here the in-game axe change (original on the right, modified on the left):
You must register and activate your account in order to view images.

AS you can see, the modified axe has missing faces and has a wrong rotation. The wrong rotation may be the cause of bones has Rappelz use bones to attach the weapon to the hand (and if the bone has a wrong rotation, the axe will not be right as here).
For the missing faces, I don't know for the moment, converting the modified nx3 axe to dae and then read it in blender does not show this problem ...


glandu2 is offline  
Thanks
5 Users
Old   #5
 
elite*gold: 0
Join Date: Aug 2012
Posts: 312
Received Thanks: 252
O_o Amazing work :3
gr4ph0s is offline  
Old   #6
 
elite*gold: 0
Join Date: Jul 2012
Posts: 231
Received Thanks: 65
WOW rappelz development is getting exciting every day
eziorav is offline  
Old   #7
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 766
I successfuly made Rappelz read my exported nx3 file, so this mean that I have a working importer/exporter for NX3 files which can load and save mesh data, texture coords, normals, bones and their weight correctly so Rappelz can read the file (no more missing faces, bad bone rotation or inverted normals).

But when attempting to make a sniper weapon to export it later and then create a screenshot of rappelz with a char having this sniper instead of the previous axe, my 4 year old computer crashed and now won't boot (it doesn't even pass the bios phase). The correct exporter is not on github as I was still testing it ... but the HDD should be fine (so no data loss), the project will be in standby mode maybe one week.

I can still support it if someone have problems when compiling the DLL which has not changed (in fact, only python script has changed these days)
glandu2 is offline  
Thanks
2 Users
Old   #8
 
elite*gold: 0
Join Date: Aug 2012
Posts: 312
Received Thanks: 252
Haha you see when I sayed your CG is dead xP

But good luck the problem with texture are just the name?
Since your last update from github you fix the problem with the bad index ?

Hope you will get quickly a new computer
gr4ph0s is offline  
Old   #9
 
elite*gold: 0
Join Date: Jan 2013
Posts: 1
Received Thanks: 0
Only glandu2 possible to explain how to install BTRFdom-master files in Blender?
wrs512 is offline  
Old   #10
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 766
Quote:
Originally Posted by gr4ph0s View Post
Haha you see when I sayed your CG is dead xP

But good luck the problem with texture are just the name?
Since your last update from github you fix the problem with the bad index ?

Hope you will get quickly a new computer
The problem with the texture was not the name, but it's index. In nx3, there is a material id and a texture id, the material id is explecitly given for every texture with mtl_id (see the .tml). The texture index seems to be the index of the texture from 0 to the number_of_texture-1. But the way I used IDs was wrong (and it just showned here as blender had more than one texture loaded, some of these unused), and I corrected that. so the texture name is not meaningful it seems (at least if no RDB or DB reference that name, but hey, Material74 is not really a usable material name ...)

So texture indexing problem is fixed. From the last test I did, the exported mesh was exactly what I saw in-game, without any glitches (the file was even of the exact same size than the original nx3 ^^)

And I will get a new computer within few days (on saturday probably), so I will be able to commit that.

To compile BTRFdom, use cmake as explained in later posts. Then place the io_scene_btrf directory in blender_dir/2.xx/script/addon (if I remember right, the folder name is addon anyway)
Then activate it in File->user preferences, "addon" tab, search for "Rappelz" and activate the plugin.


Also, the runtime error is not a problem for the plugin to work, I actually don't know the cause as I never had to solve this error message. So just ignore it.
If another error occur about the function "abort()", open the console using "window->toggle system console" and then repeat your action to cause the error message to appear. Then copy the content of the console window here.

(Also, the current exporter in github is not working well, there is glitches about wrong rotation and/or hole in the mesh, the fully working version will be pushed on github probably on saturday)
glandu2 is offline  
Old   #11
 
elite*gold: 0
Join Date: Aug 2013
Posts: 32
Received Thanks: 3
Hi at all.

Some problems with the programms and the models.

I try to used Blender v2.64 (32/64bit Versions) and Blender v2.71 (32/64bit Versions) with the NX3 Addon 1.3 (32/64bit). Now i tryed to use BTRFReader.

In all cases i become the same errors. If i wanna choose the addon at blender i become this error an when i try to dump my nx3 file with btrfreader.

The errormessage says: terminate called after throwing an instance of 'std:bad_alloc'
what<>: std::bad_alloc
This application has requestet the Runtime to terminate it in an unusual way.
Please request the applications support's team for more information.

The last terminate message i bekomme as i said also at blender when im trying to coose out the nx3 addon.

I have no idea. I useed no model programms since yet.


The cause of my trys is, that i have doublicate the master sets in dbo.item.

New stats are fine and icons are fine to, all is fine. but since yet, the use same model files as normal master sets. I would like to have, is that they will only be a little bit different in the coulor. I would only like to change a little bit the coulor of the new (same) .dds file. Thats all.

Somewhere on epvp i read about someone who would make new monsters instead using existing model files, And the awnser was to change the file names to new one, and to edit the nx3 files including the .dds filenames.

Ive tried this for me to. there are only the .nx3 and the .dds model files for the master sets. But everytime i try to edit the files and to insert them with new entrys in dbo.item (model_01 - model_17) the model files are invisible and my client crashs if i switch from my deco set to the master set.

Is it possible to get the equip working without using blender and btrfreader, or is it nessasary to dump/export the nx3 file, course of usage only editing one entry in nx3 file??

If it is nessasary to compile the files to get them working, can somebody tell me how to get blender or btrfreader working? or is there another way to get that files working?
As i said befor, i downt want to model new armor or thomething special, i only would like to change the coulor just a little bit.

I said thanks thanks now just befor and hope that someone wiill awnser me and can help to get the programms working or is able to help me otherwise with the model problem.

Im just new at editing around with modelfiles.

Thanks Thanks Thanks
Laladumdum is offline  
Old   #12
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 766
post here the nx3 file that cause your error so i can see what's wrong
glandu2 is offline  
Old   #13
 
elite*gold: 0
Join Date: Aug 2013
Posts: 32
Received Thanks: 3
Thanks for your fast replay

and here is the nx3

asf_body_warrior_master.nx3

Attached Files
File Type: rar asf_body_warrior_master.rar (72.4 KB, 7 views)
Laladumdum is offline  
Old   #14
 
elite*gold: 0
Join Date: Apr 2012
Posts: 448
Received Thanks: 766
Your file seems corrupted, it as severals end of lines inside. Did you opened this file in something like notepad and saved it ?

I attach the non corrupted one from a 8.1 client which loads correctly in blender
Attached Files
File Type: zip asf_body_warrior_master.nx3.zip (74.4 KB, 6 views)
glandu2 is offline  
Thanks
1 User
Old   #15
 
elite*gold: 0
Join Date: Aug 2013
Posts: 32
Received Thanks: 3
Yes i do.

As i said, i read about it in another thread, where someone gave the order to open the files with notepad and edit the link to the .dds like asf_warrior_master_body.dds to asf_warrior_master_body_new.dds.

Ok then the problem is clear that the files don't work.
(I thought about it just befor i wrote on this thread)

Now my only problem is to get blender working with the nx3 addon, and then how to change the .dds entry.

Thank you for your look at my file and for the work u do!!


Laladumdum is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
Bin READER / WRITER [SOURCE]
Heyho, Ich Release mal meine Decoder und Encoder Source fr .bin Dateien. Have fun :) Multiupload.nl - upload your files to multiple file...
7 Replies - WarRock



All times are GMT +2. The time now is 08:02.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy
Copyright ©2017 elitepvpers All Rights Reserved.