Andrew 1 Posted March 15, 2013 Hi. I am trying to create table surface with reflection. But I have trouble - the reflection is not showed in the shadow, when the sun shines the reflection works well, but the table is most time in the shadow and reflection is invisible. You can see on the screenshot that lit part of the table has reflection but another part hasn't reflection. How can I fix it? rvmat for the table surface: ---glass_reflection.rvmat--- ambient[]={1,1,1,1}; diffuse[]={1,1,1,1}; forcedDiffuse[]={0,0,0,0}; emmisive[]={0,0,0,1}; specular[]={1,1,1,0}; specularPower=21.299999; renderFlags[]= { "NoAlphaWrite" }; nextPass="MyHouse\glass-pass2.rvmat"; PixelShaderID="Glass"; VertexShaderID="Glass"; class Stage1 { texture="#(ai,64,64,1)fresnelGlass()"; uvSource="none"; }; class Stage2 { texture="MyHouse\env.paa"; uvSource="none"; }; ---glasspass2.rvmat--- ambient[]={1.000000,1.000000,1.000000,1.000000}; diffuse[]={1.000000,1.000000,1.000000,1.000000}; forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000}; emmisive[]={0.000000,0.000000,0.000000,1.000000}; specular[]={0.000000,0.000000,0.000000,0.000000}; specularPower=0.000000; renderFlags[]= { "NoColorWrite" }; PixelShaderID="AlphaShadow"; VertexShaderID="Basic"; Share this post Link to post Share on other sites
nodunit 397 Posted March 16, 2013 Can you post a picture? I think the problem is that you are using the basic shader and not the super shader. Try this ambient[]={1,1,1,1}; diffuse[]={1,1,1,1}; forcedDiffuse[]={0,0,0,0}; emmisive[]={0,0,0,0}; specular[]={1,1,1,0}; specularPower=21.299999; PixelShaderID="Super"; VertexShaderID="Super"; class Stage1 { texture="#(argb,8,8,3)color(0.5,0.5,1,1,NOHQ)""; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,1}; pos[]={0,0,0}; }; }; class Stage2 { texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,1}; pos[]={0,0,0}; }; }; class Stage3 { texture="#(argb,8,8,3)color(0,0,0,0,MC)"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,1}; pos[]={0,0,0}; }; }; class Stage4 { texture="#(rgb,8,8,3)color(1,1.0,1.0,1,AS)"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,1}; pos[]={0,0,0}; }; }; class Stage5 { texture="#(argb,8,8,3)color(0,0,1,1,SMDI)"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,1}; pos[]={0,0,0}; }; }; class Stage6 { texture="#(ai,64,64,1)fresnelGlass()"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,1}; pos[]={0,0,0}; }; Filter="Point"; }; class Stage7 { texture="MyHouse\env.paa"; uvSource="tex"; class uvTransform { aside[]={1,0,0}; up[]={0,1,0}; dir[]={0,0,1}; pos[]={0,0,0}; }; }; An rvmat must have the appropriate stages otherwise it will not work right. Share this post Link to post Share on other sites
Andrew 1 Posted March 17, 2013 (edited) - Can you post a picture? http://s2.ipicture.ru/uploads/20130318/Tf2B2T5c.png (711 kB) You can see that right part of the table (lit part) has reflection but left part (in the shadow) hasn't. - Try this I have tried this rvmat but reflection is not show. I tried with shadows enabled and without shadows too. At this image http://s2.ipicture.ru/uploads/20130318/SVr41gwt.png (484 kB) you can see reflection on left table (it is my rvmat) and without reflection on right table (it is your rvmat). The scene without shadows. Edited March 17, 2013 by Andrew Share this post Link to post Share on other sites