View Single Post
Old 05-30-2003, 04:01 PM   #13
rgoer's Avatar
Join Date: Jan 2003
Location: Raleigh
Posts: 316
I have lots and lots and lots of custom maps downloaded in my base file (which im sure we all do :P). If I load textures from custom maps, I'll be able to use all of the textures that are unique to that map. They'll load up exactly the way they should. However all the textures that are borrowed from the assets files do not get loaded.
Keep in mind that if you borrow textures from a custom map, other players will have to have that "other" custom map (in addition to the map you are working on, with the borrowed textures) in order to see them in-game. Unless you copy the textures from "othermap.pk3" into "yourmap.pk3" all those "borrowed" textures will show up as the grey and white "oops" grid texture.

If assets0.pk3 is really give you as much grief as you claim, it wouldn't hurt to reinstall. Reinstall JK2 and radiant. Backup all the "custom" stuff from your base/ folder (including any w.i.p. .map files you have in base/maps), uninstall JK2, go back in and wipe out all the residual garbage, and reinstall.

Once you are working on an un-tainted installation, here is proper texturing technique:

Create a folder in base/textures/ called "yourmap" (if the textures/ folder isn't in base/ you should go ahead and create that one too). This is where you are going to store all your custom textures while you work on it in radiant.

Create a file in base/shaders/ called "yourmap.shader"--even if you don't have any actual "shader" shaders yet. This is where you will create any shaders you want.

Edit the file in base/shaders/ called "shaderlist.txt" and add "yourmap" to the list.

Fire Radiant up.

Unless you are just browsing around the other "custom maps" texture sets, it's a pretty good idea to work with the "shaderlist.txt only" option enabled in the textures menu of Radiant. This will limit the textures menu to only look in the textures/ directories listed in shaderlist.txt (see why we added "yourmap" to shaderlist.txt?). This means, pretty much, that the only textures you will be using will either be included with your map (because you put them there) or can be found in assets0.pk3. A big step to avoiding the "oops" grid alltogether.

We're going to be doing something else, so I guess you should quit Radiant now.

Now, let's say you are playing Dad*Mad's duel_snow1 map, and you are really impressed by his beam shader (I know, I know, it's just a beam shader, but this is just an example). You need to open up the .pk3 and take a look at his .shader files and his textures/ directory. Unless you get an author's permission, it is pretty damned wrong to just lift shaders and textures from his/her work! However, you can check to see how they did it and try and do the same thing yourself.

Open up Dad*Mad's .shader file and study the shader code that defines the beam shader, so you can write one of your own. Notice, though, that Dad*Mad's code is writing paths like textures/snow/whatever -- you're going to need to change this to textures/yourmap/whatever.

Now you need to look in Dad*Mad's textures/ directory. Look for the file that has a matching path to the shader you were looking at. Find the file at textures/snow/whatever, and open that puppy up in photoshop to see how he did it. Oh, a beam shader is just a gradient; I can make one of those. So do it: make your own gradient image, and save it to textures/yourmap/whatever.

Now, make sure there aren't any typos in your .shader definitions, save the .shader file and fire Radiant back up. Make sure "shaderlist.txt only" is still active, and choose "yourmap" from the textures menu. Voila, your new beam shader is ready for action.

What if you want to make just simple textures, and not fancy-shmancy shaders? Just put images in the textures/yourmap/ folder; as long as "yourmap" is in shaderlist.txt and yourmap.shader is in the base/shaders/ folder, any .jpg or .tga image you put in textures/yourmap/ will show up when you pick "yourmap" from the textures menu. Any .jpg or .tga image whose dimensions are a power of 2, that is (2x2, 2x4, 64x1024, 2048x256, et cetera). They don't have to be the same power of 2, they just have to be a power of 2. And that's all she wrote.

Until it's time to pak up your map into a .pk3, but we'll burn that bridge when we come to it.

Hope this helps.

Last edited by rgoer; 05-31-2003 at 10:28 PM.
rgoer is offline   you may: quote & reply,