3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
dot3 bumpmapping example - please help
#16943
09/17/03 03:40
09/17/03 03:40
|
Joined: Oct 2002
Posts: 8,939 planet.earth
ello
OP
Senior Expert
|
OP
Senior Expert
Joined: Oct 2002
Posts: 8,939
planet.earth
|
i added the example script of the readbeta.txt to an entity, but the only thing i recognize is that the surface gets somehow shiny.
is this because of my geforce2 and still with my new radeon9600?
here is the code:
Code:
bmap reptile = <noise64.tga>;
material mat_bump
{
skin2 = reptile; // set a reptile skin
scale1 = 0.2; // factor for the skin scale at stage 0
// define a material effect
effect = "
// declare the used textures and variables
texture texSkin1; // the entity skin
texture mtlSkin2; // the bump map
dword mtlSkill1; // the light vector
// default technique
technique bump_dot3
{
pass P0
{
// set texture stage states
Texture[0] = <mtlSkin2>;
Texture[1] = <texSkin1>;
TextureFactor = <mtlSkill1>;
ColorArg1[0] = Texture; // stage 0 = bumpmap
ColorOp[0] = DotProduct3;
ColorArg2[0] = TFactor;
ColorArg1[1] = Texture; // stage 1 - skin texture
ColorOp[1] = AddSigned;
ColorArg2[1] = Current;
ColorArg1[2] = Diffuse; // stage 2 - lighting
ColorOp[2] = Modulate2x;
ColorArg2[2] = Current;
}
}
// fallback technique for devices that do not support bumpmapping
technique fallback
{
pass P0
{
// set texture stage states
Texture[0] = <texSkin1>;
ColorArg1[0] = Texture; // stage 0 = skin texture
ColorOp[0] = Modulate2x;
ColorArg2[0] = Diffuse; // modulate by lighting
}
}
"; //end of the effect string
}
starter mat_bump_init {
// initialize the material properties
vec_set(mat_bump.ambient_blue,mat_model.ambient_blue);
vec_set(mat_bump.diffuse_blue,mat_model.diffuse_blue);
vec_set(mat_bump.specular_blue,mat_model.specular_blue);
mat_bump.power = mat_model.power;
// create the normals map for DOT3 bumpmapping
bmap_to_normals(mat_bump.skin2,2);
// set a lighting vector for DOT3 bumpmapping
mat_bump.skill1 = pixel_for_vec(vector(200,200,200),100,8888);
}
entity* test;
action test_it {
test=me;
my.material=mat_bump;
my.skill1=sign(random(2)-1);
my.skill2=sign(random(2)-1);
my.skill3=sign(random(2)-1);
while(1) {
my.pan+=my.skill1;
my.tilt+=my.skill2;
my.roll+=my.skill3;
wait(1);
}
}
entity* kamera;
action player_light {
kamera=me;
my.invisible=on;
my.passable=on;
my.lightrange=230;
while(1) {
vec_set(my.x,camera.x);
vec_set(my.pan,camera.pan);
wait(1);
}
}
www.earthcontrol.dequoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
|
|
|
Re: dot3 bumpmapping example
[Re: ventilator]
#16949
09/21/03 22:09
09/21/03 22:09
|
Joined: Oct 2002
Posts: 8,939 planet.earth
ello
OP
Senior Expert
|
OP
Senior Expert
Joined: Oct 2002
Posts: 8,939
planet.earth
|
i tried many different images now for the bumpmap, only black and whites , blurred boise and i tried them as 8 bit bmp or 24bit tga, i tried different scales (0.1 .. 100) and the same on bmap_to_normals. i tried map-entities and mdl-entities. i am getting no error and no bumpmapping. there was no noticable difference at all.
i tried 3dmark 2003 and it worked fine, though i think my new graphicscard should support the bumpmapping.
is there something wrong with my update, or do i have to toggle any specific mode of a6? how did you guys get it to work. as i saw on some screenshots it does work.
please help me on this one.
www.earthcontrol.dequoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
|
|
|
Re: dot3 bumpmapping example
[Re: jcl]
#16951
09/23/03 15:31
09/23/03 15:31
|
Joined: Oct 2002
Posts: 8,939 planet.earth
ello
OP
Senior Expert
|
OP
Senior Expert
Joined: Oct 2002
Posts: 8,939
planet.earth
|
it shows a6 in the upper right corner. so i think its the right mode. i have tried everything now and i dont get bumpmapping. i dont know what to do, i am absolutely frustrated about this. thought i could have some fun with shader programming and now this.
Last edited by ello; 09/24/03 03:42.
www.earthcontrol.dequoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
|
|
|
|