refraction mask map?
7085 6 2-
- csp
- Member
- 230 posts
- Joined: 10月 2009
- オフライン
hello, I have a bottle glass with labels on its texture and everything works great I cant find how to mask our refractions on label areas. There is this parameter for reflection light and objects but not for refraction and it gives me incorrect results. I am using houdini 11, the Mantra surface shader.
-
- csp
- Member
- 230 posts
- Joined: 10月 2009
- オフライン
-
- mickyblue
- Member
- 217 posts
- Joined: 9月 2009
- オフライン
-
- eetu
- Member
- 607 posts
- Joined: 5月 2007
- オフライン
Looks like it just isn't implemented in the Mantra Surface material.
You'll need to roll your sleeves and dive into the material and start shoveling VOPs.
If you just want the exact same mask as for reflections, it might work just by connecting the output of the “base_reflections” network box to the “Refraction Color” input of the surfaceModel.
If you need an independent mask, the you need to duplicate the “base_reflections” network box, change the names of the parameters, and feed that to surfaceModel's “Refraction Color” input. The GUI might take a hit from this as well, so you either need to try and fix it up or just hunt for the new Refraction Mask parameters in the material parameter panel..
You'll need to roll your sleeves and dive into the material and start shoveling VOPs.
If you just want the exact same mask as for reflections, it might work just by connecting the output of the “base_reflections” network box to the “Refraction Color” input of the surfaceModel.
If you need an independent mask, the you need to duplicate the “base_reflections” network box, change the names of the parameters, and feed that to surfaceModel's “Refraction Color” input. The GUI might take a hit from this as well, so you either need to try and fix it up or just hunt for the new Refraction Mask parameters in the material parameter panel..
-
- csp
- Member
- 230 posts
- Joined: 10月 2009
- オフライン
mickyblue and eetu thanks for your reply, I had forgit this post because nobody was interested until now.
eetu:
I tried that but with no success, I had exacly the same idea with you, just copy and paste reflections setup but it wasn't that easy and I couldn't find how to make it work this way.
But I came with a solution using an expression in sops. I have the image I want to be the refraction mask to copnet and then using a point sop I assign the image to the geomtery, it actually paints the image using the color on the image and based on uv coords. The expression is pic(“../cop2net1/OUT”,$MAPU,$MAPV,D_CR) for red, pic(“../cop2net1/OUT”,$MAPU,$MAPV,D_CG) for green, pic(“../cop2net1/OUT”,$MAPU,$MAPV,D_CB) for blue.
Then I use an AttribCreate to overwrite the refr_color of the material which is used in this geometry. So, Name: refr_color, Type: Vector, Value: $CR for the first value, $CG for the second and $CB for the third. You can see the setup in my attached file, also you can see that transparent shadows works fine by taking in count the refraction mask. You can also avoid the ropnet and use an image directrly from the disk, using the tex expression: tex(“image.jpg”, $BBX, $BBY, r) …. feel free to check both expression on the textport (i.e. exhelp tex)
Well if someone can came with some more efficient way to solve this problem in VOPs, that would be create because there is a small problem with this way, the image is coming smoothed on the endges if you have lowres geometry.
eetu:
You'll need to roll your sleeves and dive into the material and start shoveling VOPs
I tried that but with no success, I had exacly the same idea with you, just copy and paste reflections setup but it wasn't that easy and I couldn't find how to make it work this way.
But I came with a solution using an expression in sops. I have the image I want to be the refraction mask to copnet and then using a point sop I assign the image to the geomtery, it actually paints the image using the color on the image and based on uv coords. The expression is pic(“../cop2net1/OUT”,$MAPU,$MAPV,D_CR) for red, pic(“../cop2net1/OUT”,$MAPU,$MAPV,D_CG) for green, pic(“../cop2net1/OUT”,$MAPU,$MAPV,D_CB) for blue.
Then I use an AttribCreate to overwrite the refr_color of the material which is used in this geometry. So, Name: refr_color, Type: Vector, Value: $CR for the first value, $CG for the second and $CB for the third. You can see the setup in my attached file, also you can see that transparent shadows works fine by taking in count the refraction mask. You can also avoid the ropnet and use an image directrly from the disk, using the tex expression: tex(“image.jpg”, $BBX, $BBY, r) …. feel free to check both expression on the textport (i.e. exhelp tex)
Well if someone can came with some more efficient way to solve this problem in VOPs, that would be create because there is a small problem with this way, the image is coming smoothed on the endges if you have lowres geometry.
-
- mickyblue
- Member
- 217 posts
- Joined: 9月 2009
- オフライン
-
- csp
- Member
- 230 posts
- Joined: 10月 2009
- オフライン
-
- Quick Links

