NEWME0 / Project-IGI

Tools for modding IGI 2: Covert Strike game
8 stars 3 forks source link

Igi py to visual application #3

Open DotCube1 opened 3 years ago

DotCube1 commented 3 years ago

Hi bro can u explain concept of .mef, .Tex and .spr so that I can make a visual studio application

I analyzed your binary templates excellent work But in .mef I got all coordinates Like xvtm, atta How to pack them in a model

NEWME0 commented 3 years ago

Hi. Binary templates that you found in project are, practicaly, all what i know about these formats. In old version of dconfv (can find it in branch 'backup') i have maked an converter from .tex to .tga - can be useful for you.

Texture formats like .spr and .pic (one format with diferent extensions) also can be converted to .tga, but i'm not shore if i posted util somewhere...

What about .mef, i extracted few simple meshes from this format, using Blender plugin (also can be found in old version). But models with bones (like humans) are imported incoret.

XTVM - stands for magic vertex. I think them are used in animation (like IK points) but i'm not shure. ATTA - stands for attachments. Attachment of other models to 'this' one.

If you want more details - feel free to ask me.

DotCube1 commented 3 years ago

Hi. Binary templates that you found in project are, practicaly, all what i know about these formats. In old version of dconfv (can find it in branch 'backup') i have maked an converter from .tex to .tga - can be useful for you.

Texture formats like .spr and .pic (one format with diferent extensions) also can be converted to .tga, but i'm not shore if i posted util somewhere...

What about .mef, i extracted few simple meshes from this format, using Blender plugin (also can be found in old version). But models with bones (like humans) are imported incoret.

XTVM - stands for magic vertex. I think them are used in animation (like IK points) but i'm not shure. ATTA - stands for attachments. Attachment of other models to 'this' one.

If you want more details - feel free to ask me.

What about terrains I want to export them as 3d models , i found someone had exported them

I don't know about forest.dat files basically and how to open them

There are various file such as olm, tmm,thm Can u try making converter for terrain files

DotCube1 commented 3 years ago

The igi mef importer is cool I have try it but some models cannot be imported correctly

I'm working with a modder

So I found a software for converting sounds of igi you can have a look , maybe you have seen it earlier

The wav2wav converter

It converts the sound file correctly

DotCube1 commented 3 years ago

What about Animations is there any method to play .iff or .bef files or export them to animation format

NEWME0 commented 3 years ago

Terrains We can export them as set of maps like height map, light map and color map. And generate terrain itself in other game engine directly from these maps.

Forest.dat This format is very simple. It contains brushes with trees and bushes. But i doesn't know how to export them because there isn't appropriate format (engine dependent). Internally is just a list of objects. An solution can be to export them into xml or json and then import into game engine manually.

Waw2wav Send me link please. I want to take a look on this util.

Play animations I don't have tried. IMHO until we can't export models with bones there is no reason to try to export animations.

DotCube1 commented 3 years ago

Terrains We can export them as set of maps like height map, light map and color map. And generate terrain itself in other game engine directly from these maps.

Forest.dat This format is very simple. It contains brushes with trees and bushes. But i doesn't know how to export them because there isn't appropriate format (engine dependent). Internally is just a list of objects. An solution can be to export them into xml or json and then import into game engine manually.

Waw2wav Send me link please. I want to take a look on this util.

Play animations I don't have tried. IMHO until we can't export models with bones there is no reason to try to export animations.

How to export these maps please tell it solve maximum problem

I will share the wav2wav in a minute

DotCube1 commented 3 years ago

Terrains We can export them as set of maps like height map, light map and color map. And generate terrain itself in other game engine directly from these maps.

Forest.dat This format is very simple. It contains brushes with trees and bushes. But i doesn't know how to export them because there isn't appropriate format (engine dependent). Internally is just a list of objects. An solution can be to export them into xml or json and then import into game engine manually.

Waw2wav Send me link please. I want to take a look on this util.

Play animations I don't have tried. IMHO until we can't export models with bones there is no reason to try to export animations.

Year bro I definitely want to export terrain maps to a game engine called unity I know it and I can generate a terrain from heightmap so tell how can we export it

Here you can check this out I only added GUI to it I don't know who is the real author

Igi 2 iff to bef converter https://www.mediafire.com/file/4fd6p0maef3f6vg/IGI+2+IFF+TO+BEF.7z/file.

Sample .iff animations https://www.mediafire.com/file/sggevt51l41nosz/IGI-2_Animations.zip/file

In this you only have to select igi 2 Animations folder and a output folder It will export them as .bef


And here it is Wav 2 wav converter https://www.mediafire.com/file/zctx0x4p2p8vc9s/iswav2wav.7z/file

I have added some sample igi 2 wav files You can try converting them

I have also added how to use instructions in the wav 2 wav converter

NEWME0 commented 3 years ago

About terrain maps exportes i need few (1-2) days to end this utils. After i will push them to repository.

DotCube1 commented 3 years ago

About terrain maps exportes i need few (1-2) days to end this utils. After i will push them to repository.

Ok bro reply this comment when u have finished maps exporters

NEWME0 commented 3 years ago

Hi. I'm about to finish console utils for thm, tlm and tmm files. Changes are pushed to branch master. Pull project from master Execute command python -m pip install -r requirements.txt And run utils with python -m igipy thm --help

DotCube1 commented 3 years ago

Hi. I'm about to finish console utils for thm, tlm and tmm files. Changes are pushed to branch master. Pull project from master Execute command python -m pip install -r requirements.txt And run utils with python -m igipy thm --help

Is it finished can I try

DotCube1 commented 3 years ago

Hi. I'm about to finish console utils for thm, tlm and tmm files. Changes are pushed to branch master. Pull project from master Execute command python -m pip install -r requirements.txt And run utils with python -m igipy thm --help

Nice thm to PNG Tmm to PNG Tlm to works

Just I will import into game engine and let you know

DotCube1 commented 3 years ago

Hi. I'm about to finish console utils for thm, tlm and tmm files. Changes are pushed to branch master. Pull project from master Execute command python -m pip install -r requirements.txt And run utils with python -m igipy thm --help

Um bro which one is correct I kinda don't know Hieghtmap of first level igi 2 Screenshot (59) Screenshot (63)

DotCube1 commented 3 years ago

And I don't know how to add terrain lightmap and terrain material map

DotCube1 commented 3 years ago

these are extracted from the first level Screenshot (64) Screenshot (67) Screenshot (65) Screenshot (68)

DotCube1 commented 3 years ago

Bro people are saying this is incorrect I don't know if this heightmap is wrong or terrain generation is wrong

Have you tried generating a terrain with the heightmap?

images (9)

There are mountain edges but in generating terrain hieghtmap no edges are generated

DotCube1 commented 3 years ago

Screenshot (66) I think the concept is correct the black part represents the depression where the main buildings and game takes place And the white part represents the mountain around it

But in generating terrain it incorrectly generates

This is also the pic of level 1 2nd hieghtmap Screenshot (64) I think it represents the space for the river

And TLM converter doesn't work And in level 2 of igi 2 location 1 terrain hieghtmap PNG is blank So the converter needs to be modified

NEWME0 commented 3 years ago

About THM Data in this format are an Float32 array of size 256x256 which can have positive and negative values. I tried to normalize these data and transform into array of UInt8 256x256 (grayscale image). To do this i scaled down raw data to range 0 - 255, what is huge dataloss. If you know some method to export bidimensional array of Float32 into image without data loss, please tell me.

And here is what i got. heightmap002 thm lod0

About TMM This data format is an Terrain texture blending map.

On left side is blending map, on right - generated terrain material. image

About TLM In fact is not an normal lightmap. It is some kind of lighting map - with color. Converter doesn't work? Show please traceback or text me what does'n work.

P.S: IGI2: Location1 - Level2 - is an underground level. It doesn't have terrain, level is builded using static models as ground and walls.

DotCube1 commented 3 years ago

About THM Data in this format are an Float32 array of size 256x256 which can have positive and negative values. I tried to normalize these data and transform into array of UInt8 256x256 (grayscale image). To do this i scaled down raw data to range 0 - 255, what is huge dataloss. If you know some method to export bidimensional array of Float32 into image without data loss, please tell me.

And here is what i got. heightmap002 thm lod0

About TMM This data format is an Terrain texture blending map.

On left side is blending map, on right - generated terrain material. image

About TLM In fact is not an normal lightmap. It is some kind of lighting map - with color. Converter doesn't work? Show please traceback or text me what does'n work.

P.S: IGI2: Location1 - Level2 - is an underground level. It doesn't have terrain, level is builded using static models as ground and walls.

Hi bro how did u generate gray-scale map with full heightmap features on seeing and analysing it we can see that it is mostly correct

In my case you can see it is kind of error only generating a black part of image

How can I get terrain material map like you Can u push the changes you made to the repository So that I can get correct results

Bidimensional array of float 32 to image I don't know about much binary files but u should use pil and numpy which can convert the array into image

Please also tell how can I get correct terrain heightmap and correct terrain material map

NEWME0 commented 3 years ago

Changes are already pushed

NEWME0 commented 3 years ago

Hi. I added two more exporters for thm files, thm to_tif (32 bit floating point pixel) thm to_npy (serialized numpy array) Also added option normalize on to_png command (scale down floating point array to simple grayscale).

Obtain terrain texture In level/textures folder you can find terrain textures in rgb mode. Screenshot_1

All these textures RGB should be included in terrain material. And alpha of them should be get from tmm. Red color on tmm texture means that texture assigned to red channel on this place have alpha 255. All othes textures on this place has alpha 0. Well you need to assign to each color on tmm texture an RGB texture from level/textures.

DotCube1 commented 3 years ago

Hi. I added two more exporters for thm files, thm to_tif (32 bit floating point pixel) thm to_npy (serialized numpy array) Also added option normalize on to_png command (scale down floating point array to simple grayscale).

Obtain terrain texture In level/textures folder you can find terrain textures in rgb mode. Screenshot_1

All these textures RGB should be included in terrain material. And alpha of them should be get from tmm. Red color on tmm texture means that texture assigned to red channel on this place have alpha 255. All othes textures on this place has alpha 0. Well you need to assign to each color on tmm texture an RGB texture from level/textures.

Yes the hieghtmap is working now Terrain generates correctly Screenshot (70)

DotCube1 commented 3 years ago

My

Hi. I added two more exporters for thm files, thm to_tif (32 bit floating point pixel) thm to_npy (serialized numpy array) Also added option normalize on to_png command (scale down floating point array to simple grayscale).

Obtain terrain texture In level/textures folder you can find terrain textures in rgb mode. Screenshot_1

All these textures RGB should be included in terrain material. And alpha of them should be get from tmm. Red color on tmm texture means that texture assigned to red channel on this place have alpha 255. All othes textures on this place has alpha 0. Well you need to assign to each color on tmm texture an RGB texture from level/textures.

My friend is making a mef program which can almost do everything with mef

Do u want to have a look?

NEWME0 commented 3 years ago

Yes. Shore. I now working on exporters of other texture formats like .spr, .pic .tex and .olm. In near future i will push forest.dat exporter into xml. May be after all this i will take a look at animations.

DotCube1 commented 3 years ago

Yes. Shore. I now working on exporters of other texture formats like .spr, .pic .tex and .olm. In near future i will push forest.dat exporter into xml. May be after all this i will take a look at animations.

Yeah sure you can download this file Unrar it you will get decrypted models that you can view in notepad and analyze it

It also contains instructions how to convert binary mef to gconv format

https://www.mediafire.com/file/ubtbq3u39agtu0l/Models_%28MEF%29.7z/file

DotCube1 commented 3 years ago

Yes. Shore. I now working on exporters of other texture formats like .spr, .pic .tex and .olm. In near future i will push forest.dat exporter into xml. May be after all this i will take a look at animations.

I have already given u a GUI converter for iff to bef files And a plugin is being written to import the bef animations to .xaf (3ds max animation format)

DotCube1 commented 3 years ago

Here you can try the application it is easy as abc just input the anims folder and a output folder https://www.mediafire.com/file/4fd6p0maef3f6vg/IGI+2+IFF+TO+BEF.7z/file

Some igi 2 iff samples https://www.mediafire.com/file/sggevt51l41nosz/IGI-2_Animations.zip/file

And also you must try the wav2wav converter I included how to use it

DotCube1 commented 3 years ago

My

Hi. I added two more exporters for thm files, thm to_tif (32 bit floating point pixel) thm to_npy (serialized numpy array) Also added option normalize on to_png command (scale down floating point array to simple grayscale). Obtain terrain texture In level/textures folder you can find terrain textures in rgb mode. Screenshot_1 All these textures RGB should be included in terrain material. And alpha of them should be get from tmm. Red color on tmm texture means that texture assigned to red channel on this place have alpha 255. All othes textures on this place has alpha 0. Well you need to assign to each color on tmm texture an RGB texture from level/textures.

My friend is making a mef program which can almost do everything with mef

  • convert it to gconv mef format (readable)
  • extract magic verticies -extract other coordinates like faces, edges

Do u want to have a look?

Yeah now problem in .fnt This is a simple format but I cannot write a program to export it Explain some points so that I can generate a font file

DotCube1 commented 3 years ago

About THM Data in this format are an Float32 array of size 256x256 which can have positive and negative values. I tried to normalize these data and transform into array of UInt8 256x256 (grayscale image). To do this i scaled down raw data to range 0 - 255, what is huge dataloss. If you know some method to export bidimensional array of Float32 into image without data loss, please tell me. And here is what i got. heightmap002 thm lod0 About TMM This data format is an Terrain texture blending map. On left side is blending map, on right - generated terrain material. image About TLM In fact is not an normal lightmap. It is some kind of lighting map - with color. Converter doesn't work? Show please traceback or text me what does'n work. P.S: IGI2: Location1 - Level2 - is an underground level. It doesn't have terrain, level is builded using static models as ground and walls.

Hi bro how did u generate gray-scale map with full heightmap features on seeing and analysing it we can see that it is mostly correct

In my case you can see it is kind of error only generating a black part of image

How can I get terrain material map like you Can u push the changes you made to the repository So that I can get correct results

Bidimensional array of float 32 to image I don't know about much binary files but u should use pil and numpy which can convert the array into image

Please also tell how can I get correct terrain heightmap and correct terrain material map

Now there's a problem with TMM file The PNG image is some what like previous which I don't know how to use

DotCube1 commented 3 years ago

@NEWME0 Screenshot (68) Is it correct tmm

NEWME0 commented 3 years ago

Hi. Take a look at this article. https://tech.innogames.com/terrain-shader-in-unity/ I think it can help you to understand role of TMM files.

DotCube1 commented 3 years ago

Hi. Take a look at this article. https://tech.innogames.com/terrain-shader-in-unity/ I think it can help you to understand role of TMM files.

Ok thanks understood Can u write a small script to create and extract .Res archive ? I see it is like a archive but cannot extract it

DotCube1 commented 3 years ago

@NEWME0 needed help for .Res archive

NEWME0 commented 3 years ago

Res archive can be extracted using legacy tool - gconv. Find in 'third party tools/gconv/examples/' folder extract_resource. Look into bat and qsc scripts how to extract concrete resource. Paste resource file into gconv/temp folder, in qsc edit resource path and run bat script to execute.

DotCube1 commented 3 years ago

Res archive can be extracted using legacy tool - gconv. Find in 'third party tools/gconv/examples/' folder extract_resource. Look into bat and qsc scripts how to extract concrete resource. Paste resource file into gconv/temp folder, in qsc edit resource path and run bat script to execute.

The forest exporter is not working fix it soon ..

I could not run the fst exporter by following command

python -m igipy.fst --export all E:\igi\pc Desktop

NEWME0 commented 3 years ago

Hi. You can always run python -m igipy fst --help. Anyway, forest exporter work on command python -m igipy fst to_xml "<source_dir>" "<target_dir>"

DotCube1 commented 3 years ago

Hi. You can always run python -m igipy fst --help. Anyway, forest exporter work on command python -m igipy fst to_xml "<source_dir>" "<target_dir>"

I tried the to_xml command about a week ago It didn't work because I didn't put the double quotes 😂

Now it is working fine ..

DotCube1 commented 3 years ago

@NEWME0 take a look at this util it converts binary animation files to readable animation files And we can edit it and convert it back to igi 2 using gconv.exe

Here iff conv :https://www.mediafire.com/file/h486hl4bnzj2kxz/iff+conv.zip/file

Command : there are 2 commands 1- decompile 2- convert

Converter converts to .bef file which is recognised by gconv.exe

Convert command python dconv iff convert 'source dir' 'output dir'

Decompile command python dconv iff decompile 'source dir' 'output dir'

And include it in the main GitHub project :)

DotCube1 commented 3 years ago

Hi now terrain is generated perfectly with the custom material IMG_20210818_203800

Calculated light maps in 5 minutes

DotCube1 commented 3 years ago

@NEWME0 do you know about graph and graphcover file I have reversed all these files Res, tex, spr, fnt

DotCube1 commented 3 years ago

And how can I get this texture images (72)

ProjectIGIRemakeTeam commented 2 years ago

Hi. I added two more exporters for thm files, thm to_tif (32 bit floating point pixel) thm to_npy (serialized numpy array) Also added option normalize on to_png command (scale down floating point array to simple grayscale). Obtain terrain texture In level/textures folder you can find terrain textures in rgb mode. Screenshot_1 All these textures RGB should be included in terrain material. And alpha of them should be get from tmm. Red color on tmm texture means that texture assigned to red channel on this place have alpha 255. All othes textures on this place has alpha 0. Well you need to assign to each color on tmm texture an RGB texture from level/textures.

Yes the hieghtmap is working now Terrain generates correctly Screenshot (70)

Yo bro! How did you manage to get these?