Difference between revisions of "Adding custom textures with normal maps"

From Platinum Arts Sandbox Free 3D Game Maker
Jump to: navigation, search
(removed a dead link)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
To start off: you should have a texture along with a bump map and a normal map for it. If you don't have a normal map for your texture, you can make one with Gimp and [http://code.google.com/p/gimp-normalmap/ this filter], or you can use the online normal mapper [http://www.smart-page.net/smartnormal/fl10.htm SmartNormal].
+
To start off: you should have a texture along with a bump map and a normal map for it. If you don't have a normal map for your texture, you can make one with Gimp and [http://code.google.com/p/gimp-normalmap/ this filter]
 
For example: A texture named texture.jpg and a normalmap named textureNormal.jpg
 
For example: A texture named texture.jpg and a normalmap named textureNormal.jpg
  
Line 5: Line 5:
 
Add those textures in. Now, open up notepad, and type this:
 
Add those textures in. Now, open up notepad, and type this:
  
 +
<code><font size="2"><em>
 
     setshader bumpparallaxworld
 
     setshader bumpparallaxworld
 
     texture 0 "(name here)/texture.jpg"
 
     texture 0 "(name here)/texture.jpg"
 
     texture n "(name here)/textureNormal.jpg"
 
     texture n "(name here)/textureNormal.jpg"
     texture z "(name here)/textureBump.jpg"
+
     texture z "(name here)/textureBump.jpg"</em></font></code>
  
 
The first line tells Sandbox what shader to use. You might think about using the bumpworld shader instead; that's for just bumpmaps, not normal maps. I made that mistake as well, and always wondered why my textures didn't look right. The second line tells the engine what diffuse (color) texture to use. Lines 3 and 4 tell the engine what normal and bump maps to use respectively. Save the file as package.cfg, and save it within your new folder.
 
The first line tells Sandbox what shader to use. You might think about using the bumpworld shader instead; that's for just bumpmaps, not normal maps. I made that mistake as well, and always wondered why my textures didn't look right. The second line tells the engine what diffuse (color) texture to use. Lines 3 and 4 tell the engine what normal and bump maps to use respectively. Save the file as package.cfg, and save it within your new folder.
  
 
Now, go to either data/defaultmapsettings.cfg or (mapname)-art.cfg and add the line  
 
Now, go to either data/defaultmapsettings.cfg or (mapname)-art.cfg and add the line  
 
+
<code><font size="2"><em>
     exec packages/(name here)/package.cfg
+
     exec packages/(name here)/package.cfg</em></font></code>
  
 
This tells the engine to execute the commands within package.cfg, which adds the new texture to either all new maps, or just the map you chose.
 
This tells the engine to execute the commands within package.cfg, which adds the new texture to either all new maps, or just the map you chose.
  
 
That's it.
 
That's it.

Latest revision as of 22:34, 21 July 2012

To start off: you should have a texture along with a bump map and a normal map for it. If you don't have a normal map for your texture, you can make one with Gimp and this filter For example: A texture named texture.jpg and a normalmap named textureNormal.jpg

Create your own texture folder within packages. So, packages/(name here). Add those textures in. Now, open up notepad, and type this:

    setshader bumpparallaxworld
    texture 0 "(name here)/texture.jpg"
    texture n "(name here)/textureNormal.jpg"
    texture z "(name here)/textureBump.jpg"

The first line tells Sandbox what shader to use. You might think about using the bumpworld shader instead; that's for just bumpmaps, not normal maps. I made that mistake as well, and always wondered why my textures didn't look right. The second line tells the engine what diffuse (color) texture to use. Lines 3 and 4 tell the engine what normal and bump maps to use respectively. Save the file as package.cfg, and save it within your new folder.

Now, go to either data/defaultmapsettings.cfg or (mapname)-art.cfg and add the line

    exec packages/(name here)/package.cfg

This tells the engine to execute the commands within package.cfg, which adds the new texture to either all new maps, or just the map you chose.

That's it.