Has anybody tried out to create a Doom3 (player-) model using that cartoon "-shading" technique connor o'kane developed for Quake III? (
http://www.cokane.com/)
I build a Quake III Arena mod using this style and would like to rebuild (or even better: convert;-) it to run on the Doom3 engine.
- Yes, just to draw more attention to it! ;-)
http://monkeykombat.planetquake.gamespy.com/
Replies
Edit: BTW, you'll need cubemaps this time.
- Thanks for the quick answer! ... Which brings up new questions:
Are "envmap" and "normalmap" shaderstages, working within the game-engine? Connor O'kane's technique is pretty basic: You clone the model, make it a little bigger, put a black texture on it and flip the normals to the inside. I did that for all player models, weapons and mapobjects.
The map itself was build of func_groups with the "_celshader" key on them.
Did I get you right, and even the cartoon effect for the models can be generated by the game-engine (not "manually" in a 3D-program, as I did)?
The other part is adding the envmap to give the objects the proper shading instead of having them use gouraud shading or being plain fullbright, that could be done with modifying the normalmap shader, too. I don't think you'll need that for level geometry, though. That tends to stay in one place and you can manually paint the shading on that.
models/players/affe/affe_text_01
{
{
map models/players/affe/affe_text_01.tga
rgbGen identity
}
{
map models/players/affe/shade.tga
blendfunc filter
rgbGen identity
tcGen environment
}
}
The first texture (containing the models main colors and a black square for the outlines) isn't effected by any lights in the scene.
The second stage creates a dynamic ("flat") shadow on the models' surfaces by throwing a half-white half-grey texture to it.
Would this (or something based on the same principal) work on the Doom3 engine?
I'm pretty stupid in those technical issues (- right, grafic-designer...) and would be glad if the whole thing could be kept as close as possible to what I already have.
- Thanks again!
<font class="small">Code:</font><hr /><pre>models/characters/player/kdr_hitomi/solid_toon
{
noselfshadow
diffusemap models/characters/player/kdr_hitomi/black.tga
{
blend add
map models/characters/player/kdr_hitomi/solid_d.tga
}
bumpmap addnormals(models/characters/player/kdr_hitomi/solid_local.tga,models/characters/player/kdr_hitomi/null.tga)
{
blend filter
texGen normal
cubeMap models/characters/player/kdr_hitomi/toon.tga
}
}</pre><hr />
The diffuse has to be black and the texture added over that in order to make it fullbright. The envmap has to be a cubemap (the toon.tga here doesn't actually exist, there are six textures with names like toon_pz.tga). If you want a black outline done via envmapping you'll need a camera oriented cubemap. I don't think you should use envmaps on level geometry, though. That can be hand painted.
For specifics, read the reference.
Is it just an example or does it belong to a model you build?
Whatever I tried to get your material running failed. In fact I think I didn't understand the second part - the bumpmapping - and what textures have to be set in there.
Could you help me with that again?
At least I managed to put something together that isn't too far away from what I have in mind (i.e. close to what I build for Q3A):
http://monkeykombat.planetquake.gamespy.com/cartoon_scr_02.jpg
This is the syntax of the materials I created for it:
textures/bb2/outline
{
qer_editorimage textures/bb2/outline.tga
noShadows
noOverlay
sort decal
diffusemap textures/bb2/outline.tga
}
textures/bb2/gelb_01
{
qer_editorimage textures/bb2/gelb_01
sort close
noselfshadow
diffusemap textures/bb2/grau.tga
{
blend add
map textures/bb2/strand_gelb_01.tga
}
}
The cartoon outlines are created by sorting a (slightly bigger) black box behind a colored one. - Pretty basic and maybe not what should be used in the end.
As you can see from the screenshot, this method has two "bugs" in it:
Although I managed to get shades to the colored boxes (by using a grey texture as diffusemap instead of a black one), the effect is ruined by the "outline"-box which darkens the whole inside.
And secondly: Weapon impact is nearly invissible on that surfaces and I have no idea why. The floor material has teh same syntax and it worked there.
The "sort decal" bi may be a problem, after all that's what I'd expect the impact effects to have, too. Would "sort far" on the outline and no sort option on the box work? What happens if you spawn entities in there?
The effect seems to work with other entities. If they are inside a box, they are invissible, if they are infront of they aren't.
But anyway: My method is pretty unellegant, as i have to draw all entities twice. Besides that the outline runs along the border of all entities instead of deviding them.
So I'd still like to understand how your example material would work.
- The textures become GIGANTIC (or blurr at the edges),
- You see "out"lines withIN a surface, which might be acceptable for cubes, but I think would look bad on more complex shapes.
Do you have an idea how to keep the outer shapes from darkening the inner ones? Even if they have a "noShadows" key on them, they prevent the light from brightening the surfaces of the boxes inside.