White Texture when loaded into game.

Splinter13

The Learner
Joined
Aug 7, 2006
Messages
204
Location
Canada
Hello, Latly I've been working on many units for the mod i'm working on and i've ran into a problem while creating the Su-76, M 13/40 , Yak 9... and more.


Steps:
-Now i've modelled them, textured them and then I merged the animations from the example files in this thread.

-I export with the animations, and then add the .dds file into the same folder with all the .nif files and .kf files..etc

-After I do this I edit Civ4ArtDefines_Unit.xml and Civ4UnitInfos.xml and test the units ingame.

I- head into the Civilopedia after loading my unit in. The texture is all white. This happens with all these units and I don't know why. The texture shows up fine in 3ds max but not in Civ4.

Am I missing somthing? Has anyone else encountered this problem and knows the solution?


Thanks in advance,
Splinter13
 
Looks like you've done everything correctly.
How does the unit show in NIF Viewer?
What happens when you include textures in main NIF while exporting model?
How is your .dds file compresed?
 
sharick said:
How does the unit show in NIF Viewer?

I havn't checked it in the Nif Viewer. I could if it might help.

sharick said:
What happens when you include textures in main NIF while exporting model?

I don't quite understand, But i'd like you to indulge me. I'm hoping to get around this problem any way I can.


sharick said:
How is your .dds file compresed?

I don't compress it. I just leave it normally as it is --- for ex. ( SU76.dds ) ...etc


Thanks for the help sharick.. It's much appriciated.
Splinter13
 
Hi,

1. Just open your unit in NIF Viewer to see how it looks. Unlike 3ds max, what you see there is more or less what you get in civ, so if it shows ok then there is a mistake in XML probably.

2. In 3ds max while exporting your unit to .nif you have an option to include textures in that file and not leave it as original images. Can be worth a trial.

3. I was thinking that there is maybe a problem with a texture itself but if it's not even compressed then probably not. Nevertheless you should compress DDS textures to DX1 or DX3. It's losseless compression and you save a lot on filesize and consequently on memory.
 
1. Ok, thanks for the tips sharick. I exported once again and this time I included the texture with the .nif file.

2. I then checked it using the NifViewer and an error poped up showing :
Shader Errors:
-Cannot find shader TCiv4MechNonShader, Implementation -1
-Failed to find shader TCiv4MechNonShader, Implementation -1

I clicked 'Ok' at the bottom and then it takes me to the NifViewer. Everything seems intact and the texture isn't white :)

3. When I first make the textures (Convert from bmp.) I save it as a DDS DXT3
I don't know where I can "compress the DDS textures to DX1 or DX3"


Thanks for all the help with this sharick :) I'll test it out ingame and hopefully it'll work. :goodjob:


EDIT: - After testing ingame, the textures are still showing up white. :(
 
I think it might be a problem with my xml like you said in an earlier post :

--I've edited two XML files: Civ4ArtDefines_unit.xml and Civ4UnitInfos.xml

I'll show you the entries i've done to these two files and hopfully you'll find the error:


*Civ4ArtDefines_unit.xml:
Spoiler :
<UnitArtInfo>
<Type>ART_DEF_UNIT_10TP</Type>
<fScale>0.49</fScale>
<fInterfaceScale>0.9</fInterfaceScale>
<NIF>Art/Units/10TP/10TP.nif</NIF>
<KFM>Art/Units/10TP/10TP.kfm</KFM>
<SHADERNIF>Art/Units/10TP/10TP.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/TankShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>1.0</fShadowScale>
</ShadowDef>
<iDamageStates>4</iDamageStates>
<TrailDefinition>
<Texture>Art/Shared/tanktread.dds</Texture>
<fWidth>1.0</fWidth>
<fLength>180.0</fLength>
<fTaper>0.0</fTaper>
<fFadeStartTime>0.2</fFadeStartTime>
<fFadeFalloff>0.35</fFadeFalloff>
</TrailDefinition>
<fBattleDistance>0.5</fBattleDistance>
<fRangedDeathTime>0.12</fRangedDeathTime>
<bActAsRanged>1</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop>LOOPSTEP_TANK</AudioRunTypeLoop>
<AudioRunTypeEnd>ENDSTEP_TANK</AudioRunTypeEnd>
</AudioRunSounds>
<SelectionSound>AS3D_UN_TANK_FORT</SelectionSound>
<ActionSound>AS3D_UN_TANK_FORT</ActionSound>
</UnitArtInfo>



* Civ4UnitInfos.xml
Spoiler :
<UnitInfo>
<Class>UNITCLASS_TANK</Class>
<Type>UNIT_10TP</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_ARMOR</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_TANK</Description>
<Civilopedia>TXT_KEY_UNIT_TANK_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_TANK_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>
<bAnimal>0</bAnimal>
<bFood>0</bFood>
<bNoBadGoodies>0</bNoBadGoodies>
<bOnlyDefensive>0</bOnlyDefensive>
<bNoCapture>0</bNoCapture>
<bRivalTerritory>0</bRivalTerritory>
<bMilitaryHappiness>1</bMilitaryHappiness>
<bMilitarySupport>1</bMilitarySupport>
<bMilitaryProduction>1</bMilitaryProduction>
<bPillage>1</bPillage>
<bSabotage>0</bSabotage>
<bDestroy>0</bDestroy>
<bStealPlans>0</bStealPlans>
<bInvestigate>0</bInvestigate>
<bCounterSpy>0</bCounterSpy>
<bFound>0</bFound>
<bGoldenAge>0</bGoldenAge>
<bInvisible>0</bInvisible>
<bFirstStrikeImmune>0</bFirstStrikeImmune>
<bNoDefensiveBonus>1</bNoDefensiveBonus>
<bIgnoreBuildingDefense>1</bIgnoreBuildingDefense>
<bCanMoveImpassable>0</bCanMoveImpassable>
<bFlatMovementCost>0</bFlatMovementCost>
<bIgnoreTerrainCost>0</bIgnoreTerrainCost>
<bNukeImmune>0</bNukeImmune>
<bPrereqBonuses>0</bPrereqBonuses>
<bPrereqReligion>0</bPrereqReligion>
<bMechanized>1</bMechanized>
<UnitClassUpgrades>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_MODERN_ARMOR</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
</UnitClassUpgrades>
<UnitClassTargets/>
<UnitCombatTargets/>
<UnitClassDefenders/>
<UnitCombatDefenders/>
<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_ATTACK_CITY</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_PILLAGE</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</UnitAIs>
<NotUnitAIs/>
<Builds/>
<ReligionSpreads/>
<GreatPeoples/>
<Buildings/>
<ForceBuildings/>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<PrereqReligion>NONE</PrereqReligion>
<PrereqBuilding>NONE</PrereqBuilding>
<PrereqTech>TECH_INDUSTRIALISM</PrereqTech>
<TechTypes>
<PrereqTech>TECH_RIFLING</PrereqTech>
<PrereqTech>NONE</PrereqTech>
<PrereqTech>NONE</PrereqTech>
</TechTypes>
<BonusType>BONUS_OIL</BonusType>
<PrereqBonuses/>
<ProductionTraits/>
<Flavors/>
<iAIWeight>0</iAIWeight>
<iCost>180</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iMinAreaSize>-1</iMinAreaSize>
<iMoves>2</iMoves>
<iAirRange>0</iAirRange>
<iNukeRange>-1</iNukeRange>
<iWorkRate>0</iWorkRate>
<iBaseDiscover>0</iBaseDiscover>
<iDiscoverMultiplier>0</iDiscoverMultiplier>
<iBaseHurry>0</iBaseHurry>
<iHurryMultiplier>0</iHurryMultiplier>
<iBaseTrade>0</iBaseTrade>
<iTradeMultiplier>0</iTradeMultiplier>
<iGreatWorkCulture>0</iGreatWorkCulture>
<TerrainImpassables/>
<FeatureImpassables/>
<iCombat>30</iCombat>
<iAirCombat>0</iAirCombat>
<iAirCombatLimit>0</iAirCombatLimit>
<iXPValueAttack>4</iXPValueAttack>
<iXPValueDefense>2</iXPValueDefense>
<iFirstStrikes>0</iFirstStrikes>
<iChanceFirstStrikes>0</iChanceFirstStrikes>
<iInterceptionProbability>0</iInterceptionProbability>
<iEvasionProbability>0</iEvasionProbability>
<iWithdrawalProb>0</iWithdrawalProb>
<iCollateralDamage>0</iCollateralDamage>
<iCollateralDamageLimit>60</iCollateralDamageLimit>
<iCollateralDamageMaxUnits>5</iCollateralDamageMaxUnits>
<iCityAttack>0</iCityAttack>
<iCityDefense>0</iCityDefense>
<iAnimalCombat>0</iAnimalCombat>
<iHillsAttack>0</iHillsAttack>
<iHillsDefense>0</iHillsDefense>
<TerrainNatives/>
<FeatureNatives/>
<TerrainDefenses/>
<FeatureDefenses/>
<UnitClassAttackMods/>
<UnitClassDefenseMods/>
<UnitCombatMods/>
<UnitCombatCollateralImmunes/>
<DomainMods/>
<BonusProductionModifiers/>
<iBombRate>0</iBombRate>
<iBombardRate>0</iBombardRate>
<SpecialCargo>NONE</SpecialCargo>
<DomainCargo>NONE</DomainCargo>
<iCargo>0</iCargo>
<iConscription>0</iConscription>
<iCultureGarrison>12</iCultureGarrison>
<iExtraCost>0</iExtraCost>
<iAsset>5</iAsset>
<iPower>25</iPower>
<UnitMeshGroups>
<iGroupSize>1</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<iMeleeWaveSize>1</iMeleeWaveSize>
<iRangedWaveSize>1</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_10TP</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<Button>,Art/Interface/Buttons/Units/Tank.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,4,11</Button>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions>
<FreePromotion>
<PromotionType>PROMOTION_BLITZ</PromotionType>
<bFreePromotion>1</bFreePromotion>
</FreePromotion>
</FreePromotions>
<LeaderPromotion>NONE</LeaderPromotion>
<iLeaderExperience>0</iLeaderExperience>
</UnitInfo>



--- Everything is lined up correctly in the xml files, but when I copy it over to the forums it messes up. So just pretend it is all lined up correctly.

Thank you :D
 
I thjink something wrong is with putting texture in max - maybe with setuyp of civ4 shader - in su i put once again the same texture and it was ok. I'll let you know if i found more
 
I might be able to help you with this if you can wait a couple of days. I currently don't have internet access at my house, but will this coming weekend. If you PM me the files (or links to them) I'll check them out this Sat/Sun. This is of course if you can't find the problem by then...

-Smitty
 
snafusmith said:
I might be able to help you with this if you can wait a couple of days. I currently don't have internet access at my house, but will this coming weekend. If you PM me the files (or links to them) I'll check them out this Sat/Sun. This is of course if you can't find the problem by then...

-Smitty

Alright thanks, I'll try and fix it before then but if it's still not working i'll see about sending you the files :D
 
Ok i've checked the .max files you've sent me
the mane differenece is as i thoght in civ4shader options
i corrected it for values i'm using and now after export it has normal texture

try with this settings (i'm using this settings since sharick made animations for my tank:D):

settingsrd9.jpg


Hmm btw - one of the longest draws i've made ;)
 
Back
Top Bottom