Lightstyles & Bump mapping Problem?!?


(Maxell_cz) #1

I’m working on my new map and when I tryed put a bump mapping in one room in which where lightstyled light this light stop working. Maybe I’ve made some mistakes in shaders, I’m not sure.

Bump sharder:


textures/mxl_norm/tester_bump
{
	qer_editorimage textures/mxl_norm/tester.tga
	q3map_normalimage textures/mxl_norm/testernorm.tga
	
	
	{
		map textures/mxl_norm/tester.tga
		rgbGen identity
	}
	{
		map $lightmap
	}
	{
		map textures/mxl_norm/tester.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

My light styles & entity setup:



"classname" "worldspawn"
"_style1alphaGen" "wave sin .5 .3 .25 1.5"
"_style1rgbGen" "wave noise 0.5 1 0 5.37"
...

...
"_color" "1.000000 0.995560 0.223941"
"light" "700"
"origin" "232 -176 152"
"classname" "light"
"style" "1"
...

And this is shader generated by q3map2:


// Custom shader file for xxx5__.bsp
// Generated by Q3Map2 (ydnar)
// Do not edit! This file is overwritten on recompiles.

xxx5__/35B318D14C33B602B4817B7BC31A35D3
{
	qer_editorimage textures/mxl_norm/tester.tga
	q3map_normalimage textures/mxl_norm/testernorm.tga
	{
		map textures/mxl_norm/tester.tga
		rgbGen identity
	}
	{
		map $lightmap
	}
	{
		map textures/mxl_norm/tester.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
}


Lightmaps are also saved properly in maps/<mapname>. No errors are reporeted in game(Quake3).

Thanx for help!


(ydnar) #2

textures/mxl_norm/tester_bump
{
	qer_editorimage textures/mxl_norm/tester.tga
	q3map_normalimage textures/mxl_norm/testernorm.tga
	
	{
		map $lightmap
	}
	q3map_styleMarker
	{
		map textures/mxl_norm/tester.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

Note the first texture pass you had was unecessary.

y


(Maxell_cz) #3

Oh such stupid mistake. :banana:

Thanx you very much ydnar! :drink:


(Tigris) #4

Another thing I think is worth repeating: DO NOT USE RADIOUSITY WITH BUMPMAPS- it contradicts itself.


(WadeV1589) #5

How does it contradict itself? Radiosity is the reflection of light from surfaces taking the color of the surface with it while bump mapping is making a flat surface appear to be 3D by smart use of textures and lighting.


(ydnar) #6

y


(Tigris) #7

Hm, sorry- Some time ago I at least thought that whenever I used radiousity in combination with bump-mapped textures. After compile it appeared to me that the details normally gained by bump-mapping were lost. Whenever I compiled without radiousity the details reappeared. I thought that perhaps the radiousity neglected the bump-maps as casting light onto/into the shadows normally cast by BM’s. My bad.


(nUllSkillZ) #8

I’ve tried lightstyles with ET.
But I have a problem
The flickering light (style 1 / 6) doesn’t work with bumpmapped textures.
The texture stays black.
The shader I’ve used is the one ydnar has posted.
Version of Q3map2 is V 2.5.15 .