Game Development Community

Summer rant (texture pack info too)

by Apparatus · 07/08/2008 (12:40 pm) · 16 comments

It's that time again when I look up the net, watch movies and whatnot, doodle on napkins and mumble around like an old guy collecting ideas and figuring out new stuff; I love pre-production more than anything else (not more than coffee);

Concept art is something I always wanted to do yet never had a full time job doing it; sometimes I jump from idea directly onto modeling and texture in the same time; it works, though. I think I am mad :) When I have an Idea I need to put it to work - fast; reminds me a bit of the old Halflife mods days, when I made crazy stuff using bsp and entities only (one w I recall was a catapult for Gordon).

Anyway, before I set sail with the new stuff I kinda needed some fresh textures. I have tons of them, buried on my hard drives but I wanted something new - and since somebody noticed that texture packs may appeal to people somewhat more than, say, crates and barrels packs - heck, let's shoot two rabbits then.

I got around 200 textures so far and I am in the mood to keep going for at least 2 more days; After that It will be a real pleasure to jump to Constructor for a week or so for something TGEA aimed. I am still having trouble making the bump work in 1.7.1 - guess I have to start with a clean install - but for now I will focus on some buildings / structures.

www.editmygame.com/screenshotstge/texturepackpreview.jpg

#1
07/08/2008 (1:51 pm)
I'm having probs getting bumps to work as well. I haven't tried a fresh install yet, if it helps, could ya give a shout out? Awsome texture set btw.
#2
07/08/2008 (1:56 pm)
Looks like the 1.7.1 build has it broken, and a solution to that is to use the Barricade.exe from the Barricade demo; Could be the material.cs and how the materials are written down but I tried with my own model using the existing materials (i.e. the gg logo); no luck; Haven't tried on DTS models yet though.
#3
07/08/2008 (3:50 pm)
I thought bump was no longer used in TGEA, being replaced by normal and parallax mapping.
#4
07/08/2008 (4:14 pm)
well yes, bump is used here as in so many other places in reference to normal map, everyone knows bump is obsolete; the barricade.exe replacement is exactly about that; and it seems is not broken completely but only on surfaces pointing straight up;
#5
07/08/2008 (4:22 pm)
Ah I see, I mistook your meaning of "bump map" as "detail map" on a dif.

So, yes I agree, I've noticed that horizontal surfaces (and angled surfaces like a sloping roof) don't seem to get specular highlights - though the shadowing seems to work.
#6
07/08/2008 (4:32 pm)
If you want to check how the Normal map applied to the model, I would recommend to make a test-texture filled with single color (like gray 128-128-128) and then you just specify in materials.cs your normal map you want to test as bumpTex[0] for your gray-filled texture.
You will see that it's working.
If you need a specular map to be applied, it should be baked as alpha channel into diffuse map, not to normal map's alpha as it's stated in some of manuals.
And, TGEA1.7.0 & 1.7.1 have a bug with specular on interiors (due to incorrect sun vector), see this thread for fix.

edit: link
#7
07/08/2008 (6:39 pm)
I am using a fresh install of TGEA 1.7.1 and the bump is working for me.
As bank said, your specular goes into the color map's alpha channel, and if your using Photoshop make sure to be using the SuperPNG plugin. Just make and alpha channel and copy your specualr map texture into it and it will work if you created the correct meterial code.
You will need a material.cs, I kjust create material.cs files in each of the directories containing textures that needs to be handled.

I normally create a material like this (rip out the specular fields if not eneded)
The textures are all in the same path as the material.cs file so I don;t needa write out the whole path to the texture. "rockmossy_N" in this case would be my normal map, and "rockmossy" the color map with the specular in its alpha channel.

new Material(MAT_ROCK3_rockmossy)
{
   mapTo  = "rockmossy";
   baseTex[0] = "rockmossy";
   bumpTex[0] = "rockmossy_N";
   pixelSpecular[0] = true;
   specular[0] = "1.0 1.0 1.0 1.0";
   specularPower[0]	= 32.0;
};

Btw. when distributing these you might want to do it with specual map texture seperated (and not in the color map texture) so that the textures are usefull in other engines also. If someone wants to add specular to a material he could then just modify the color map and copy your provided specular map. Dexsoft releases their models with the spec seperated and this allowed me to decide where I really wanted specular like on windows and only create PNG textures for those and keep walls and such without specular and in JPG.

[edit] Will you be working on some buildings again? Request, how bout some wooden ones if your not too bored with medieval yet? :p per my forum topic
#8
07/08/2008 (7:51 pm)
Thanks Leslie - very good points you made right there; however:

I have so many engines in mind and sometimes I tend to complicate things when they should be simple; I have a couple of simple questions -

1. Is it relevant how you name the material - new Material(MAT_ROCK4_rockyfour) or new Material(whatever) ?
2. Is it relevant to have all the entries in that order (mapTo, basetex, bumpTex..)?
3. Texture naming conventions matter - underscore N (normal) D (diffuse) ?

I have to stress out that my problems are related to DIF only atm. On dts objects works just fine, I just tested the other day with the specular info in the alpha channel with a JPEG and worked just fine.

And yes, I am working on medieval buildings, but it's contract work; hope I will have just as much force to double-tap and make some worthy of a pack as well, tge/tgea ready.
#9
07/08/2008 (9:49 pm)
@Bank

Thanks for that link, fixes everything like a charm. Also thanks for the spec-map info.

I'd have got round to trawling the forums for a solution eventually, but I'm still very much in design/planning mode at the moment.
#10
07/08/2008 (10:01 pm)
1) Names for the Materials do not matter. As long as you keep them unique. The name you see there is just how I named them. All the rocks I got from you happen to be in rocks/set3 :) so I called the material MAT_ROCK3...

2) nah, ,doesn't matter,

3) No, does not matter. Some of my normals end with _NRM,.. its just for myself so I know those ending with _N and _NRM is normal maps.

In my example code I show that I do not apply the whole path to the texture. It works if the texture is in the same path as the material.cs file that references it, else I had to write for example
mapTo = "game/shapes/rocks/set3/rockmossy";

There was two cases where different textures used the same name and they where located in different directories and refferenced by two different material.cs files, still torque complained or rather warned me about them, so for those two I just wrote out the whole path to each texture and torque was happy. I dunno if it would get confused and use the wrong texture, never tested.

I am not playing with DIFs right now so I did not check if bumps work for 'em, but that link bank posted sais that there is a bug related to it and how to fix it.
#11
07/08/2008 (11:08 pm)
Aha, cool;

Unfortunately I try to avoid content that require code changes (even bug fixes); the pack is already over 500 megs as it is; people my expect it to work out of the box and overlook the bug;

Guess i'll have to re-compile myself though.
#12
07/09/2008 (12:44 pm)
Ok, i fixed the problem but I am not sure it has anything to do with how the materials.cs is setup; that is because I haven't tried this before re-compile.

I used the code example from Leslie - no normal map; I removed every reference to the used material from the .cs file and the normals popped up from nowhere. In effect, the result does not use material.cs at all.

www.editmygame.com/screenshotstge/nmscreenshot_005-00000.png
#13
07/09/2008 (12:54 pm)
I think I read somewhere that DIFs can create auto normals from your colour map, so that might be why you see bumps. More than this I do not know, I have not spend any time on TGEA DIFs yet.

Here's some TDN links I found usefull.
http://tdn.garagegames.com/wiki/TSE/Materials/Overview
http://tdn.garagegames.com/wiki/TSE/Materials/Mapping_Materials_to_Textures
http://tdn.garagegames.com/wiki/TSE/Materials/Translucency
#14
07/09/2008 (7:04 pm)
Thanks Leslie again; the trouble is I know how to write a material; I asked earlier about the relevance of names and order because I tried from every angle to no avail; I even tried with the demo, using a material already set up.

Yet again, these past 2 weeks have been quite a mess around here, I certainly missed something somewhere; I will leave it for now and start fresh in about 1 week or so.

edit: thanks for the links I had them bookmarked already.
#15
07/10/2008 (1:03 am)
If you don't use materials at all, what is the naming convention that made the normal show?
#16
07/12/2008 (9:29 am)
Benjamin - doesn't matter; You need Constructor patch 1.5 (for collision issue) and use the mapt2dif_tgea from the tools directory in TGEA 1.7.1 ;

I made the normals show up using this:

new Material(DIRTYCONCRETE3)
{
   baseTex[0] = "~/data/interiors/DIRTYCONCRETE3";
   bumpTex[0] = "~/data/interiors/DIRTYCONCRETE3_n";
   mapTo = "DIRTYCONCRETE3";
   specular[0] = "0.3 0.3 0.2 1.0";
   specularPower[0] = 32.0;
   pixelSpecular[0] = true;
};

On my end whatever I do the materials don't show up without full texture path.