• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Compiling Error - New Vehicle Texture

Shurek

Grizzled Veteran
May 21, 2006
857
13
www.darkesthourgame.com
I've created a new vehicle texture and I've gone through all of the correct steps to make the various extended subclasses (Cannon, CannonPawn, etc). All of these files were put into a Classes folder in a custom package folder (FallBlauCustom). I imported the new texture 'Stug3_ext_dunkelGD' into it's own .utx package using the editor and then placed the .utx package into the Texture directory for RO. The custom Vehicle Package name (FallBlauCustom) has been added to the EditPackages list in the Red Orchestra.ini

Now, when I go to compile the Package, everything looks like it's going to work and then an error pops up at the last moment that says:

"Cannot find Material 'SHK_vehicles_tex.Vehicle_ext.Stug3_ext_dunkelGD'"

What gives? The texture package was created correctly and placed into the texture folder. Why can't the texture be found? Or is Material different than texture? Can someone help out?

class SHK_Stug3Destroyer_DunkelGD extends Stug3Destroyer;

static function StaticPrecache(LevelInfo L)
{
super(ROTreadCraft).StaticPrecache(L);

L.AddPrecacheMaterial(Material'SHK_vehicles_tex.Vehicle_ext.Stug3_ext_dunkelGD');
L.AddPrecacheMaterial(Material'axis_vehicles_tex.Treads.Stug3_treads');
L.AddPrecacheMaterial(Material'axis_vehicles_tex.int_vehicles.Stug3_int');
L.AddPrecacheMaterial(Material'axis_vehicles_tex.int_vehicles.stug3_int_s');
}

simulated function UpdatePrecacheMaterials()
{
Level.AddPrecacheMaterial(Material'SHK_vehicles_tex.Vehicle_ext.Stug3_ext_dunkelGD');
Level.AddPrecacheMaterial(Material'axis_vehicles_tex.Treads.Stug3_treads');
Level.AddPrecacheMaterial(Material'axis_vehicles_tex.int_vehicles.Stug3_int');
Level.AddPrecacheMaterial(Material'axis_vehicles_tex.int_vehicles.stug3_int_s');

Super(ROTreadCraft).UpdatePrecacheMaterials();
}

defaultproperties
{
PassengerWeapons(0)=(WeaponPawnClass=Class'FallBlauCustom.SHK_Stug3CannonPawn_DunkelGD')
DestroyedVehicleMesh=StaticMesh'axis_vehicles_stc.Stug3.Stug3_Camo_Destroyed'
Skins(0)=Texture'SHK_vehicles_tex.Vehicle_ext.Stug3_ext_dunkelGD'

}
 
Last edited:
What gives? The texture package was created correctly and placed into the texture folder. Why can't the texture be found? Or is Material different than texture? Can someone help out?
[/COLOR][/SIZE]
class SHK_Stug3Destroyer_DunkelGD extends Stug3Destroyer;


A Material is in fact different then a texture (at least in my book..)
.. swap it to Texture and try again? anything different?
 
Upvote 0
Drax,

Yeah, I had a feeling that was the case. Strange that the stock RO code would reference Material vs. Texture. I'm sure there's a great reason for it, but I can't figure out how to cause my texture to be referenced as a Material.

When I get home tonight, I'll try your suggestion and let everyone know how it goes. Otherwise, back to the drawing board...
 
Upvote 0
Drax,

Yeah, I had a feeling that was the case. Strange that the stock RO code would reference Material vs. Texture. I'm sure there's a great reason for it, but I can't figure out how to cause my texture to be referenced as a Material.

Not really when you think of it..

a Texture in UnrealEd is a RGBA / G16 / P8 / and the various DDS compressions ( DXT1, DXT3, DXT5 ) image formats.. ie: what you import into the Texture Editor from PSP/PS/Gimp/whatever.

a Material includes your Shaders, TexPanners, Combiners, Enviromental Maps / Cubemaps , etc..
(Basically everything here: http://udn.epicgames.com/Two/MaterialTutorial.html )

You'll notice a large chunk (if not all..? I haven't looked at all of then) of RO's vechicle/player/weapon skins are actually Materials.. at minimun a flat texture with a Specular Map with it.. etc.. tank tracks are a flat Texture with a TexModifier applied to it..etc.

So in the code, you just needa reference it appriopriately.
 
Upvote 0
Instead of calling it a Material can you reference it as a Shader, or are Texture and Material the only right calls to make?

Not sure.. I say give it a try and see what it says..
(I'm usually at work when I check the forums, which means I never have UEd to even try these things.. but lets be honest, you could have tried it in the time it took for you to post it and me to reply that I'm not sure. :p )
 
Upvote 0