Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (vicknick), 1,293 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 7 1 2 3 4 5 6 7
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 Offline OP
Senior Expert
ello  Offline 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.de
quoted: 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: ello] #16944
09/17/03 03:49
09/17/03 03:49
Joined: Mar 2002
Posts: 801
Switzerland, Zürich
napo Offline
Developer
napo  Offline
Developer

Joined: Mar 2002
Posts: 801
Switzerland, Zürich
I dont think the GeForce 2 supports 3 Textures, so I think the fallback technique will be used.

If it's too shiny, maybe it's because of the power of the material is too small (the less power, the more specular reflection ).

BTW: For 2 pass Dot3 Bumpmapping you should render the bumpmap and the diffuse color in one pass, and then the skin with alpha blending for simulating the "addsigned" Colorarg. You can also render bumpmap and skin in the first pass and then in a second pass diffuse color, but I think it's worst.

Re: dot3 bumpmapping example [Re: napo] #16945
09/17/03 04:18
09/17/03 04:18
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline OP
Senior Expert
ello  Offline OP
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
thanx for the explanation.
i think the days of my geforce2 will be over very soon..


www.earthcontrol.de
quoted: 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: ello] #16946
09/17/03 06:20
09/17/03 06:20
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I believe Geforce2 supports 3 stages and 2 textures. You can check this with the Caps Viewer. But I suppose that it does not support Dot3 bumpmapping. It probably supports only normal bumpmapping, with texture coordinate displacement.

Re: dot3 bumpmapping example [Re: jcl] #16947
09/21/03 02:41
09/21/03 02:41
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline OP
Senior Expert
ello  Offline OP
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
today i got my radeon9600pro and the firt thing was to try the script above. but i still don't see any bumpmapping. there is only small difference with the lighting. am i doing something wrong or did i missed something. i have directx9.0 installed which came with the drivercd for the radeon.




www.earthcontrol.de
quoted: 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: ello] #16948
09/21/03 03:57
09/21/03 03:57
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
maybe your bumpmap isn't intense enough? you could try to experiment with the scale1 and the bmap_to_normals amplification value... the standard bumpmap effect isn't that spectacular though!

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 Offline OP
Senior Expert
ello  Offline 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.de
quoted: 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: ello] #16950
09/23/03 09:24
09/23/03 09:24
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I don't have a Radeon8600 right here, but this is the beta bumpmapping example on the Radeon8500:



with the emboss1.tga from the DirectX SDK as bumpmap.

Radeon8600 supports bumpmapping, so it must work on your system also. Check whether you're running in A6 mode - effect scripts are not supported in A5 mode.

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 Offline OP
Senior Expert
ello  Offline 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.de
quoted: 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: ello] #16952
09/24/03 15:19
09/24/03 15:19
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline OP
Senior Expert
ello  Offline OP
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
does anybody have a clue what is going on here?
I tried different textures, different standardmodels.
does it work fine for the rest of you all?


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Page 1 of 7 1 2 3 4 5 6 7

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1