Vertex colors

I’m painting vertex colors on my models to make them more interesting.

My question is: can I enable vertex colors in per-pixel lighting mode ? I know that I can make own custom Cg shader, but maybe there is quicker solution - switcher or something ?

This is my model in pview with vertex colors (you can see vertex-painted moss):
img268.imageshack.us/i/scr03p.jpg/

And this is after pushing L:
img28.imageshack.us/i/scr04.jpg/

Vertex colors work fine under lighting, either with per-pixel enabled or conventionally.

You probably have a material on your model that is overriding the vertex color. If you assign a color to the material, that color is used in preference to the vertex color when the material is enabled; and the material is enabled when lighting is on.

I suggest you either remove the material, or at least remove the color from the material.

David

I see. Works perfect.

img269.imageshack.us/i/scr06.jpg/

I removed from model file:
diffr {0.800000011921}
diffg {0.800000011921}
diffb {0.800000011921}

Thanks !

Hmmm but I can’t reproduce it in my game.
What kind of maginc pview makes for L and P keys ?
I’m using in my game basic-shaders-only #f and render.setShaderAuto(), but vertex colors are not visible. Exactly same level looks ok viewed by pview.

Solved (partially).

pview had standard basic-shaders-only #t
but my game had local config with basic-shaders-only #f

So it’s solved, but partially - seems it’s impossible with advanded shaders ?

I have to use basic-shaders-only #t plus render.setShaderAuto()
I thought it’s the same.

Hmm, that’s strange. Does setting basic-shaders-only #f for pview make the colors go away there?

David

Yes. After setting #t for new shaders in etc/Config.prc
moss disapears for P-key.
With L-key moss is still visible.

Could you publish your model so that we can try and reproduce the issue?

dl.dropbox.com/u/4724332/vcolors … roblem.zip

I checked this today on old laptop with simple GPU - Intel GMA900 and everything works fine.
But I think it just doesn’t care about basic-shaders-only #f and falls back to basic shaders, because GMA900 is too simple and thats why it looks good. What do you think ?