Jump to content

How to add a new texture?


Dr.Geologist

Recommended Posts

  • 2 months later...

Thank you DerPopo for the plugin, this is very usefull!

 

However I'm still not able to add new textures in both TerrainTextures or BlockTextureAtlases.

 

1. How do you even link the texture to the block?

Clay for example is reffered to as texture n° 301 but I don't see anything mentioning "301" in TerrainTextures.

 

2. Regarding BlockTextureAtlases, I was already succesful in adding custom textures in ta_cutoutmoveable and ta_opaque.

But then I created a new texture I called ta_paintings and made textures (ta_paintings, ta_paintings_n, ta_paintings_e) and corresponding ta_paintingsxml.

My game doesn't crash and recognizes the blocks, however the texture appears to be plain black.

It doesn't seem to load the blocks when I add the line <property name="Mesh" value="paintings" />

(which I think is pretty necessary?)

 

I did as you told (added the assets in BlockTextureAtlases and added references in the unnamed asset 0x0000008E.

 

prntscrn.jpg.5c425c6b8acb3f77e211b4bf6fbd8259.jpg

 

Here is my ta_paintingsxml.xml:

 

<uvmapping>

<uv id="438" x="0.00390625" y="0.00390625" w="0.1250" h="0.0625" blockw="2" blockh="2" color="0.7257247,0.7616225,0.7764373" material="glass" texture="painting03.tga" />

<uv id="439" x="0.2695313" y="0.00390625" w="0.0625" h="0.0625" blockw="2" blockh="2" color="0.4092176,0.4096197,0.3276354" material="glass" texture="painting04.tga" />

<uv id="440" x="0.6679688" y="0.2695313" w="0.0625" h="0.0625" blockw="1" blockh="1" color="0.1762678,0.1706559,0.1647059" material="glass" texture="painting05.tga" />

</uvmapping>

 

And blocks.xml:

 

<block id="1338" name="painting03">

<property name="Material" value="glass" />

<property name="Shape" value="Plate" />

<property name="Mesh" value="paintings" />

<property name="Texture" value="438,335,335,335,335,335" />

<property name="Weight" value="64" />

<property name="CanPickup" value="true" />

<property name="Group" value="Furniture/Decor" />

<drop event="Destroy" name="brokenGlass" count="1,2" />

</block>

<block id="1339" name="painting04">

<property name="Material" value="glass" />

<property name="Shape" value="Plate" />

<property name="Texture" value="439,335,335,335,335,335" />

<property name="Mesh" value="paintings" />

<property name="Weight" value="64" />

<property name="CanPickup" value="true" />

<property name="Group" value="Furniture/Decor" />

<drop event="Destroy" name="brokenGlass" count="1,2" />

</block>

<block id="1340" name="painting05">

<property name="Material" value="glass" />

<property name="Shape" value="Plate" />

<property name="Texture" value="440,335,335,335,335,335" />

<property name="Mesh" value="paintings" />

<property name="Weight" value="64" />

<property name="CanPickup" value="true" />

<property name="Group" value="Furniture/Decor" />

<drop event="Destroy" name="brokenGlass" count="1,2" />

</block>

 

 

Again, I do not get any errors at all in the console.

 

3. I am looking for a shape double the size of 'plate' in width,

so I can put larger paintings in my house. Any idea on how to find or import that?

 

4. I also noticed something strange in UAE.

As Dr.Geologist mentioned, none of the DDS export settings seem to be recognized by the texture plugin.

It does seem to recognize size (4096x4096) and mipmaps but then it says 'Format:unknown:' and some random hex code.

No preview as well. I manipulated other textures and exported in DDS DXT5 which worked everytime

so i don't really know what's going on here.

 

5. What does the color do in uvmapping?

 

Any help is much appreciated!

Link to comment
Share on other sites

  • 2 years later...
Here it is :

 

mirror 1

mirror 2

Or as an attachment :

[ATTACH]7188[/ATTACH]

 

The instructions on how to use it are in the readme.

If you want to add a new texture using UAE, open the Add dialog (menu : Asset->Add).

  1. Write your texture's name into Asset Name, write 0 into Asset Index Offset and write 0x0000001C into Asset Type.
  2. Once you have it added, right click an existing texture (like snow) and export it somewhere to a .data file. Right click your new asset and import the exported file.
  3. Click your new asset and select Plug-in. Then right click it and import the texture you created. Make sure the formats of your texture and the new asset match (most likely it should be DXT5).
  4. Select the unnamed asset of type AssetBundle and add the new asset like described in the readme.
  5. Create a normal map of your texture and repeat steps 1-4 to create an asset ending with _n. You can also create a specular ending with _s.

7dtd seems to use grayscales as normal textures.

 

If you want to use transparency, you have to insert your texture in one of the ta_ files in BlockTextureAtlases.

 

I realize the instructions are 3 years old, but I managed to get all of these feats done in v2.2, except I get an error when loading the game.

 

DbpLAES.png

 

As you can see there doesn't seem to be a container file specified, but the files are there, I edited the xml in blocktextureatlases to reference the file in terraintextures, and the error message I get is:

 

Exception: TextureAtlasTerrain: couldn't load diffuse texture 'test.tga'

 

So my request is, can you update the instructions on adding additional files? Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...