Important information: this site is currently scheduled to go offline indefinitely by end of the year.

R2 Online models

Post questions about game models here, or help out others!
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: R2 Online models

Post by chrrox »

I added the keys e, d , r, f to add more movement freedom.
I am going to work on mouse movement I feel I am close to getting it down.
I am also trying out some ideas for menu selection in another form to set the directory
then get lists of all the models and separate them into categories based on names ex head parts, npc, items.
You do not have the required permissions to view the files attached to this post.
Theran
beginner
Posts: 37
Joined: Wed Jun 11, 2008 6:49 pm
Been thanked: 4 times

Re: R2 Online models

Post by Theran »

Made some progress with the r3m files loaded in the Objects.rfs (static objects) file.

Most share a common name, w1_monster_001.r3m, w1_monster_002.r3m, ..., w1_monster_006.r3m, which make up complete model. So far, having good luck with getting them to view properly. Each r3m file can contain a number of sub objects in them, usually 1 object per texture. So a complete model consists of multiple r3m files (meshes), each with a multiple number of sub objects (1 per texture?).

I haven't gotten the textures to work just yet, but I'll try to get that in the next day or so. So for now, here's a screen shot of what I got:

Model uses the following files:
R1_OB_bridge_rargon_01.r3m
R1_OB_bridge_rargon_02.r3m
R1_OB_bridge_rargon_03.r3m
R1_OB_bridge_rargon_04.r3m
R1_OB_bridge_rargon_05.r3m
You do not have the required permissions to view the files attached to this post.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: R2 Online models

Post by chrrox »

Very nice work on the static meshes.
Do you know of any open source obj exporters out there i can try to add that export option if I can find an example.
Theran
beginner
Posts: 37
Joined: Wed Jun 11, 2008 6:49 pm
Been thanked: 4 times

Re: R2 Online models

Post by Theran »

chrrox wrote:Do you know of any open source obj exporters out there i can try to add that export option if I can find an example.
No I do not, but this site has the basic structure for OBJ files:
http://www.fileformat.info/format/wavefrontobj/egff.htm
pixellegolas
ultra-veteran
ultra-veteran
Posts: 423
Joined: Mon Aug 11, 2008 11:30 pm
Has thanked: 27 times
Been thanked: 15 times

Re: R2 Online models

Post by pixellegolas »

this is getting really interesting! just hoping for animation and all that glory too :)
Theran
beginner
Posts: 37
Joined: Wed Jun 11, 2008 6:49 pm
Been thanked: 4 times

Re: R2 Online models

Post by Theran »

Got textures working, it's looking pretty good!
You do not have the required permissions to view the files attached to this post.
pixellegolas
ultra-veteran
ultra-veteran
Posts: 423
Joined: Mon Aug 11, 2008 11:30 pm
Has thanked: 27 times
Been thanked: 15 times

Re: R2 Online models

Post by pixellegolas »

it sure does :) Is it also specular and such?
Theran
beginner
Posts: 37
Joined: Wed Jun 11, 2008 6:49 pm
Been thanked: 4 times

Re: R2 Online models

Post by Theran »

pixellegolas wrote:it sure does :) Is it also specular and such?
Maybe? lol :lol:

I'm still learning the basics of doing lighting and such with OpenGL. Currently it does ambient and diffuse lighting, but that's about it. Though I believe you're referring to specular textures ya? If so, I believe for this particular model, all the textures are normal kind (sorry if that doesn't make sense, I'm still learning the lingo).
pixellegolas
ultra-veteran
ultra-veteran
Posts: 423
Joined: Mon Aug 11, 2008 11:30 pm
Has thanked: 27 times
Been thanked: 15 times

Re: R2 Online models

Post by pixellegolas »

most models are like this:

Diffuse map: the normal map that you refer to. It is the models texture to give it color

Normal map: Is like a bump-map that makes certain parts stick out or in to add detail without actually adding polygons. Used in example gears of war alot

Specular map: Special map that tells the engine where to add specularity when a light hits the surface. Instead of using a engine specific specularity all over a model you decide how the specularity will look on a model.

If you have a model that has clothes on like jeans you don't want the jeans to reflect like it would be metal, but you want the belt to, then you add specularity to belt only

Glow map: Makes certain areas of model glow. If you have helmet and want to make visor glow, you add a map where you only add color where visor is, that area will glow

These are the most used ones
Theran
beginner
Posts: 37
Joined: Wed Jun 11, 2008 6:49 pm
Been thanked: 4 times

Re: R2 Online models

Post by Theran »

Ah, then no, it only uses diffuse maps. Got a bit of work to do today but I'm adding in some options for changing the lighting of the model (giving it diffuse, ambient, specular, shininess properties) to make it look more real like. So I'll get that done by tonight. So by this weekend I'll release another app for just r3m files as well as the overall format of the file which is about 80% done.

Think I only need to check the rfs files for any kind of XML format so I can tell which files to load for a specific model, the one pictured is a combination of 5 r3m files. I know the rmb files had something similar so I'm hoping these do as well.
Theran
beginner
Posts: 37
Joined: Wed Jun 11, 2008 6:49 pm
Been thanked: 4 times

Re: R2 Online models

Post by Theran »

So I totally forgot I had to go out of town this weekend so I wasn't able to upload any files but I'm back today and I bring files!

Sample was built using Microsoft Visual C# 2008 Express Edition and CsGL (http://csgl.sourceforge.net/). You'll need to download the CsGL package and run the batch file to install the necessary files.

As for the format, here's the basic structure:

Code: Select all

dword unk1;
dword nTextureCount; // number of textures used by this model
dword unk2; 
floatx3 max; // bounding box max pos
floatx3 min; // bounding box min pos
// note the source file I updated has these switched for some reason...correct order is max, then min.

string textureNames[nTextureCount]; // array of texture names used by this file, string names are variable length, null terminated.
// some data is contained after the string name but I never found any solid info from it, so I just skipped it, about 50/50 it's either random data or empty data
dword nFlag; // describes the type of model layout, values (271, 1295, 1311)
dword nObjCount; // number of objects in this model, generally nTextureCount = nObjCount
dword nVertexCount; // number of total vertices
dword nIndexCount; number of indices

// meshInfo describes the way how many vertices and indices are used by the current object/texture as well as their offsets
struct meshInfo {
    dword nVertextCount; // number of vertices used
    dword nIndexCount; // number of indices used
    dword nVertexStart; // starting offset for vertices
    dword nIndexStart; // starting offset for indices
} info[nObjCount];

floatx3 pos[nVertexCount];
floatx3 normal[nVertexCount];
dword color[nVertexCount]; // color perhaps? only used when nFlag = 1311
floatx2 uv[nVertexCount];
flaotx2 uv2[nVertexCount]; // second set of uv coords? used when nFlag = 1295 & 1311
floatx3 unk1[nVertexCount];
floatx3 unk2[nVertexCount]; // both unk1 and unk2 are in all layouts, like rmb files, no idea what it represents

short indices[nIndexCount]; // index layout
You do not have the required permissions to view the files attached to this post.
Theran
beginner
Posts: 37
Joined: Wed Jun 11, 2008 6:49 pm
Been thanked: 4 times

Re: R2 Online models

Post by Theran »

Realized I forgot to mention how the app works.

Keys: 1-8, 0 (changes lighting)
Uses the movement keys defined by chrrox with some minor modifications.

Since I've been unable to find any kind of file that lists which files create an entire model, I was simply just coping the ones that had similar names into a directory (defined by 'path' in the application). Likewise, I had all the textures from the Objects.rfs (in the texture/Object folder, defined in 'tpath' in the application).

I choose this since I could easily copy/paste tested files over to a sample directory and the application would just load them all.

Every now and then there will be a file that cannot be loaded, generally has an "_L" or "_light" in the file name, this refers to what I believe is a lighting file (still with r3m extension) and is structured like so:

Code: Select all

dword count; // number of lights
struct light {
    floatx3 pos; // light position
    floatx3 color; // color? diffuse maybe?
    float f1; // float value: ranges from 1-5, power? 
    float f2; // float value: range? attenuation?
    float f3; // float value: range? attenuation? (I think always greater then f2) 
} lights[count];
If anyone can help with this let us know.

I think that explains the application as far as I can tell. I think I got everything now.
jarrro
ultra-n00b
Posts: 5
Joined: Mon Oct 02, 2017 10:30 am

Re: R2 Online models

Post by jarrro »

guys, how do you export the model from .rmb?
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: R2 Online models

Post by Karpati »

jarrro wrote:guys, how do you export the model from .rmb?
One solution is the 3D Object Converter for Windows
http://3doc.i3dconverter.com

Second ones is the i3DConverter (macOS)
http://www.i3dconverter.com


I am using the XNALara Binary .mesh export format as a 'gateway' to transfer the fully textured objects (with Bone information) to the 3D Studio Max.

You can download the Importer/Exporter script from this web page:
http://www.tombraiderforums.com/showthread.php?t=181251


Procedure:
1. First time you must copy the "XnaLara Converter.ms" file into your installed 3D Studio Max Scripts folder.
2. Run your 3D Studio MAX

3. Open your .mgm file with 3D O.C.
4. Export the loaded object as XNALara Binary .mesh format.

5. Run your "XnaLara Converter.ms" script using the MAXScript/Run Script... menuitem.
6. Press the Import button on the XNALara Converter window.
7. Browse the converted .mesh file.
You do not have the required permissions to view the files attached to this post.
Karpati
ultra-veteran
ultra-veteran
Posts: 467
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 95 times

Re: R2 Online models

Post by Karpati »

To avoid the forum message: Cannot add another attachment, 1 is the maximum
You do not have the required permissions to view the files attached to this post.
Post Reply