Here's a quick tutorial if you want to learn how to do the RPK loading order for your mesh.

Things you will need -;

* -; tex file with your loading order
* -; rpk/rdb converter
* -; textures
* -; some time to get it in your head ;)

So you've exported your mesh, SCX format, you've got two files after export, lets call your model/export "mesh01"

here's what you should have after export -;

mesh01.scx
mesh01.tex

the SCX file is your actual model/mesh, the TEX file is a little file that contains the loading order, and order is self explanatory no? but if it isn't lets play with the below example -;

texture01.png
texture02.png
texture03.png

this will pretty much be the content if your .TEX file, of course different names, formats.

now the order of the textures cannot be changed so 1,2,3 need to be added to the RPK in the same order 1,2,3 if you change it around the game will work but the textures won't look right.

so the above is your loading order, which is what you need to get into the RPK and tell the game that this is how you will need to load and order the textures.

Lets start with step one, and I'm assuming here that you have your textures defined in the RPK already, if not read the other tutorial to find out how to define your textures.

Step -;

Your TEX file is ready and open in the notepad, RDB file is ready and open in notepad, you have your CFG done and ready, your javas are renamed etc.

e.g. CFG file -;

# Vehicle importer wizard generated part configuration file #
# resource ID of this part: 0x0000010F
# resource alias of this part: "F bumper"

render 0x0000008C
mesh 0x0000008D
texture 0x00020024
click 0x0000013A

body 0.009 0.050 0.104 0.000 0.000 0.000 7.500 cars\racers\BMW_E92_data\meshes\_phys_F_bumper_CR.scx ;0x0000000A
# total mass: 30.000 kg

category 2

slot 0.000 0.000 0.000 0.000 0.000 0.000 3 ; F_bumper
attach 0x00000006 3 ; chassis->F_bumper
attach 0x00000157 3 ; cabrio chassis->F_bumper

# 'F bumper' deflector #
wing 4 0.000000000 0.023916600 -0.168102000 0.000000000 0.149395000 -0.679159000 9.930285000 -0.250 0.666

# 'F bumper bal oldala' deflector #
wing 4 -0.770557000 0.079618500 -0.018547700 -0.821342000 0.064596500 -0.289671000 3.531180000 -0.250 0.666

# 'F bumper jobb oldala' deflector #
wing 4 0.770557000 0.079618500 -0.018547700 0.821342000 0.064596500 -0.289671000 3.531180000 -0.250 0.666

eof

now in the above config the important bit for loading order is the "mesh" this is where the loading order happens in the RPK, now copy that ID from your CFG and search for it in the RPK, first result you will probably find something along the lines -;

<FILE 00000204.res >
typeof 5
superid 0x00000003
typeid 0x0000008D
alias F
isparentcompatible 1.00
</FILE>
<FILE 00000204.rsd >
sourcefile cars\racers\BMW_E92_data\meshes\F_bumper.scx
</FILE>


we don't actually need this bit, search again for the same ID, it is lower down the RPK..


this is what we're looking for -;

<FILE 00000360.res >
typeof 14
superid 0x00000005
typeid 0x0000008C
alias F
isparentcompatible 1.00
</FILE>
<FILE 00000360.rsd >
mesh 0x0000008D
flags 8.000
lod_amp 3.000
shd_center 0.000 0.000 0.000
shd_diru 0.000 0.000 0.000
shd_dirv 0.000 0.000 0.000
shd_vbase 0.000 0.000 0.000
shd_vup 0.000 0.000 0.000
texture 0x0000006D
texture 0x0000008E
texture 0x0000009D
texture 0x00020024
texture 0x000000BD
texture 0x00000000

</FILE>

now in the above mess we're going to change the ORANGE bits, mind the red bit - remember the ID you were searching for? ;) there it is..

OK, so the orange bit is our loading order, incorrect of course.

now keep that bit ready, and open up your .TEX file.

e.g. -;

grill.png
chrome.png
nodamage.tga
default_red.png
Paintable.tga
general_env_map.dds

the above is your new loading order, start with grill.png texture and ends with general_env_map.dds, mind you.. all these textures need to be in your textures folder for the mod, bar the default_colour.png and general_env_map.dds, these can be called from different directories.

now I am assuming that you have your textures defined in the RPK.

so we take our list -;

grill.png
chrome.png
nodamage.tga
default_red.png
Paintable.tga
general_env_map.dds

and search for each texture, lets start with grill -;

<FILE 00000305.res >
typeof 7
superid 0x00000004
typeid 0x0000006D
alias grill.png
isparentcompatible 1.00
</FILE>
<FILE 00000305.rsd >
sourcefile cars\racers\BMW_E92_data\textures\grill.png
</FILE>

we need the typeid for our loading order, lets take that down and add it by our grill.png

e.g.

grill.png 0x0000006D

cool, we've got our first bit.. lets continue with the rest same steps just different texture.

here's my final loading order -;

grill.png 0x0000006D
chrome.png 0x0000008E
nodamage.tga 0x0000009D
default_red.png 0x00020024
Paintable.tga 0x000000BD
general_env_map.dds 0x00000000

that's the first/boring bit done.. now lets finish it off, lets go back to RPK and our orange marked bit, the one we're going to work with.. eh?

<FILE 00000360.res >
typeof 14
superid 0x00000005
typeid 0x0000008C
alias F
isparentcompatible 1.00
</FILE>
<FILE 00000360.rsd >
mesh 0x0000008D
flags 8.000
lod_amp 3.000
shd_center 0.000 0.000 0.000
shd_diru 0.000 0.000 0.000
shd_dirv 0.000 0.000 0.000
shd_vbase 0.000 0.000 0.000
shd_vup 0.000 0.000 0.000
texture 0x0000006D
texture 0x0000008E
texture 0x0000009D
texture 0x00020024
texture 0x000000BD
texture 0x00000000

</FILE>

now copy your loading order from the TEX file you just modified and paste it right above the orange "texture *x******" bits.. and remove the texture *x***** bits from the rpk, leaving just our texture names and ID's so the final bit should look like the below -;


<FILE 00000360.res >
typeof 14
superid 0x00000005
typeid 0x0000008C
alias F
isparentcompatible 1.00
</FILE>
<FILE 00000360.rsd >
mesh 0x0000008D
flags 8.000
lod_amp 3.000
shd_center 0.000 0.000 0.000
shd_diru 0.000 0.000 0.000
shd_dirv 0.000 0.000 0.000
shd_vbase 0.000 0.000 0.000
shd_vup 0.000 0.000 0.000
grill.png 0x0000006D
chrome.png 0x0000008E
nodamage.tga 0x0000009D
default_red.png 0x00020024
Paintable.tga 0x000000BD
general_env_map.dds 0x00000000

</FILE>

now we've got our loading order ready-ish.. just one last bit to do, leave the ID's and replace texture names with with "texture " - mind the space there ;)

final result -;

<FILE 00000360.res >
typeof 14
superid 0x00000005
typeid 0x0000008C
alias F
isparentcompatible 1.00
</FILE>
<FILE 00000360.rsd >
mesh 0x0000008D
flags 8.000
lod_amp 3.000
shd_center 0.000 0.000 0.000
shd_diru 0.000 0.000 0.000
shd_dirv 0.000 0.000 0.000
shd_vbase 0.000 0.000 0.000
shd_vup 0.000 0.000 0.000
texture 0x0000006D
texture 0x0000008E
texture 0x0000009D
texture 0x00020024
texture 0x000000BD
texture 0x00000000

</FILE>

this is your loading order done! save the RDB, resconvert back to RPK and test your mesh out in game.

some tips -;

write down a little ID.txt file with all the texture ID's, easier to do the loading order in the future as you don't have to dig through the RDB.

general_evn_map.dds can be called with -; 0x00000000 ID so you don't need to define it, so can colours.. RED for e.g is -; 0x00020024 while WHITE -; 0x00020025

hopefully this helps you get started, but if you don't get something feel free to comment and I'll expand/update the article/tutorial.

JC
 
1.   Posted by tomast199999   2014-12-22 13:53    

Hey! You are my hero! Thanks so much!!!


Total : 1, on page: 1