Environment mapping can not display on Geforce MX.

Posted By: maxxoros

Environment mapping can not display on Geforce MX. - 06/18/05 09:06

I am using Environment mapping code and I found out it can not display on my friend PC (his VGA card is Geforce MX 440)... I wonder why this happen...Environment mapping is the most basic thing and I do not think that It can not be display...
---
Can anyone tell me why, or the Envi map in A6 only run on Geforce FX and other better VGA Card
Posted By: Christoph_B

Re: Environment mapping can not display on Geforce MX. - 06/18/05 16:18

even if it's basic, it's a shader and the 440 mx is just a bit newer version of the geforce 2, that doesn't support shaders yet.
Posted By: RJDL

Re: Environment mapping can not display on Geforce MX. - 06/19/05 09:02

yup, i think it would indeed be my VGA card (geforce 4 mx :P)
i think that's the problem why i cant display any shaders...
Posted By: XeXeS

Re: Environment mapping can not display on Geforce MX. - 06/19/05 13:47

You can do Environment Mapping also with the Fixed Function Pipeline and so without a shader so you can draw it as well on a geforce 4 MX Even on my old Geforce 2 MX Environment Mapping can be draw realy fast.
Posted By: PHeMoX

Re: Environment mapping can not display on Geforce - 06/19/05 15:52

XeXes, do you have a code example for this? I'm currently searching for a very fast environment mapping shader, but only code I've found were from ATI and that's a bit slow...


Cheers
Posted By: Pappenheimer

Re: Environment mapping can not display on Geforce - 06/19/05 21:28

Look in the Shader Index thread, Steempipe has offered one!
Posted By: maxxoros

Re: Environment mapping can not display on Geforce - 06/20/05 04:03

To Pappenheimer: Is this thread you mentioned
http://www.coniserver.net/ubbthreads/sho...part=2&vc=1
In this thread, steempipe give code for none pixel-shader-user, but he still use vertex shader and geforce MX 440 does not support this
--------
Can anyone tell me where to get this code...because to XeXeS, he still use env map only with Geforce 2
----
Thanks for your help
Posted By: XeXeS

Re: Environment mapping can not display on Geforce - 06/20/05 05:36

Here is the code for Environmentmapping with the Fixed Function Pipeline:

Code:

// Environmentmap
bmap EnvMap = <EnvMap+6.tga> // Bitmap with the environment Map

// Material
material matFFPEnvMapping
{
// Skin zuweisen
skin1 = EnvMap;

// Effectcode
effect = "

// Textures
texture mtlSkin1;

// Technique
technique EnvMapping01
{
pass pass01
{
// Setup textures
Texture[0] = <mtlSkin1>;

// Setup Texture Addressing
AddressU[0] = Clamp;
AddressV[0] = Clamp;

// Setup Textureblending
ColorArg1[0] = Texture;
ColorOp[0] = SelectArg1;

// How to use Texture coordinates
TexCoordIndex[0] = CameraSpaceReflectionVector;
TextureTransformFlags[0] = Count3;
}
}

technique fallback {
pass p0
{

}
}
";
}

// Material
material matFFPEnvMappingWS
{
// Skin zuweisen
skin1 = EnvMap;

// Effectcode
effect = "

// Textures
texture mtlSkin1;
texture entSkin1;

// Technique
technique EnvMapping01
{
pass pass01
{
// Setup textures
Texture[0] = <mtlSkin1>;
Texture[1] = <entSkin1>;

// Setup Texture Addressing
AddressU[0] = Clamp;
AddressV[0] = Clamp;

// Setup Textureblending
ColorArg1[0] = Texture;
ColorOp[0] = SelectArg1;
ColorOp[1] = Modulate;
ColorArg1[1] = Current;
ColorArg2[1] = Texture;

// How to use Texture coordinates
TexCoordIndex[0] = CameraSpaceReflectionVector;
TextureTransformFlags[0] = Count3;
}
}

technique fallback {
pass p0
{

}
}
";
}

starter ConvertEnvMapToCubeMap
{
bmap_to_cubemap(matFFPEnvMapping.skin1);
}

starter ConvertEnvMapToCubeMapWS
{
bmap_to_cubemap(matFFPEnvMappingWS.skin1);
}




I've posted two materials:

The first one only uses the Environmentmap as Texture.
The second one uses the Environmentmap and the Entityskin as Texture ( Multitexturing ) so you can see both on the entity.

Have fun
XeXeS
Posted By: XeXeS

Re: Environment mapping can not display on Geforce - 06/20/05 06:41

Hello,

I have changed the code so you can adjust the value of the Reflection in Skill1 of the matieral:

Code:

material matFFPEnvMappingWS
{

// Skin zuweisen
skin1 = EnvMap;

// Effectcode
effect = "
// Textures
texture mtlSkin1;
texture entSkin1;

// Variables
DWORD mtlSkill1;

// Technique
technique EnvMapping01
{
pass pass01
{
// Setup textures
Texture[0] = <mtlSkin1>;
Texture[1] = <entSkin1>;

// Setup Texture Addressing
AddressU[0] = Clamp;
AddressV[0] = Clamp;

TextureFactor = <mtlSkill1>;

// Setup Textureblending
ColorArg1[0] = Texture;
ColorOp[0] = Modulate;
ColorArg2[0] = TFactor;
ColorOp[1] = Add;
ColorArg1[1] = Current;
ColorArg2[1] = Texture;

// How to use Texture coordinates
TexCoordIndex[0] = CameraSpaceReflectionVector;
TextureTransformFlags[0] = Count3;
}
}

technique fallback
{
pass p0
{

}
}
";
}

starter ConvertEnvMapToCubeMapWS
{
bmap_to_cubemap(matFFPEnvMappingWS.skin1);
matFFPEnvMappingWS.skill1 = pixel_for_vec(vector(30,30,30),100,8888);
}




I've not tested this code at all so I not gurantee that it works fine. Or that there are no errors.

Posted By: PHeMoX

Re: Environment mapping can not display on Geforce - 06/20/05 22:09

Heaps of thanks XeXes!! I will try these codes as soon as possible... I was just wondering, I've downloaded the Aquamark 3 benchmark program some days ago, and they got this really cool 'masked environmental (reflection) mapping' on their model. This makes the submarine have a really nice metal/shiny look, but not the 'overdone' environmental mapping, which often produces a grey/silver/pink effect.
Anyway, first thing tomorrow, I'm gonna test your codes !

Edit: couldnt resist trying it out already! Works perfect and exactly the effect like in Aquamark3 !!! YEAHH!!! Thanks man!
Oww you forgot a ; at the end of bmap EnvMap = <EnvMap+6.tga> // Bitmap with the environment Map ...


Cheers
Posted By: Pappenheimer

Re: Environment mapping can not display on Geforce - 06/20/05 22:31

@ maxxoros:



This environment mapping script of Steempipe doesn't use any shader. Althhough I cannot test it at the moment with a non-shader videocard.
Posted By: muralist

Re: Environment mapping can not display on Geforce - 06/21/05 04:28

My GeForce 5200FX runs it fine. What version DirectX do you run? What version is the effect set for?
© 2024 lite-C Forums