Jump to content
Sign in to follow this  
Double Doppler

Illuminated, transparent, grille textures etc.

Recommended Posts

Hi, I would like to know how to make some textures give off light (or atleast stay illuminated) at night (like the car light textures). And also I would like to know how to make transparent backgrounds (for creating car grilles, lights, etc.). I am new to texturing and I would appreciate it someone can help me out.

Share this post


Link to post
Share on other sites

ambient[] = {1,1,1,1};
diffuse[] = {1,1,1,1};
forcedDiffuse[] = {0,0,0,0};
emmisive[] = {0.5,0.5,0,0.2};
specular[] = {0,0,0,0};
specularPower = 0;
PixelShaderID = "Normal";
VertexShaderID = "Basic";

1. create a rvmat-File

2. copy the above code into it

3. assign it in O2 to the face

This should emmit yellow light at night.

colour is set in this line: emmisive[] = {0.5,0.5,0,0.2};

can´t test it now, but i think it should work.

Share this post


Link to post
Share on other sites

Thanks, but not necessarily what I had in mind. What I need to know is how to create light textures (Like the car light flares), and to make an area of the texture see-through, like a circular light on a box shaped face and to be able to use the texture with this SetObjectTexture.

Share this post


Link to post
Share on other sites

- transparency is set in the alpha channel of the image.

- the glow effect is done by the material file in ca\Data\data\default_flash_2pass.rvmat

take a look at the sample models and you will see how it is done

Share this post


Link to post
Share on other sites

the emmissive rvmat characteristic makes the texture 'self lit'. It makes it not shade in the darkness. This is a much different thing than having the thing light other objects, in which case you would need to attach a light source to the object.

The alpha channel of your image tells the computer how opaque a surface is, white being completely opaque and black being completely transparent. In order for the engine to make use of the alpha channel properly, though, you must save your texture as a _ca file. i.e transparentThing_ca.tga

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×