Jump to content
Sign in to follow this  
Panda-PL-

Disabling model's self-shadows on specific faces?

Recommended Posts

Ok, I have use a semi-transparent texture for parts of mdel, however when lightning direction is at some angles these semi-transparent faces happen to be under shadow LOD's geometry and they become dark (not only the non-transparent bits, but also the fully transparent part of texture).

Is there any way to stop shadow from being casted onto these faces?

Share this post


Link to post
Share on other sites

oohhh, good question... hmmm... must try that sometime... maybe find the faces in the shadow lod that overhang your transparent surface and flip the normals??

dunno, wild stab in the dark there...  huh.gif

edit: nahh.. that's a stupid idea... 'cause then your shadow for those faces would'nt cast properly at 'other' angles...

hmmm... pondering...

what about adding an rvmat to the transparent faces, with 'NoZWrite' and 'AddBlend' in it...

Share this post


Link to post
Share on other sites
what about adding an rvmat to the transparent faces, with 'NoZWrite' and 'AddBlend' in it...

I really dunno...

I used a separate texture for eyeleashes and now when half of face is in shadow of the helmet the soldier looks like if one used an eyeliner or something...

Afaik there is no shadow on muzzle flash in any rifle, even ones not using proxies so it might be one of the RVMAT properties or settings.

Share this post


Link to post
Share on other sites

if it's character model then shadow is generated via shadowwvolume lod. remove or scale part you doslike to achieve result needed

Share this post


Link to post
Share on other sites

Any winners ?

I'm trying to get 1 plane from casting a shadow on a nearby plane.

The plane is square but the shadow itself is now the texture shape with its transparent edges. I dont want those shadows.

A static model, a cloud in fact made from multiple planes.

Share this post


Link to post
Share on other sites
Gnat @ Dec. 12 2007,12:24)]Any winners ?

A static model, a cloud in fact made from multiple planes.

Nope, i abandoned the idea.

I have noticed that there are still .pan type textures in ArmA CA folder and that _CO.Paa type texture (0/1 alpha) is shadowed properly.

But I don't think that you would like to use one.

I am not sure if even the cloudlets models don't have shadows on them. The dusty ones do, the fire seems not to (but it can be caused by emissive= or forcedSpecular settings).

Share this post


Link to post
Share on other sites

With the help of Adam i was able to fix my shadow casting on faces that doesn't need it. A simple rvmat witht he NoZwrite code did the trick. There is one in the Ca pbo of BIS itself. I'm not on my computer, but it was called something like empty_nzw.rvmat.

Share this post


Link to post
Share on other sites

Yep, Thx, that seems to work, but now I can't get a nice flat colour.

Doesn't seem any way to get white to stay white no matter what angle you view it at ....

Share this post


Link to post
Share on other sites

Hm, wild guess as i do'nt have much experience with rvmat's myself, but have you played around with the "forced diffuse"?

Downside is, again if not mistaken, you will loose a lot of your original colour as the effect is putting an 'layer' over your texture...

Share this post


Link to post
Share on other sites
Gnat @ Jan. 28 2008,03:27)]Yep, Thx, that seems to work, but now I can't get a nice flat colour.

Doesn't seem any way to get white to stay white no matter what angle you view it at ....

Using specular map?

Try setting the red channel of your SM to 1 (full white).

Share this post


Link to post
Share on other sites
Quote[/b] ]Thx, that seems to work, but now I can't get a nice flat colour.

if you need just flat pure color - there's no need to make actual shader map. use

texture = "#(argb,8,8,3)color(1,1,1,1)";

in rvmat

those 1's are rgb color + alpha. play with it wink_o.gif

Share this post


Link to post
Share on other sites

well, i'm not so expert.

but as far as i know noZwrite, is to disable the Z Buffer for these faces (has to do with hidden faces).

Now for shadow on glasses, the solution is

ambient[] = {1, 1, 1, 1};

diffuse[] = {1, 1, 1, 1};

forcedDiffuse[] = {0, 0, 0, 0};

emmisive[] = {0, 0, 0, 1};

specular[] = {0, 0, 0, 0};

specularPower = 0;

PixelShaderID = "AlphaNoShadow";

VertexShaderID = "Basic";

renderFlags[] = {"NoColorWrite"};

this is for sklo-pass2.rvmt, the 2nd pass on the glass.

it's exactly the same with BIS, only with one difference.

here BIS has

PixelShaderID = "AlphaShadow";

Again, sorry, if i misunderstood the discussion on this thread.

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  

×