NON CG to CG

Hi, i tried to convert rims from NON CG to CG and this happend..


SHADERS:
shader_rim~vf_standard
{
motion_blur=0
layer0
{
map=gradient.tga
texgen_s=sphere_map
texgen_t=sphere_map
emission=1 1 1 1
}
layer1
{
map=$trackenvmap
texgen_s=reflection_map
texgen_t=reflection_map
texgen_r=reflection_map
blendfunc=filter
shininess=24
specular=0.75 0.75 0.75
}
layer2
{
map=Rota_Tamarc.tga
blendfunc=one src_alpha
}
}
shader_tyre1~vf_standard
{
motion_blur=0
layer0
{
map=AD08_Sidewall.tga
}
}
shader_tyre2~vf_standard
{
motion_blur=0
layer0
{
map=ADVAN.tga
}
}
shader_disc~vf_standard
{
motion_blur=0
layer0
{
map=Freio.tga
}
}
 
When using the new shaders, you need the primary texture to be in layer0
shader_rim~vf_standard
{
motion_blur=0
layer0
{
map=Rota_Tamarc.tga
}
layer1
{
map=$trackenvmap
shininess=24
specular=0.75 0.75 0.75
}
}
This should also probably be ~vf_reflect since it uses the $trackenvmap.
 
I think i got it, but you writed this shader for me?
EDIT:
I tried but now rims are black :( can you rewrite it for me so i can use your e.g
 
I think i got it, but you writed this shader for me?
EDIT:
I tried but now rims are black :( can you rewrite it for me so i can use your e.g

Do you have the shader templates at the top of the car.shd file?

Like this:
Code:
vf_standard
{
  vertex_shader
  {
    file=dyn_standard_v.cg
  }
  fragment_shader
  {
    file=standard_f.cg
  }
}
 
vf_reflect
{
  vertex_shader
  {
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_f.cg
  }
}
 
Have you blendfunc on your shader?
Also remove (if you have) ambient/diffuse value, to get a real basic shader
The code posted by stereo should work
 
Code posted by stereo doesn't work, when i put his code my rims are black... can you rewrite it skybh? PLS, so i can later use your example to learn it!
 
Hum for the rim, if you want it reflect, change vf_standard by vf_reflect
also it's seems that the rim texture is not correct, what is its size?
 
Panco, he mean that you should check the texture image size, i.e. it should be 128x128 or 256x256 or 512x512 and so on.
 
BUMP, need help fast!
hi,
for me the easyest way to get a working, not nice lookin, but working shader is to put the file in to modeler.exe in your main racer direktory.
Import the .dof file and hit "make template shader" it's generate a basic file with all used shaders from your object....

Alex

modeler.jpg
 
Thanks, i managed to write shader, but i still can see through rims on some pieces.. whats problem?

Alex,i tried with that program, but when i press "make shader" and enter game, rims doesn't show up
 
Oh, thats right...you have to copy the entres from the car_template.shd to your car.shd....
hmm...take a look to the alpha channel from your rim texture, every thing you like "solid" should be white and every thing you want transparent, like holes or spokes should be black...

Alex

EDIT:
ok here is a small example what i want to say with alpha channel:
Main Texture:
a110rim01.jpg
Full "Solid" Alpha Channel:
alpha_channel_1.jpg
Alpha Channel with "holes":
alpha_channel.jpg
...and this is what you get, with full solid alpha channel:
Full_Solid.jpg

...and with "holes":
with_holes.jpg

....i hope it helps a little...
 

Latest News

Online or Offline racing?

  • 100% online racing

    Votes: 80 7.1%
  • 75% online 25% offline

    Votes: 122 10.8%
  • 50% online 50% offline

    Votes: 166 14.7%
  • 25% online 75% offline

    Votes: 314 27.8%
  • 100% offline racing

    Votes: 445 39.3%
  • Something else, explain in comment

    Votes: 4 0.4%
Back
Top