Jump to content

How to add a new texture?


Dr.Geologist

Recommended Posts

I find something in "BlockTextureAtlases". File "ta_terrainxml" in "BlockTextureAtlases" has XML code:

 

<?xml version="1.0" encoding="UTF-8"?>

 

<uvmapping>

...

<uv id="1" x="16" y="16" w="256" h="256" blockw="4" blockh="4" color="0.3619511,0.3611408,0.3482094" material="stone" texture="stone.tga" />

...

</uvmapping>

 

Letter i try add my rock, but i don't know what does the "x="16" y="16" w="256" h="256" blockw="4" blockh="4" color="0.3619511,0.3611408,0.3482094"" mean.

Link to comment
Share on other sites

Earlier i tried to add new textures to the xml files in BlockTextureAtlases, with mixed results.

I was able to add new mesh, and it was visible in game, but the game started to crash with strange behavior after a while.

 

(I think the data I inserted pushed something, and i think you will need to edit the 0x000000E8 index1 as well as the data)

Link to comment
Share on other sites

X and Y are the position of the texture in the texture atlas, W and H are the size of the texture.

0 means left (x) or top (y), 1 means right (x) or bottom (y) (or the other way round). 0.5|0.5 is the middle of the texture.

I'm not sure what they mean in ta_terrainxml as each texture of it is in a separate file.

 

To add a new texture, you could either add it to a texture atlas (like ta_opaque) or add it as a separate file in TerrainTextures (although this would require you to add the file name to the asset at index 1 so Unity finds the file).

The transparency values stored in the texture atlases are not used by the game.

If a file ending with _a exists, the game uses the brightness of it (black is fully transparent; the whiter it is, the less transparent is the block).

You must make sure the uv id isn't already used, else it might collide with an existing one.

Link to comment
Share on other sites

Okay so now I would like to know how I can ad custom textures to guns like the guy who added the mg42

 

You can reskin the guns pretty easily; most of them are in the sharedassets files. Ive reskinned a few myself.

 

Im either missing something or forgetting something - how would I even open the terrain textures? I tried this weeks ago and couldnt get it. I couldnt even open the Atlas file either.

Link to comment
Share on other sites

Is anyone using Disunity on W7 64 Bit?

 

Use UABE or Disunity to open the bundles, and UAE or Disunity for the extractes assets from the bundles. I'm not sure about the formats.

 

Where do I find UABE? I have UAE already and Disunity appears to be broken.

 

EDIT NVM, found it.

Link to comment
Share on other sites

In the modding tools section you can find both UABE https://7daystodie.com/forums/showthread.php?22675-Unity-Assets-Bundle-Extractor and a guide for Disunity install https://7daystodie.com/forums/showthread.php?24124-How-to-install-disunity-and-extract-assets-and-bundles-from-unity-games

 

Go for UABE if you want the easy way, and remember to remove typetree if you want to open the asset in UAE

 

Edit.. Added: For the file formats my guess is that they are RGBA compressed DXT5's.

Link to comment
Share on other sites

In the modding tools section you can find both UABE https://7daystodie.com/forums/showthread.php?22675-Unity-Assets-Bundle-Extractor and a guide for Disunity install https://7daystodie.com/forums/showthread.php?24124-How-to-install-disunity-and-extract-assets-and-bundles-from-unity-games

 

Go for UABE if you want the easy way, and remember to remove typetree if you want to open the asset in UAE

 

Edit.. Added: For the file formats my guess is that they are RGBA compressed DXT5's.

 

Ok, thank you. I do have more questions though. :p

 

I can edit/import/export the texture files, but as above, it says I need to add them to the unnamed asset at index 1 if Unity is to find them.

 

That is where I get lost. I try to do it as I would with the icons, but that doesnt seem to work. I see all of the names for the textures in UAE, but I dont know how to add new names to index 1.

 

Please excuse my nubism.

Link to comment
Share on other sites

Latest news.

"Unnamed assets" is in "TerrainTextures" has some information about textures in this file. I guess it is a last place where I need to add changes. I tried to edit this "Unnamed assets", but I don't know structure of this. The game doesn't load after my attempts, editing this file was broken the game. :(

 

Does anybody know something about this "Unnamed assets"?

Link to comment
Share on other sites

Latest news "something about structure of this "Unnamed assets"".

 

struc.jpg.fec49b217db1ec1ee9e392a00df7807c.jpg

 

1st rectangle - I don't know, this number has repeated at the same site, but not always. If we add the number 2, we will get "name"+_n texture. For example: stone -> stone_n.

2nd rectangle - name of "texture.dds"

3rd rectangle - I have no idea

4th rectangle - I don't know, but 01 has repeated at the same site everywhere, maybe it is a separator character.

5th rectangle - I don't know, but 00 has repeated at the same site everywhere.

6th rectangle - number of index on HEX format in "TerrainTextures".

 

- - - Updated - - -

 

http://s017.radikal.ru/i423/1502/5e/9732f139b413.png large picture

Link to comment
Share on other sites

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.

AssetBundle plugin.zip

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...