Importing meshes and Material id's / UV's are screwed up

Ask questions, discuss ideas, get answers
Post Reply
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Importing meshes and Material id's / UV's are screwed up

Post by fo0k »

Totally confused.. Im importing a few of the citymeshes from Berlin to max.. but when I do the Material Mapping seems to be screwed up.. looks fine in game.. not in 3dmax.

Never seen this before with actual bf42 objects..

Even extracted the vanilla standardmesh and textures to a new clean folder to make sure I had not modified anything and they were still screwed up.

what I do notice is that the material id's in the rs file are a little non standard.. (after mat0 and mat1 jumps to mat11..)

Anyone seen this..?

Code: Select all

subshader "citymesh3_m1_Material0" "StandardMesh/Default"
{
	lighting true;
	lightingSpecular false;
	materialDiffuse 1 1 1;
	texture "texture/cit4_T";
}

subshader "citymesh3_m1_Material1" "StandardMesh/Default"
{
	lighting true;
	lightingSpecular false;
	materialDiffuse 1 1 1;
	texture "texture/cit1_T";
}

subshader "citymesh3_m1_Material11" "StandardMesh/Default"
{
	lighting true;
	lightingSpecular false;
	materialDiffuse 1 1 1;
	texture "texture/cit3_T";
}

subshader "citymesh3_m1_Material13" "StandardMesh/Default"
{
	lighting true;
	lightingSpecular false;
	materialDiffuse 1 1 1;
	texture "texture/cit23_b";
}

subshader "citymesh3_m1_Material2" "StandardMesh/Default"
{
	lighting true;
	lightingSpecular false;
	materialDiffuse 1 1 1;
	texture "texture/cit2_T";
}

subshader "citymesh3_m1_Material3" "StandardMesh/Default"
{
	lighting true;
	lightingSpecular false;
	materialDiffuse 1 1 1;
	texture "texture/reprof_s";
}

subshader "citymesh3_m1_Material4" "StandardMesh/Default"
{
	lighting true;
	lightingSpecular false;
	materialDiffuse 1 1 1;
	texture "texture/cit22_b";
}

subshader "citymesh3_m1_Material5" "StandardMesh/Default"
{
	lighting true;
	lightingSpecular false;
	materialDiffuse 1 1 1;
	texture "texture/cit23_b";
}

subshader "citymesh3_m1_Material6" "StandardMesh/Default"
{
	lighting true;
	lightingSpecular false;
	materialDiffuse 1 1 1;
	texture "texture/cit24_b";
}

subshader "citymesh3_m1_Material7" "StandardMesh/Default"
{
	lighting true;
	lightingSpecular false;
	materialDiffuse 1 1 1;
	texture "texture/cityh9_b";
}

subshader "citymesh3_m1_Material9" "StandardMesh/Default"
{
	lighting true;
	lightingSpecular false;
	materialDiffuse 1 1 1;
	texture "texture/cit25_b";
}

User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Importing meshes and Material id's / UV's are screwed up

Post by Apache Thunder »

Perhaps there are materials with no material defined in the RS file? I've seen that a few times on some DC meshes. For example, I've noticed your RS file has a citymesh3_m1_Material13 and citymesh3_m1_Material11, but no citymesh3_m1_Material12. I've also noticed citymesh3_m1_Material10 is also not present. Normally when the mesh was created, the materials would be in numerical order in the RS file, so if one is missing and it skips to a higher number, something might have gone wrong.

If this is the case with Berlin meshes, they may screw up when imported into max. Best way to fix this is to restore the missing materials.

As for it "jumping" from mat1 to mat11, look futher down in the file, (it goes from mat2 and shows mat's 11 and 13, then continues with mat's 3 to 9. Notice that mat 10 and 12 are completely missing from the file) They are simply moved below and out of order (order of entry is not important in a RS file). That part is normal. The missing material numbers in respect to what's present is what is abnormal.

The best way to find out of the SM file has a material that is missing from a RS file is to open the SM file with notepad or a hexeditor and run a string search for the missing material names. If they show up in the SM file, then that means the SM file is calling for materials not defined in the RS file. Also note that normally the game will display any part of a mesh that calls to a undefined material as all black instead of the normal half gray if it were to call to missing texture instead.
ImageImageImage
I have cameras in your head!
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Importing meshes and Material id's / UV's are screwed up

Post by fo0k »

but still very strange that it displays in game fine.. bf is reading this differently than the max script i guess?

It seems that in hex the last 2 lods only have 10 materials, where the first 4 have 11.

All lod's are screwed up in different ways - see pic.

I cant help thinking its that weird material that fades in and out on distance causing the issue... used in doorways and windows..?

weird.. lmk if you get a chance to open it.. just to make sure its not just me :/
Attachments
citymesh_3.jpg
citymesh_3.jpg (65.56 KiB) Viewed 8102 times
Post Reply