How to - Technical Discussion

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Infernis
Posts: 615
Joined: Thu Feb 17, 2005 12:00 pm

How to - Technical Discussion

Post by Infernis »

How to - Technical Discussion

I'm about to boldly go where I've never gone before. I know a lot of the basics but for this experiment I'm going to find out just how deep the rabbit hole goes. Since I'm not planning to spam this forum with a lot of threads, I decided to accumulate my questions and present my lack of knowlegde in this topic. Let me know if that's ok mods?

Rest assured, I'll do my homework before posting.

Let's begin:

I want to create a spiderweb. As far as I know, Stormshadow's Halls of the Damned is the only Quake 3 map featuring one. RTCW on the other hand has lots of spiderwebs, especially the opening level. I had a look at Stormshadow's shader and found this:
textures/storm3tourney6/wolfcobweb
{
qer_editorimage textures/storm3tourney6/cobweb2.tga
//qer_trans 0.9
surfaceparm alphashadow
surfaceparm nomarks
surfaceparm nonsolid
cull disable
deformVertexes wave 10 sin 0 2 0 0.2
{
map textures/storm3tourney6/cobweb2.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen identity
// rgbGen vertex
}
}
The shader refers to this image:

Image

I copied the shader, edited all relevant paths and grab a spiderweb from the Internet:

Image

I figured since the background is also black, this should work. It doesn't. This is the ingame result:

Image

It's semi transparent. The problem I'm guessing is in the image I used. I probably have to take some steps to remove the black, leave only the white and make it less bright. Which is strange since Stormshadow's image is about the same (although less bright). What am I missing here?
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!
themuffinman
Posts: 384
Joined: Fri Mar 05, 2010 5:29 pm

Re: How to - Technical Discussion

Post by themuffinman »

Does your texture have an alpha channel?
dONKEY
Posts: 566
Joined: Mon Oct 15, 2001 7:00 am

Re: How to - Technical Discussion

Post by dONKEY »

I'm insulted :p
I think the last 5 maps I made had spiders webs...the CTF map I did for the last MSG comp had a spider hanging off the bottom.
Infernis
Posts: 615
Joined: Thu Feb 17, 2005 12:00 pm

Re: How to - Technical Discussion

Post by Infernis »

@TheMuffinMan: No, it doesn't. Currently Googling what that is and how it's made.
@Donkey: You liar! I can't name a single map of yours in which I've seen it and I've played a fast amount. Names, dates, screenies please! Besides, how does one keep up with you anyway?
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: How to - Technical Discussion

Post by Eraser »

There's a spiderweb in my ep_survival map! :)
themuffinman
Posts: 384
Joined: Fri Mar 05, 2010 5:29 pm

Re: How to - Technical Discussion

Post by themuffinman »

An alpha channel/mask is a greyscale mask that sets the transparency of each pixel in an image from 0 (black) = fully transparent to 1 (white) = fully opaque. For Q3 it can only be used for TGA files, but ioQ3/QL there's the PNG format that gets rid of the need of dealing with alpha channels. What graphics software do you use?
Infernis
Posts: 615
Joined: Thu Feb 17, 2005 12:00 pm

Re: How to - Technical Discussion

Post by Infernis »

Sorry Eraser, not exactly what I'm looking for. Thanks for the headsup though. I was thinking more of the Wolfenstein example or the one below, minus all the crap in it:

Image

MuffinMan: I have Photoshop CS4.
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!
themuffinman
Posts: 384
Joined: Fri Mar 05, 2010 5:29 pm

Re: How to - Technical Discussion

Post by themuffinman »

Import that cobweb2.tga into Photoshop. That box in the lower right of the screen (where it shows image layers), there's a channels tab up top. If you click that and scroll down you'll come across the alpha channel (probably called Alpha 1), that's the kind of thing you need. There's a button somewhere below that box that'll let you create the alpha channel for your own image.
Infernis
Posts: 615
Joined: Thu Feb 17, 2005 12:00 pm

Re: How to - Technical Discussion

Post by Infernis »

Thanks MuffinMan!

Image
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!
Infernis
Posts: 615
Joined: Thu Feb 17, 2005 12:00 pm

Re: How to - Technical Discussion

Post by Infernis »

Next question.

I have several models of which I want to change the texture. Googling has taught me that you can open the model files with notepad and then change the texture paths to the new texture. Obsidian quote:
If you open up the .ASE file in a text editor, you'll see something like the following:

Code:

The important lines are the entries for *MATERIAL_NAME, *MAP_NAME and *BITMAP. The values of these should be the same name as your shader or texture path. Note the forward slashes.

Q3Map2 actually reads *BITMAP, so make sure this is correctly pointing to your shader. If it is left as the default texture that 3dsMax uses, Q3Map2 will automatically truncate and adjust this line, assuming that the texture path and shader name is actually the same thing (not always the case).

GtkRadiant uses either *MATERIAL_NAME or *MAP_NAME, I forgot which. I'm in the habit of checking the .ASE file after export and changing all three to the same.
I did that, but still the texture doesn't show. Are there any other requirements to the texture or the texture location?
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: How to - Technical Discussion

Post by obsidian »

Is the model using a shader?

Shader files logged in shaderlist.txt?

Are you using forward slashes "/" and making sure the texture path is correct?
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Infernis
Posts: 615
Joined: Thu Feb 17, 2005 12:00 pm

Re: How to - Technical Discussion

Post by Infernis »

The shader file wasn't logged in the shaderlist. Problem fixed. Apparently you can only text edit .ASE files?
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!
dONKEY
Posts: 566
Joined: Mon Oct 15, 2001 7:00 am

Re: How to - Technical Discussion

Post by dONKEY »

No. You can import them into your 3d model app of choice and directly edit the mesh also
Infernis
Posts: 615
Joined: Thu Feb 17, 2005 12:00 pm

Re: How to - Technical Discussion

Post by Infernis »

I wouldn't know how to do that. A friend of mine is very good at modelling but he uses Maya. Unfortunately, Maya doesn't support .ASE files and most converters are obsolete. He can create an .md3 file but I can't change the texture paths and I don't want to trouble him in finding out how he can edit the mesh so that it works in Quake (he's already doing me a favor).

He can export to .OBJ. I installed the trial version of 3DS Max because that supports .ASE but somehow opening an .OBJ file from Maya doesn't mean I can save it as .ASE in 3DS Max (which is probably due to my lack of knowledge). I tried several converters but Radiant sees the models but loads it as empty entities. Any suggestions?
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: How to - Technical Discussion

Post by CZghost »

@Infernis:
I'm using Milkshape 3D (which is some kinda of shareware, too), you can download 30-day trial version for free, if you decide you want to use it longer, then go to full version (buy a license for about $250). Not sure it's avaible to export an ASE model, but you can work with native format of MS3D file and then export to Quake3's native model format, MD3.

If you are making a model where it's not important precise texture align (basicaly item models with environment mapping), then you can use the built-in texture aligner (basic aligner avaible to align only in proper decal projections). If you make mapmodels, you must download external UV mapping editor (I use LithUnwrap, completely free) that has some extending texture mapping options (spherical, cylindrical, box, planar and from camera /use model preview to enable that option/).
You can also edit position of each vertex around the UV mapping workspace. When done your UV map, don't forget to save it as MS3D. Then export UV map to images (make separated images of each mesh, when it's overlapping and you wish to use different textures for it).

Make proper textures based on exported UV maps and load saved model in Milkshape. Load textures to see, how it looks like.

Then use exporter function (MD3): First, you must use quake control file generator (generates QC file; Tools > Quake III Arena > Quake control file generator). It asks you to directory for saving the file, choose the same directory, which you have saved the MS3D file (if you are working with proper PK3 directory system). Text editor will open and you're able to determine the final model's dirrectory and texture directory for each mesh. Edit only the paths and file names (don't even change the extension, even if you have JPG files instead of TGA, the game will look for both and load the proper, TGA has the priority before the JPG). When you have right settings for the model and each mesh, save the file with the same filename as you have named the model in the file. Then export the MD3 file (File > Export > Quake III Arena > MD3). Save it in the same directory, you have saved the control file with the same name as control file (with md3 extension; the name you filled in the control file as model name). Your model is complete...
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
Infernis
Posts: 615
Joined: Thu Feb 17, 2005 12:00 pm

Re: How to - Technical Discussion

Post by Infernis »

Thank you for that elaborate answer CZGhost. It's always nice to see someone putting their time in to help a complete stranger. I'm going to save your suggestion. First I'm going to try the Blender approach that Muffinman suggested (also thanks). I've got a little bit experience with Blender and perhaps that will make it easier :)
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: How to - Technical Discussion

Post by obsidian »

Infernis wrote:Apparently you can only text edit .ASE files?
If all you need to do is change the texture/shader path to a different texture, yes you can text edit an ASE file easily enough. On the other hand, if you need to modify the model mesh, then you'd have to be some kind of vector math savant to text edit the model.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Infernis
Posts: 615
Joined: Thu Feb 17, 2005 12:00 pm

Re: How to - Technical Discussion

Post by Infernis »

Hey Obs, yeah that's it. Too bad it doesn't work the same for .md3 files. Would save me a ton of trouble :)
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!
User avatar
Theftbot
Posts: 483
Joined: Thu Oct 08, 2009 4:03 am

Re: How to - Technical Discussion

Post by Theftbot »

Technically you could misc_model a md3 and bake it to a ase w/q3map2
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: How to - Technical Discussion

Post by obsidian »

... and go from ASE to MD3 with q3data.exe
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Infernis
Posts: 615
Joined: Thu Feb 17, 2005 12:00 pm

Re: How to - Technical Discussion

Post by Infernis »

So I could load the .md3 model in the center (0,0,0) of an empty map. Surround it by a caulk box, add an info_player_deathmatch, save it, compile it with "bsp -meta -patchmeta -subdivisions 6" and then compile the new.bsp with "bsp -convert" and I've got myself an .ase model wich I can then text edit to use the right texture?
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!
Bliccer
Posts: 341
Joined: Thu Nov 26, 2009 4:27 pm

Re: How to - Technical Discussion

Post by Bliccer »

Iirc you can also edit paths with this little tool:

http://www.quakeunity.com/file=481
themuffinman
Posts: 384
Joined: Fri Mar 05, 2010 5:29 pm

Re: How to - Technical Discussion

Post by themuffinman »

You can hex edit shader names in any md3...
dONKEY
Posts: 566
Joined: Mon Oct 15, 2001 7:00 am

Re: How to - Technical Discussion

Post by dONKEY »

You can use the shader swap command can you not and do it on the fly?
Post Reply