PDA

View Full Version : My Tutorial: How to use Q3Map2 for JK2


Wudan
11-13-2002, 07:23 PM
Because I wanted to give back to the community, and because I'm a masochist, I wrote a webpage on how to use Q3Map2 to compile JK2 maps. Hope y'all like it, and you're free to send me suggestions, and complaints.

http://users.sisna.com/wudan/q3map2.html

WhiteShdw
11-14-2002, 11:48 AM
I'd like to add something :). A lot of people will only compile using the compile menus in JK2 Radiant or GTK radiant. You can also do this with Q3map2, by creating new compile menu items in the project settings.

For example:

My compile line for Fullvis with Sof2map in GTK Radiant looks like this:

C:\PROGRA~1\LUCASA~1\STARWA~1\GameData\Radiant/sof2map -bsp $ &&
C:\PROGRA~1\LUCASA~1\STARWA~1\GameData\Radiant/sof2map -vis $ &&
C:\PROGRA~1\LUCASA~1\STARWA~1\GameData\Radiant/sof2map -light $

And my compile line for Fullvis with Q3map2 in GTK Radiant looks like this:

C:\PROGRA~1\LUCASA~1\STARWA~1\GameData\Radiant/q3map2 -meta -game jk2 $ &&
C:\PROGRA~1\LUCASA~1\STARWA~1\GameData\Radiant/q3map2 -vis -game jk2 $ &&
C:\PROGRA~1\LUCASA~1\STARWA~1\GameData\Radiant/q3map2 -light -fast -patchshadows -game jk2 $

Note that the bold sections are different from the original lines based on sof2map

Wudan
11-14-2002, 01:32 PM
OMG teh 1337ness!

I'd do a section on that right now, but I keep thinking that GTKRad 1.2.11 is coming out, it'll werk with Q3map2 out of the box :)

WhiteShdw
11-14-2002, 03:54 PM
Yeah, I'm looking forward to that.

But some people still use JK2 radiant for some reason and they refuse to use anything else. :)

Kengo
11-14-2002, 08:46 PM
I know this is a bit stupid of me, because Q3map2 has been mentioned a lot, but the discussion about it seems to have passed me by, could you clarify what the benefits of using it over Sof2map are?

acdcfanbill
11-15-2002, 06:14 AM
off the top of my head, I think I remimber better lighting in your maps... could be other things also, search down this forum a bit, im sure there is a big thread dealing with it...

Emon
11-15-2002, 10:51 PM
Hmm, I'll make a list of major advantages...

Improved light quality and light compile speed. Extremely drastic speeds, like upwards of 50x faster.

Improved BSP with the -meta option, improves efficiency by combining surfaces, removing coincident verticies and lowering face count and vert count across the map.

Hundreds of new features like fur shading, phong shading, cel shading, bumpmapping, support for 3DS and ASC models, foghull support, tons and tons and tons of other stuff. Check out www.shaderlab.com/q3map2 for more info, check the manual.

Gabrobot
11-16-2002, 04:10 AM
When I compiled my SP level in Q3map2, my still lava shader didn't produce any light, and my flowing lava shader looked like pink lemonade!:D

Needless to say I've gone back to Sof2map, which compiles my level without any problems in that regard!

Emon
11-16-2002, 11:10 AM
Then you're doing something wrong. Check the manual, look at the shader keywords.

Wudan
11-16-2002, 12:47 PM
Post a copy of your shader - it's likely that there's a better way to produce the same effect.

I'll post my lava shader, if'n you like. I copied mine from one that Emon apparently wrote for the Acid Storage Facility 2, and modified it so that it was lava.

Gabrobot
11-16-2002, 09:56 PM
I'm actually using the Q3Map2 Toolz frontend, and here's my shader:

---------------------------------------------------------

textures/volcanic/Lava_still
{
lightcolor ( 1 0 0 )
qer_editorimage textures/volcanic/lava2
q3map_surfacelight 500
q3map_tesssize 256
surfaceparm nonsolid
surfaceparm lava
surfaceparm water
surfaceparm fog
surfaceparm trans
q3map_material Water
q3map_nolightmap
q3map_onlyvertexlighting
q3map_vlight
fogparms ( 0.105098 0.147157 0.0431373 ) 128.0
cull disable
deformvertexes wave 100 sin 0 1 0 1
{
map textures/volcanic/lava2
blendFunc GL_ONE GL_ZERO
rgbGen exactVertex
alphaGen const 0.9
tcMod turb 0 0.08 0.04 0.08
tcMod scroll -0.05 -0.001
}
{
clampmap gfx/sprites/fog
surfaceSprites effect 20 8 50 200
ssFademax 1300
ssFadescale 2
ssVariance 2 1
ssWind 10
ssFXDuration 5000
ssFXGrow 2 2
ssFXAlphaRange 0.75 0
blendFunc GL_ONE GL_ONE
detail
}
}

textures/volcanic/lavaflow
{
lightcolor ( 1 0 0 )
qer_editorimage textures/volcanic/lava2
surfaceparm nonsolid
q3map_nolightmap
q3map_onlyvertexlighting
cull disable
{
map textures/volcanic/lava_test
blendFunc GL_ONE GL_ZERO
rgbGen exactVertex
alphaGen const 0.9
tcMod scroll 0 -1
tcMod scale 3 3
}
{
map textures/volcanic/lava2
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaGen const 0.33
tcMod scroll 0 -1
}
{
map textures/volcanic/lava2
blendFunc GL_DST_COLOR GL_ONE
tcMod scroll 0 -1
tcMod scale 3 3
}
}

---------------------------------------------------------

The still lava is just a modified version of one of the Yavin 4 water shader. The flowing lava is a modified Yavin 4 waterfall shader.

(note: I just did a standard fullvis compile of my level)

Kengo
11-16-2002, 10:39 PM
Originally posted by Emon
Hmm, I'll make a list of major advantages...

Improved light quality and light compile speed. Extremely drastic speeds, like upwards of 50x faster.

Improved BSP with the -meta option, improves efficiency by combining surfaces, removing coincident verticies and lowering face count and vert count across the map.

Hundreds of new features like fur shading, phong shading, cel shading, bumpmapping, support for 3DS and ASC models, foghull support, tons and tons and tons of other stuff. Check out www.shaderlab.com/q3map2 for more info, check the manual.

Ouch, some pretty damn big advantages!

MilesTeg
11-17-2002, 09:19 AM
@emon: do you know if lightstyles (for light entities) are supported in the current version of q3map?

I really would love to work with q3map but I need this feature for my map :(

Wudan
11-17-2002, 11:05 AM
I've updated the tutorial, now you can access that page from my index page as well, I just made a frame for my index page so you can skip betwixt the 2.

Anyway, I've been reading up on the Q3Map2 Toolz frontend, it sounds pretty good, so I'm going to link to it and post it as an alternate way of compiling.

Ok, so then, I guess the next project is to make a list of powerful advantages over SOF2MAP, then a list of eye-candy, then we'll start with the 'how-to' create eye-candy', with lots of links and quotes from ydnar and stuff.

Emon
11-17-2002, 11:44 AM
Hmm, no, I don't think lightstyles are support yet.

Wudan
11-17-2002, 04:30 PM
At least, not in the JK2 sense - what about that one kind of lightmap/style thing he was working on?

I've been reading the Q3Map2 threads again (you learn something new every time)

So, the first Q3Map2 features I want to document are:

Alphashadows
Cel Shading
FogHull
LightMapScale
Suns

... there's more stuff, I just can't think of it ... :(