Q3map2 bumpammping question.


(Death knight) #1

Hiya there.
I have got two questions about bumpmapping.
First: What the h… is the thing with the worldspawn.I don’t have an idea where or what I should do there.
Second: How is bumpmapping at win2k?Can this workfine?
Now about my bumps.
I have two textures the standart and the bump
Then the shader:
textures/concrete/block_original
{
qer_editorimage textures/concrete/block_original.jpg
q3map_normalimage textures/concrete/block_bump.tga
{
map $lightmap
}
{
map textures/concrete/block_original.tga
blendfunc gl_dst_color gl_zero
}
}
I don’t know much about coding shaders.
But it might be nice if you can tell me if I’m right with that here.
Now the two textures:

I also don’t know if I can use a jpg file but I think so.It might be better I think if the two textures saving as a tga file and have alpha channels filled with 50% grey or white.
Then in yndars map converter at light.
Tresh:5
Super:2
This might be right I think.
But something is wrong.Please tell me what the h…I make wrong there.
Thanks in advance.
Later, reptile.


<font size=-1>[ This Message was edited by: Death knight on 2002-11-29 17:29 ]</font>


(Death knight) #2

is this the right one forum for posting this to get some answer?
Thanks in advance.
later death knight.


(Death knight) #3

I’m waiting ,I’m waiting…
well seems like I have to shut down bumpmappning for a while until doom3 is here.
cu later…


(omnix32) #4
 I have never done bump mapping. the command for the phong stuff is "-thresh .5" not tresh. If using wolfcompile there are some things that need updated on it. 

textures/bumpy/graytex_01a
{
qer_editorimage textures/bumpy/graytex01.tga
q3map_lightmapsamplesize 512x512
q3map_normalimage textures/bumpy/bumpmap_pits.tga
{
map $lightmap
}
{
map textures/bumpy/graytex01.tga
blendFunc GL_DST_COLOR GL_ZERO
}
}

posted shader by Grand Nagus

this displayed on a func_group with _lightmapscale values set.
may try to change q3map_lightmapsamplesize 512x512 to fit on a normal brush. Thats about all I know.
http://www.rubberbug.com/texture.htm
for bump map face…
omnix32…


(Paracyte) #5

You’ve probably been told to go to the worldspawn entity and use _lightmapscale.
Not a good idea. I suggest you turn the brush that this bumpmap texture is applied to into a func_group. In the func group put “_lightmapscale” as the key, and “0.25” as the value. This just makes sure that the compiler creates highly detailed lightmaps only on the areas you put bumpmapped textures on so that you can see the bumps on the image clearly.

The shader looks like it should work fine, although you can add in q3map_lightmapsamplesize 512x512 like omnix32 posted (it should be ok without it though).

If you are still having trouble figuring it out, try reading some of the posts in this thread from the Elite Force mod community board. Theres some very useful information about bumpmapping in q3 engine maps there.

<font size=-1>[ This Message was edited by: Paracyte on 2002-12-03 02:50 ]</font>

<font size=-1>[ This Message was edited by: Paracyte on 2002-12-03 02:52 ]</font>


(Hewster) #6

Hi,

I’ve been playing with clipping models /
bumpmapping & vertex shadows recently.
Here is a shader I created that enables all
three…

textures/hewster_terrain2/hew_rock01_bump1c
{
qer_editorimage textures/hewster/terrain/hew_rock01_thumb_clip_bump.tga
surfaceparm gravelsteps
tesssize 128
q3map_lightmapsamplesize 4
q3map_splotchfix
q3map_nonplanar
q3map_shadeangle 70
q3map_forcemeta
q3map_clipModel
q3map_vertexshadows
q3map_normalimage textures/hewster/terrain/hew_rock01_bump.tga

{
	map $lightmap
	tcGen lightmap
	rgbGen Vertex
}	
{
	map textures/hewster/terrain/hew_rock01_tex.tga
	blendFunc GL_DST_COLOR GL_ZERO
	rgbGen identity
}

}

I tried using _lightmapscale, but found it
better to use q3map_lightmapsamplesize… A
setting of 4 gives ok bumpmapping, lower
to give more defined shadows / bumpmapping.

Pics to follow…

Hewster


(omnix32) #7

waiting for pic over here. Thanx for the info Hewster.


(ydnar) #8

Don’t have rgbGen vertex on a lightmap pass. That’s multiplying the lighting data twice. Use rgbGen identity.

y


(Hewster) #9

Ok, I understand :slight_smile: (Hewster takes another step toward enlightenment)

I have lost all the work I was doing on this a few weeks ago, due to a
very unlucky hardware failure (dual HD failure !)
However I’m looking at this again…

Ydnar, or anyone… this is what I’m trying to do…
I would like to be able to bumpmap, autoclip, lightmap & vertex lite
an ase model… is this asking too much ?
I can do everything excpt, I cannot combine nice vertex shadows and
lightmapped shadows in 1 shader.
I know not many peeps use vertex lit mode, but its a real same
that the mappers go to all the effort to get the lighting / shadows right
in their maps, and in some cases the ‘shadows’ are important to
gameplay, for it all to go to pot when the player uses vertex lit mode.

I’m gona have a play myself, and see what i can do… the only other
option i can think of is to create 2 shaders, 1 for vertex lit, and 1 for
lightmapped. then write a routine in the code that switches the shaders
according to the players r_vertexlight cvar…

Comments anyone ?

Hewster


(Codey) #10

Well there is that “vertexremapshader” keyword for the worldspawn, but last I heard this doesn’t work for RTCW???


(Hewster) #11

mmm that does sound like what I’m lookin for :slight_smile:

I rekon the reason it don’t work is cos the swapshader routine in the code
doesn’t work, although I have re-implemented it on our WildWest mod :wink:

Bumpmapped pic’s:


I’ve made a sample map showing the swapshaders working, see here:
http://www.deevickery.btinternet.co.uk/ww/forum_stuff/q3map2/bumpy1.htm
I have also outlined the shaders I used along with how i got there.

Swapping from lightmapped to vertex is perfect, but there is a problem
with when swapping from vertex back to lightmapped though (see link)

But surly there is another way to get a good result without having to do
all this? a shader blend function that will allow a good fix of the vertex
shadows and bumpmapping ? If so i can’t find it, so this is my only
solution.

Death knight if you use this bumpmap shader:

textures/hewster_terrain2/hew_rock01_bump1c
{
  qer_editorimage
  textures/hewster/terrain/hew_rock01_thumb_clip_bump.tga
  surfaceparm gravelsteps
  tesssize 128
  q3map_lightmapsamplesize 3
  q3map_splotchfix
  q3map_nonplanar
  q3map_shadeangle 61
  q3map_forcemeta
  q3map_clipModel
  q3map_vertexshadows
  q3map_lightmapGamma 0.72
  q3map_normalimage textures/hewster/terrain/hew_rock01_bump.tga
    {
      map $lightmap
      rgbGen identity
      tcGen lightmap
    }
    {
      map   textures/hewster/terrain/hew_rock01_test.tga
      blendFunc filter
      rgbGen identity
      tcGen lightmap
    }
}

Then it will work great when playing in lightmapped mode, but look
full bright when played in vertex lit mode :frowning:
Anyone know how to fix this ?

Hewster

edit… pic update and typo’s