Lukich Posted February 18, 2005 Share Posted February 18, 2005 Hello again. I have a small probelm - I created a particle system where particles are colored based on their $LIFE. Then I passed the color info onto the metaballs that I copied to the particles, works great. If I render the scene with, say, vex supermaterial, it looks good, supermaterial inherits diff, so the metaballs come out colored in the render. But the glass shader douesn't work It expects a diff parameter, and you can set a single diffuse color to be the color of the glass. But if I put in a glass shader, it comes looking like a regular glass. Do you guys know why? Thanks a lot, Luka Quote Link to comment Share on other sites More sharing options...
DaJuice Posted February 18, 2005 Share Posted February 18, 2005 Hey Lukich, If you slap down an Attribute SOP and rename Cd to diff, the Glass shader should pick it up. You can also pass down refl (reflect color) and transmit (Transmission) as attributes to further color your glass. I just tried it and diff by itself didn't do too much, the transmission color is more important. Quote Link to comment Share on other sites More sharing options...
Lukich Posted February 18, 2005 Author Share Posted February 18, 2005 Cool, DaJuice, thanks a lot! I was wondering, though, why does a supermaterial sees the point colors without renaming the attributes, and glass shader doesn't? They both expect diff, no? What's the difference? Thank again, Luka Quote Link to comment Share on other sites More sharing options...
old school Posted February 18, 2005 Share Posted February 18, 2005 The SuperMat shader has a hidden import vector variable named Cd. This will directly inherit the Cd attribute if it exists on the data. In the shader, diff is multiplied by Cd so the two interact with each other. It also picks up the default Alpha attribute. The Glass shader does not have Cd defined so you have to override the actual vector variable named diff which is the shaders visible parameter to set the color of the glass. Note that manipulating the Diffuse diff parameter in the glass shader has no effect as it is being overridden by the diff attribute on the geometry. Quote Link to comment Share on other sites More sharing options...
Lukich Posted February 19, 2005 Author Share Posted February 19, 2005 How do I pass refl and transmit as well? Renaming Cd to diif, refl and transmit at the same time didn't work, Do I have to create attributes for them or rename some existing ones? Thanks, Luka Quote Link to comment Share on other sites More sharing options...
DaJuice Posted February 19, 2005 Share Posted February 19, 2005 Hey Lukich, this should work. Quote Link to comment Share on other sites More sharing options...
Lukich Posted February 22, 2005 Author Share Posted February 22, 2005 works llike a charm! thanks a lot, guys! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.