Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - O01eg

Pages: [1]
1
Q-Gears / Re: Current state.
« on: 2012-03-15 13:18:19 »
Is Xeno part active?

2
Thanks for responding extremely quickly  :).
I cannnot make the one in the [kg_xeno] folder work at all. There are quite a few errors when visual studio c++ 2010 try to compile it.  :-\

The one in the [KursProj_anim_model_editor] had quite a few errors. I have to mannually put in the SDL library, SDL_tft library and the libxml libary. After that visual studio c++ 2010 did "build" the solution and I could run the debug from the visual studio c++ but it all black, i couldn't see anything.  :(
I cann't check it because I don't have MSVS 2010.

Try to compile it with mingw.

3
Did you get any errors? Try to run it from console.

4
Q-Gears / Re: Q-Gears v0.19
« on: 2011-06-20 17:44:32 »
I use Gentoo and I could compile qgears when fix project file. But source code contain such lines which cann't work under Linux:
Code: [Select]
#ifndef _DEBUG
    root->loadPlugin( "RenderSystem_GL.dll" );
#else
    root->loadPlugin( "RenderSystem_GL_d.dll" );
#endif

5
Q-Gears / Re: Q-Gears v0.19
« on: 2011-06-19 16:26:07 »
A Makefile for Linux would be nice. Since I have not dug into the code to see exactly how it all works and links. I have no idea how to get it to compile under Linux, but it is suppose to compile for Linux. Some help would be appreciated.
Q-Gears is broken for linux. It's need to rewrite some sources that use Windows specifics and again and again rewrite project file.

6
It's my another model viewer: http://ompldr.org/vOTBuZg
See README.txt, it require SDL, SDL_ttf and libxml.

7
I have code for extracting gear's model http://ompldr.org/vOHpkdw
models/file0730.anim.bin - dir12/file1.bin; hierarchy
models/file0731.3d.bin - dir19/file0.bin and dir12/file2.bin; model
bb/file098b.bb.bin - dir18/file72.bin; battle background
For extracting files from disk you can use any extractors from this forums.

8
Q-Gears / Re: Fixes for Linux compilation
« on: 2011-06-09 09:01:44 »
It was fix for CodeBlock's project files, ogre plugins (for OpenGL) and they was maked only for Xeno part of source tree.
Also, it actual only for 676 revision.
You can install CodeBlocks, open projects and fix errors, which will be caused by compilation.

9
Q-Gears / Fixes for Linux compilation
« on: 2011-01-21 18:28:54 »
I try to run q-gears under Linux and make some changes in projects and config files for it: http://ompldr.org/vNzNmNA
It's patch for rev 676 but I don't know how to merge changes with Windows projects and it can break Windows compilation.

10
Nice.
Which version of pyopengl you use? When I press "N" I got:
Quote
Traceback (most recent call last):
  File "model.py", line 1057, in <module>
    main(*sys.argv[1:])
  File "model.py", line 984, in main
    object.draw_normals = not object.draw_normals
AttributeError: OpenGLObject instance has no attribute 'draw_normals'

11
Q-Gears / Re: Why repository weigh so much?
« on: 2010-06-12 09:00:15 »
I don't find any exclude options for svn checkout and update.
Isn't better to store them in tags/ or branch/ outside of trunk/?

12
Q-Gears / Why repository weigh so much?
« on: 2010-06-12 06:06:47 »
Is it nessesary to store compiled files in trunk/output/, archives of old version in trunk/media/ and doubles of .dll in repository?


13
Thanks for your work with Xenogears, Akari. It's my coursework based on your code:
http://www.mediafire.com/?sharekey=1895602d1e3e55a8d2db6fb9a8902bda
WASD and arrows - camera
L - light
Space, "<", ">" - mech

14
That looks great!
It'll look greater when I'll apply alpha channel and remove invisible blocks, but information about this is in unknown parts of animation files.

15
I simply copied your code for load textures and texture coordinates and got rigth model.
Also I read "1st Animation" and can make model:

How to get number of animations? Is it Uint32 by offset 0x0?
And does only "1st Animation" start with "Animation Format" block?

16
I upload some files what I got when read 3d model. There are file, textures, CLUT and output of my program:
http://bin.mypage.sk/FILES/Chu-Chu.7z - sector 0x3ae5d, length 47032 bytes
http://bin.mypage.sk/FILES/AnyMech.7z - sector 0x3af98, length 56664 bytes

17
I'm not fully understand converting textures but found ModelUtilites::Gen256x256Tex and ModelUtilites::Gen8bppTex. Also, how to read description block? When I read each 4 bytes for mesh (except with 0x25 and 0x2D id) I got that some triangles had description for quads and some quads had description for triangles. Does id 0x25 and 0x2D really store in 7-0 bits of Uint32 or store in 31-24 bits as other ids?

18
{SVN Q-gears}/trunk/src/xeno/filetypes/model/TextureFile.cpp:
Code: [Select]
void
TextureFile::GetSurfaces(Surface* pClut, Surface* pVram)
{
    TextureHeader* texture_header = (TextureHeader*)(mpBuffer);

    // palette
    if (texture_header->id == 0x00001101)
    {
        u16 vram_x = texture_header->vram_x + texture_header->move_x;
        u16 vram_y = texture_header->vram_y + texture_header->move_y;

        for (int y = vram_y; y < vram_y + texture_header->height; ++y)
        {
            for (int x = vram_x; x < vram_x + texture_header->width; ++x)
            {
                u16 src1 = GetU16LE(0x10 + (x - vram_x) * 0x02 + (y - vram_y) * texture_header->width * 0x02);

                *(pClut->pixels + x * 4 + pClut->width * 4 * y + 0) = ((src1      ) & 31) * 255 / 31;
                *(pClut->pixels + x * 4 + pClut->width * 4 * y + 1) = ((src1 >>  5) & 31) * 255 / 31;
                *(pClut->pixels + x * 4 + pClut->width * 4 * y + 2) = ((src1 >> 10) & 31) * 255 / 31;
                // set alpha only for first entry in clut if byte is set or all zero
                *(pClut->pixels + x * 4 + pClut->width * 4 * y + 3) = (x == vram_x && (src1 & 0x8000) || (src1 == 0)) ? 0 : 255;
            }
        }
    }

    // textures
    else if (texture_header->id == 0x00001100)
    {
        u16 vram_x = texture_header->vram_x + texture_header->move_x;
        u16 vram_y = texture_header->vram_y + texture_header->move_y;

        for (int y = vram_y; y < vram_y + texture_header->height; y++)
        {
            for (int x = vram_x * 2; x < vram_x * 2 + texture_header->width * 2; x++)
            {
                *(pVram->pixels + x + pVram->width * 4 * y) = GetU8(0x10 + (x - vram_x * 2) + (y - vram_y) * texture_header->width * 2);
            }
        }
    }
}
And for Surface::pixels you create array of heigth*width*4 size, I understood that you use 32bpp. I clearly see converting to 32bpp in CLUT's part of code.

19
It depends on bpp (bits per pixel). Width of VRAM is 512 in case of 16bpp. Xenogears as I remember mostly use 4bpp so it gives you 2048 pixel width.
Is 4bpp texture use CLUT such pallete? But CLUT have 128 colors (more then 16, which can be address by 4 bits) and you store texures in 32bpp class Surface without converting.

20
I can draw structure of model, but had some problem with texture and hierarcy.
Hierarcy data's length is not divide by 4 without remainder for some files. Also, some textures have bigger size that vram.
http://bin.mypage.sk/FILES/chu-chu.7z
There are some files, which I got from Chu-Chu model (28st file in dir19, sector 0x3ae5d, length 47032). Is X position of textures in vram can be 832 when width of vram is 512?
It's some blocks of model:


21
For dstLen I use size of buffer for uncompessed data and return oofs to know size of uncompressed file.
I did not attentively look at the received data: 3d models don't keep commpressed and files in dir19 look like 3d models are pack with 4 parts.

22
Where can I get dstLen? First 4 bytes of blocks don't mean uncompressed size.

23
I read FS as described in Xeno-gears.htm, found some packs with 5 files, but cannot neither unpack them such LZS nor use them directly.

Pages: [1]