XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Mar 28, 2017 5:41 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 65 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Tue Nov 24, 2015 6:45 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Wed Jul 06, 2011 8:47 am
Posts: 346
Location: Russia
Has thanked: 516 times
Have thanks: 159 times

Very useful Tool, thank you!

Tested with Armored Warfare (RU version) - works good! :)
Image
Successfully converted .cga, .cgf and .chr models.

Btw, I have some suggestions about AW-converting:
- option for skip LODs (all of them have part name starting with $),
- option for full path to textures in .mtl file, now it's looks like this:
Code:
map_Kd \objects/vehicles/mbt/leopard2a6/textures/leopard2a6_hull_d.dds

(note \ and / mixing bug)
I renaming it to this:
Code:
map_Kd ./textures/leopard2a6_hull_d.dds

works ok, but sometimes textures loads from outside folders, like this:
Code:
map_Kd \objects/vehicles/textures_universal/universalprops/universal_props_shader/universal_props_shader_d.dds

or this:
Code:
map_bump \textures/detail_bumpmaps/metal/metal_006_detail.dds

or from another model folder, like this one for Leopard 2 A6:
Code:
map_Kd \Objects/vehicles/MBT/Leopard2A5/textures/leopard2a5_aps_destroyed_d.dds

So, it's better to detect full path to model in converting and use it for calculating base path to extracted game, i.e. for q:\!_AW\gamezero\objects\vehicles\mbt\leopard2a6\leopard2a6--leopard2a6.cga model "detected" base path is q:\!_AW\gamezero\
Then add this path to textures paths like this:
Code:
map_Kd q:\!_AW\gamezero\textures\leopard2a6_hull_d.dds


Another issue for AW .mtl's is
Code:
d 0.0000

for every material inside, so all of them have zero visibility by default - not sure it's game "feature" or convertion bug...

Tank hulls also have some shitty looking "armor proxies" attached, but with different materials:
Image
(I set transparency to 35 for them on this image for better look)
Would be very useful if you add option to detach (by material) and skip those "proxy" meshes.

Tank turret, suspensoins, tracks and gun parts loads in the center of scene - there's no any dummies or bones to attach them in places?

Found a bug in material, not sure it's game or tool part:
Code:
newmtl APS
Kd 0.1636 0.1870 0.1573
Ks  0.4151 0.4151 0.4151
d 0.0000
illum 2
map_Kd \objects/vehicles/mbt/leopard2a6/textures/leopard2a6_aps_d.dds
map_Ks \objects/vehicles/mbt/leopard2a6/textures/leopard2a6_aps_s.dds
map_bump \objects/vehicles/mbt/leopard2a6/textures/leopard2a6_aps_d.ddsobjects/vehicles/mbt/leopard2a6/textures/leopard2a6_aps_ddn.dds

(Leopard2A6_Detachparts_Hull_mtl.mtl)
bump map have diffuse+bump path.

Also some materials contain double bump maps, normal and detail ones (second is for UV2 I think):
Code:
newmtl interior
Kd 0.2195 0.2195 0.2195
Ks  0.2195 0.2195 0.2195
d 0.0000
illum 2
map_Kd \objects/vehicles/mh60_blackhawk/textures/mh60_interior.dds
map_Ks \objects/vehicles/mh60_blackhawk/textures/mh60_interior_spec.dds
map_bump \objects/vehicles/mh60_blackhawk/textures/mh60_interior_ddn.dds
map_bump \textures/detail_bumpmaps/metal/metal_006_detail.dds

(MH60_mtl.mtl)
second one trying to loads as default, so another option for skip is required.

And about options - can you made a .cfg file for changing them?
Because I use DblClick for conversion (set up cgf-converter.exe as default app for open .cga, .cgf, .chr files), so dancing with command line is not so good for me...

Samples (textures UnSplitted already):
MH-60 BlackHawk (15,4 Mb)
Leopard 2 A6 (190,9 Mb)

You can make the ads go away by registering



Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Tue Nov 24, 2015 1:52 pm 
Offline
advanced

Joined: Tue Dec 24, 2013 2:42 am
Posts: 74
Has thanked: 4 times
Have thanks: 25 times
Thank you for checking out the program, and especially for the detailed bug reports! I'll take a look at these after the holidays.

The .obj file exporter is a bit limited in that the .mtl format is pretty limited into what it can do. I'm converting the xml material files into that format, and they are much more complicated than the obj mtl format can support. I'm currently working on the COLLADA exporter portion, which will hopefully have a lot more options as far as material support.

Also, if you use the -objectdir argument when running the program, it should put the fully qualified path into the mtl file as well. That will allow it to use dds files outside of the structure the model is in (like the textures\ directory). You need to put the path to where the .pak files are located, so in my case it's:

cgf-converter.exe <file to convert> -objectdir "e:\blender projects\AW"

The / vs \ should be ok with most modern versions of windows, but I'll double check that. I'm pretty sure Blender didn't have any problems importing based on forward vs back slashes, but will definitely test that out.

For stuff loading at the center, there is probably an XML file that contains info on where they are supposed to be placed globally. This is how it works for MechWarrior Online, where the mechs come in dozens of separate pieces and the position info is located outside the .cga file. I made a powershell script that moves them in Blender.

Eventually I'll make a graphical front end for the program so that the entire tank can be done in one click, based on.. probably the .cdf file info. That usually says what pieces go where. But first I need to get through Thanksgiving and figure out how much Fallout 4 is going to screw over my free time... :(


Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Fri Dec 04, 2015 4:55 am 
Offline
advanced

Joined: Tue Dec 24, 2013 2:42 am
Posts: 74
Has thanked: 4 times
Have thanks: 25 times
Ok, figured out why the Opacity wasn't working properly, but not really sure of how to resolve it right now. Some Cryengine material files don't have that value, so I commented it out. I could add it back in, but if it doesn't exist then it'll crash when it runs into those cases. I just need to test for the condition first; if it exists use that value. If it doesn't, use 1.0.

That concludes today's episode of Bug Hunters!


Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Sat Dec 05, 2015 2:57 am 
Offline
advanced

Joined: Tue Dec 24, 2013 2:42 am
Posts: 74
Has thanked: 4 times
Have thanks: 25 times
I think I fixed the Opacity and Shininess bug. Anyone want to test against the Armored Warfare models to make sure it's working properly?

Going to also look at the $LOD models to see if I can skip those. It may be more trouble than it's worth if it screws up the indexing though.

Tested against the Blackhawk. Geometry looks good, but still needs work. Normals messed up.

Blender seemed to be able to read the .dds files here? I haven't converted them back to the old way, so not sure if Blender has been updated to handle the new .dds file formats or if I forgot I converted them. Anyway...

Image


Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Sat Dec 05, 2015 4:32 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Wed Jul 06, 2011 8:47 am
Posts: 346
Location: Russia
Has thanked: 516 times
Have thanks: 159 times
Markemp wrote:
I think I fixed the Opacity and Shininess bug. Anyone want to test against the Armored Warfare models to make sure it's working properly?

Testing 0.83 from first post - didn't convert anything :[

Markemp wrote:
Normals messed up.

Blender seemed to be able to read the .dds files here? I haven't converted them back to the old way, so not sure if Blender has been updated to handle the new .dds file formats or if I forgot I converted them.

Normal maps DDS are in 3Dc format, not DXT1 or DXT5.


Last edited by Andrakann on Mon Dec 07, 2015 3:59 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Sat Dec 05, 2015 5:14 pm 
Offline
advanced

Joined: Tue Dec 24, 2013 2:42 am
Posts: 74
Has thanked: 4 times
Have thanks: 25 times
The mh60_mtl.mtl file (which is created by cgf-converter) seems to be working for me. The Opacity setting is giving the right values.

d is set to 1.0 now instead of 0. I still have to fix the double map_bump entries though. Not sure how I'm going to do that though, since I don't think .obj files can support multiple map_bump. Fortunately I'm working on the collada export now, although that will take a bit longer.

Code:
# Material file output from cgf-converter.exe version 0.8
#
newmtl exterior
Kd 0.3112 0.3112 0.3112
Ks  0.1166 0.1166 0.1166
[b]d 1.0000[/b]
illum 2
map_Kd e:\blender projects\aw\objects/vehicles/mh60_blackhawk/textures/mh60_exterior.dds
map_Ks e:\blender projects\aw\objects/vehicles/mh60_blackhawk/textures/mh60_exterior_spec.dds
map_bump e:\blender projects\aw\objects/vehicles/mh60_blackhawk/textures/mh60_exterior_ddn.dds
map_bump e:\blender projects\aw\textures/detail_bumpmaps/metal/metal_006_detail.dds

newmtl interior
Kd 0.2195 0.2195 0.2195
Ks  0.2195 0.2195 0.2195
[b]d 1.0000[/b]
illum 2
map_Kd e:\blender projects\aw\objects/vehicles/mh60_blackhawk/textures/mh60_interior.dds
map_Ks e:\blender projects\aw\objects/vehicles/mh60_blackhawk/textures/mh60_interior_spec.dds
map_bump e:\blender projects\aw\objects/vehicles/mh60_blackhawk/textures/mh60_interior_ddn.dds
map_bump e:\blender projects\aw\textures/detail_bumpmaps/metal/metal_006_detail.dds


Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Sun Dec 06, 2015 9:27 am 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Wed Jul 06, 2011 8:47 am
Posts: 346
Location: Russia
Has thanked: 516 times
Have thanks: 159 times
Markemp wrote:
The mh60_mtl.mtl file (which is created by cgf-converter) seems to be working for me.

New version didn't create anything for me, nor _mtl.mtl, nor .obj.
Old version does.


Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Sun Dec 06, 2015 3:09 pm 
Offline
advanced

Joined: Tue Dec 24, 2013 2:42 am
Posts: 74
Has thanked: 4 times
Have thanks: 25 times
Oh shit, forgot to mention it. I changed the arguments so you can specify the output format.

-obj: Creates an obj (and related mtl) file
-blend: Creates a Blender file (not yet implemented)
-collada|dae: Creates a Collada file (not yet implemented)
-fbx: Creates an FBX file (not yet implemented)


Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Mon Dec 07, 2015 4:24 pm 
Offline
ultra-veteran
ultra-veteran
User avatar

Joined: Wed Jul 06, 2011 8:47 am
Posts: 346
Location: Russia
Has thanked: 516 times
Have thanks: 159 times
Markemp wrote:
Oh shit, forgot to mention it.

Ok. Now it works :)
Markemp wrote:
Anyone want to test against the Armored Warfare models to make sure it's working properly?

M1A1 Damaged model have a really wrong looking rear wheels:
Image
MH60 looks good, if I manually clean secondary bump map entries in _mtl.mtl:
Image


Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Tue Dec 08, 2015 9:29 am 
Offline
ultra-n00b

Joined: Wed Feb 23, 2011 8:43 am
Posts: 2
Has thanked: 2 times
Have thanks: 1 time
TIP:

The .bat file from the DDSUnsplit Utility can be modified to work w/ this Utility, *.dds.0' becomes *.cgf' and of course DDSUnsplit.exe becomes cgf-converter.exe.

Save the .bat to the location of cgf-converter.exe and away you go.


Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Tue Dec 08, 2015 1:55 pm 
Offline
advanced

Joined: Tue Dec 24, 2013 2:42 am
Posts: 74
Has thanked: 4 times
Have thanks: 25 times
mgtmg wrote:
TIP:

The .bat file from the DDSUnsplit Utility can be modified to work w/ this Utility, *.dds.0' becomes *.cgf' and of course DDSUnsplit.exe becomes cgf-converter.exe.

Save the .bat to the location of cgf-converter.exe and away you go.


I'd love to be able to incorporate these features into the program. It annoys me that Blender can't handle the new dds format natively. :(


Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Thu Dec 10, 2015 5:55 pm 
Offline
advanced

Joined: Tue Dec 24, 2013 2:42 am
Posts: 74
Has thanked: 4 times
Have thanks: 25 times
I put out an updated version of the tool this morning, available in the original post in this thread at the dropbox link. Fixes a bug in reading some mtl files (if the shininess attribute didn't exist in the xml, it crashed) and for some chunk table reads (For some weird reason I had the chunk ID of the scene chunk set to 0xFF, when it doesn't have a chunk ID and I should have just used 0x00.)


Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Fri Dec 11, 2015 9:19 am 
Offline
beginner

Joined: Sun Jan 19, 2014 7:08 pm
Posts: 37
Has thanked: 8 times
Have thanks: 2 times
does this tool also unpack .pak files? or do i need other tools for that?


Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Fri Dec 11, 2015 1:10 pm 
Offline
advanced

Joined: Tue Dec 24, 2013 2:42 am
Posts: 74
Has thanked: 4 times
Have thanks: 25 times
freakshow wrote:
does this tool also unpack .pak files? or do i need other tools for that?


You can use 7zip to unpack the .pak files. Probably winzip too, but not positive about that.


Top
 Profile  
 
 Post subject: Re: Cryengine Export tool (cgf-exporter)
PostPosted: Fri Dec 11, 2015 2:28 pm 
Offline
beginner

Joined: Sun Jan 19, 2014 7:08 pm
Posts: 37
Has thanked: 8 times
Have thanks: 2 times
most are encrypted zip, such as this from the russian moba Panzar : https://mega.nz/#!nIIHlZLA!oa953W57WUmj ... btXhYOnzu0



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 65 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group