Bumpmaps

Posted By: Generik

Bumpmaps - 08/13/04 01:02

What is the quality and style of TGA file you need my bumpmaps display some weird effects. Is there a way to fix the lighting this is with normal dynamic lights. Is there no way or correcting it.


Heres my normal model with shaddow and no shaddow there both the same.



Heres the round model. No shaddow



Heres the back of the same model ewwww....



Anyways to display incorporate the light on the model. Or would i have to make myself a material for a shaded model.

Any ideas.
Posted By: Nadester

Re: Bumpmaps - 08/13/04 01:10

What effect are you using for the bumpmapping? Is it Oliver's? His has lighting regardless of whether the actual object is lit or not. Conitec's, on the otherhand, does not.
Posted By: Generik

Re: Bumpmaps - 08/13/04 01:15

Im actually using Olivers.... i guess ill try out conitecs. Where is theres found.
Posted By: Nadester

Re: Bumpmaps - 08/13/04 01:21

Code:
// the following code creates a material that adds DOT3 bumpmapping

// to a model
bmap reptile = <scales.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 string
effect = "
// declare the used textures and variables
texture entSkin1; // 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] = <entSkin1>;
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] = <entSkin1>;
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);
}




Personally, Oliver's effect is a little nice (I think). It more so compares to a good fallback for Normal Mapping. But Conitec's is more compatable, and it has no default lighting.

Btw, is that on level geometry? Could you post the script you used for it if it is? Thanks!
Posted By: Generik

Re: Bumpmaps - 08/13/04 01:35

Its on models right now working towards geometry. Thanks for the code. One more question while im here off topic though Nade... stencil buffer shadows how do I turn them on for the shaddow of dynamic light to display the shaddow on the wall and not slip throutgh the flor.
Posted By: Generik

Re: Bumpmaps - 08/13/04 02:34

nm i figured it out... yuck.
Posted By: Buluen

Re: Bumpmaps - 08/13/04 06:42

personally I think the back side looks cooler then the lighted part...just my opinion.. I wish I could get bumpmapping to even work.
© 2024 lite-C Forums