Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Asset Forge

Create your own 3D models and 2D sprites! · By Kenney

Fixing custom block textures

A topic by Any_Key created Jul 08, 2017 Views: 430
Viewing posts 1 to 1
(1 edit)

I'm here to teach you how to make your custom blocks use the default materials from Asset Forge instead of making a new set of materials for each custom block you create and import. This is especially useful if you're building a set and want consistency across your pieces instead of having to change properties on each block.

The first thing to know is that Asset Forge will automatically use a material if the name already exists, otherwise it will create a new material. If you're making a set and want all of your parts to share some materials make sure you use a consistent name when naming the materials.
The second thing to know is that Asset Forge has a number of built in Materials. If you're building a block set that should integrate with the Vehicle pack, for example, you'll want to use the same material names and properties. Having the same names means that you'll share materials with the default assets, and having the same properties means you won't overwrite any of the default settings should you place your block first. Asset Forge takes the properties of the first material with a name and makes that material, all subsequent assets placed using that material name will inherent the properties of the existing material.
Below is a list of some of the default materials and their common usage. There are probably more that I've not yet found.
  _defaultMat  -  The default white material
  tire  -  Used on tires, roof racks, and many grey/black blocks
  blueSteel  -  The blue material applied to the majority of vehicle and aircraft parts
  orangeSteel  -  The tops of cars and hood/bonnet covers
  glass  -  It's glass
  wood  -  Used mostly in the buildings packs
  
The easiest way to make sure you're using the same matrials is to check the materials in your 3D modeling program of choice. Sometimes when importing an object the modeler will like to append to the material name so you'll get something like _defaultMat.001  Just change the material name.
A surefire way to ensure you have the same material name and properties is to open your .mtl file and copy/paste the default proterties used in Asset Forge. The properties of the above materials are below:

newmtl _defaultMat
Ka 0.000000 0.000000 0.000000 
Kd 1 1 1 
Ks 0.330000 0.330000 0.330000
newmtl tire
Ka 0.000000 0.000000 0.000000 
Kd 0.2980392 0.3137255 0.3647059 
Ks 0.330000 0.330000 0.330000
newmtl blueSteel
Ka 0.000000 0.000000 0.000000 
Kd 0.02745098 0.4 0.6941177 
Ks 0.330000 0.330000 0.330000
newmtl orangeSteel
Ka 0.000000 0.000000 0.000000 
Kd 1 0.6117647 0.3529412 
Ks 0.330000 0.330000 0.330000
newmtl glass
Ka 0.000000 0.000000 0.000000 
Kd 0.2980392 0.3137255 0.3647059 
Ks 0.330000 0.330000 0.330000
newmtl wood
Ka 0.000000 0.000000 0.000000 
Kd 0.7843137 0.6156863 0.5176471 
Ks 0.330000 0.330000 0.330000

If you had different material names you will need to open the .obj in a text editor and modify the "usemat ..." line i.e "usemtl _defaultMat.001" -> "usemtl _defaultMat"

Help, my blocks are shiny!
Your faces are probably sharp, or that's what I've experienced.
In Blender do the following:
    Import your obj, delete the default cube if necessary
Right Click to select the obj
Press [TAB] to enter edit mode
In the left pane select the "Shading/UVs" tab
Click the button labeled "Flat" under the Faces: heading
Export your fixed model.

http://imgur.com/zCOebKe

If you have any questions or suggestions on this process please leave a reply below or pop on over to the Discord and I'll try to help.