Important information: this site is currently scheduled to go offline indefinitely by end of the year.
R2 Online models
Re: R2 Online models
Here's the correct goblin thingy from a few posts back. I had an error with loading the texture that was flipping the image. I noticed it on the in game image of the girl and found that I didin't need to flip it.
You do not have the required permissions to view the files attached to this post.
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: R2 Online models
That looks much better you are doing a great job and a great speed also
If you want any more models i will post some for you and in game screens if needed.
If you want any more models i will post some for you and in game screens if needed.
Re: R2 Online models
Thanks! I always thought these models were really nice looking. But I have all the 'character' models and textures extracted so I can view/test them all easily now; well except at work.chrrox wrote:That looks much better you are doing a great job and a great speed also
If you want any more models i will post some for you and in game screens if needed.
I also got alpha textures working so they'll look a bit nicer now.
-
- ultra-veteran
- Posts: 423
- Joined: Mon Aug 11, 2008 11:30 pm
- Has thanked: 27 times
- Been thanked: 15 times
-
- ultra-veteran
- Posts: 423
- Joined: Mon Aug 11, 2008 11:30 pm
- Has thanked: 27 times
- Been thanked: 15 times
Re: R2 Online models
I am updating this thread all the time, waiting for more info. A real cliffhanger R2 has very beautiful models. Hope to get models and animations later on to analyze them totally
Re: R2 Online models
Ya, sorry I haven't been able to update it recently. I did try to play around with what I believe is the bone data for the model. By default, as many 3d models are, the given vertex data is in a standard pose; in the case of R2, they are in a standing with their arms slightly fanned out from the side. However my attempt was not successful and it really messed up the model lol.
So if anyone has any good links to any kind of helpful info please let me know. I will also update the model format for the "rmb" files. I'd say it's about 85% complete with the last 15% in the "I have no idea" or "I think it's formatted like this" category. So expect this sometime this weekend.
I will also release the code I have for viewing the models that I posted. It's built in C# (though it should be easily ported to C++ or other languages) and runs using OpenGL for it's graphics using sample code from NeHe Productions (http://nehe.gamedev.net/ which is a great site).
Hoping to have this by Saturday.
So if anyone has any good links to any kind of helpful info please let me know. I will also update the model format for the "rmb" files. I'd say it's about 85% complete with the last 15% in the "I have no idea" or "I think it's formatted like this" category. So expect this sometime this weekend.
I will also release the code I have for viewing the models that I posted. It's built in C# (though it should be easily ported to C++ or other languages) and runs using OpenGL for it's graphics using sample code from NeHe Productions (http://nehe.gamedev.net/ which is a great site).
Hoping to have this by Saturday.
Re: R2 Online models
Note that this applies to only RMB files.
That's basically it...rather messy I know but it's enough to display/render the mesh in it's default pose. When reading the mesh data it's laid out like so:
positional data (3 floats x,y,z)
vertex normal data (3 floats nx,ny,nz)
texture coords (2 floats u,v)
unknown data (3 floats)
unknown data (3 floats)
*It's possible that this could be some kind of translational or rotational values.
if (extraFlag == 1)
bone weight data (4 floats x,y,z,w)
bone matrix data (4 WORD values)
end if
I'm off to do some rock climbing so I will post my source later today.
Code: Select all
DWORD itemFlag;
DWORD unknown[4];
DWORD textureCount;
DWORD meshCount;
DWORD boneCount;
DWORD dataOffset;
struct string {
char filename[260];
} textures [textureCount];
struct mesh {
DWORD index; // 0?
DWORD unknown1; // -1?
char meshName[64]; / name of mesh
char parent[64]; // name of parent bone
DWORD extraFlag;
DWORD unknown2; // 1?
DWORD vertexCount; // number of vertices
DWORD indexCount; // number of indices
//no idea what the next 2000 bytes are, so just skip it, sure it's relevant somehow...
byte data[2000];
} meshes[meshCount];
// next area is the bone information which I left I work...though it's still mostly incomplete, will add this in tomorrow
// for now, can skip to the dataOffset location
struct meshData {
floatx3 pos[meshes[index].vertexCount];
floatx3 nomral[meshes[index].vertexCount];
floatx2 uv[meshes[index].vertexCount];
floatx3 unknown1[meshes[index].vertexCount];
floatx3 unknown2[meshes[index].vertexCount];
if (mesh[index].extraFlag == 1) {
floatx4 boneWeights[meshes[index].vertexCount];
WORDx4 boneMatrixIndex[meshes[index].vertexCount];
}
WORD indices[meshes[index].indexCount];
} meshData[meshCount];
That's basically it...rather messy I know but it's enough to display/render the mesh in it's default pose. When reading the mesh data it's laid out like so:
positional data (3 floats x,y,z)
vertex normal data (3 floats nx,ny,nz)
texture coords (2 floats u,v)
unknown data (3 floats)
unknown data (3 floats)
*It's possible that this could be some kind of translational or rotational values.
if (extraFlag == 1)
bone weight data (4 floats x,y,z,w)
bone matrix data (4 WORD values)
end if
I'm off to do some rock climbing so I will post my source later today.
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: R2 Online models
OK! Here's the C# project I've been using to render the loaded meshes. It's fairly simple to use. It runs on OpenGL so make sure you have that which most should. The project is a Visual Visual C# Express 2008 (express editions are free to download from Microsoft's website) project but can/should be easily converted to different languages/versions.
The majority of the code is in the TestGL.cs file and the important methods are:
readRMB (loads the rmb file)
loadImage (loads the dds files and generates the OpenGL textures for them)
loaded (called when the form is done loading, which is after the rmb file is loaded, so that it knows when to load the textures)
OnPaint (does the rendering)
the "readRMB" method has the filename hard coded into it like so:
This line just points to the location of the extracted rmb files
And it assumes that the extracted textures are located a directory inside this folder and is named "texture"
So the full path to the rmb file would be as such:
And the texture folder would be:
Not very elegant but it works. Ideally the code should work smarter but I just kept it like this because I was lazy and it was easy
If anyone wishes to expand on what I got and make the animations/skinning work, by all means do so. I have limited knowledge on that subject but I'm gonna research it a bit more and update if necessary.
The majority of the code is in the TestGL.cs file and the important methods are:
readRMB (loads the rmb file)
loadImage (loads the dds files and generates the OpenGL textures for them)
loaded (called when the form is done loading, which is after the rmb file is loaded, so that it knows when to load the textures)
OnPaint (does the rendering)
the "readRMB" method has the filename hard coded into it like so:
Code: Select all
const string path = "C:\\models\\";
private void readRMB() {
string meshFile = path + "p070000.rmb";
...
}
Code: Select all
const string path = "C:\\models\\";
So the full path to the rmb file would be as such:
Code: Select all
C:\\models\\p070000.rmb
Code: Select all
C:\\models\\texture\\
If anyone wishes to expand on what I got and make the animations/skinning work, by all means do so. I have limited knowledge on that subject but I'm gonna research it a bit more and update if necessary.
You do not have the required permissions to view the files attached to this post.
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: R2 Online models
Very nice work works great. I will try to implement a drag and drop method for loading the files and if i can figure it out hopefully a way to control the camera with the mouse.
Last edited by chrrox on Mon Feb 16, 2009 11:50 pm, edited 1 time in total.
-
- ultra-veteran
- Posts: 423
- Joined: Mon Aug 11, 2008 11:30 pm
- Has thanked: 27 times
- Been thanked: 15 times
Re: R2 Online models
great work! Alot of thumbs up and star ratings for you. Let's hope someone with skills can pick this up and expand
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: R2 Online models
I found a c# tutorial for loading animations from milk shape 3d files which could be applied here as it is just a different file format.
http://www.sichbo.ca/Free_Code/Milkshap ... and_OpenGL
I almost got drag and drop working but it does not load the textures ill figure it out.
edit "doh i think I will get this working soon i am a fool lol"
http://www.sichbo.ca/Free_Code/Milkshap ... and_OpenGL
I almost got drag and drop working but it does not load the textures ill figure it out.
edit "doh i think I will get this working soon i am a fool lol"
-
- ultra-veteran
- Posts: 467
- Joined: Thu Dec 07, 2006 11:25 pm
- Has thanked: 9 times
- Been thanked: 95 times
Re: R2 Online models
Today I released the 3D Object Converter v4.221 update at 17:10.
You can update your installed application (version>=4.0) quickly and easily using the auto-update function (Help/Check for updates).
My program currently supports 8 different uncompressed types of the DirectDraw Surface *.dds texture format. The R2: Reign of Revolution uses the compressed .dds format.
When I wrote and tested my .rmb loader module I used the following procedure to get the texture shaded view (in my program):
- Convert the .dds files into .jpg files using the Irfanview's batch converter module.
- Run the 3D O.C.
- Check out the Options/Import/Default texture file extension (.jpg)
- Turn on the 'Options/Import/Set the default texture file extension in the material table after load'
(This will replace the .dds file extension to .jpg automatically after load your object)
(Or you can use the 'Tools/Set the default texture file extension in the material table after every load if you would like...)
- Save settings.
- Apply settings.
- Load the .rmb file.
http://web.t-online.hu/karpo
You can update your installed application (version>=4.0) quickly and easily using the auto-update function (Help/Check for updates).
My program currently supports 8 different uncompressed types of the DirectDraw Surface *.dds texture format. The R2: Reign of Revolution uses the compressed .dds format.
When I wrote and tested my .rmb loader module I used the following procedure to get the texture shaded view (in my program):
- Convert the .dds files into .jpg files using the Irfanview's batch converter module.
- Run the 3D O.C.
- Check out the Options/Import/Default texture file extension (.jpg)
- Turn on the 'Options/Import/Set the default texture file extension in the material table after load'
(This will replace the .dds file extension to .jpg automatically after load your object)
(Or you can use the 'Tools/Set the default texture file extension in the material table after every load if you would like...)
- Save settings.
- Apply settings.
- Load the .rmb file.
http://web.t-online.hu/karpo