Try making a material that is half transparent (like glass) and half opaque. I’ve been trying for weeks and I don’t think it’s possible…
Click Ray Transparency and drag down the alpha value of the material, then set the IOR and colors and whatnot till it looks like whatever material you want it to. You could even get fancy and apply a clouds texture to the normal layer to get some nice bump effects. If you need more info I can post a short video for you.
EDIT: Here’s a quick mockup.
Obviously not perfect because of a lack of caustics and stuff, but you get the idea.
EDIT #2: I re-read your post, and I’m thinking that you meant something different. Do you mean an object that’s opaque on one half, and glass-like on the other half? Like, on my example, a piece of glass that has a gradient from frosted (opaque) to clear?
Thanks m9, for taking the time to show me that example. Unfortunately your second interpretation is correct. I’m looking to make a gradient between a transparent material and an opaque one.
Here is the first thread I started on the subject, but nobody responded, either because it really is impossible or they didn’t understand what I was going for. http://blenderartists.org/forum/showthread.php?t=118813
To put it simply: imagine an eyeball, going from the clear cornea to the white sclera.
Should be possible with nodes, but the more I learn about nodes the more I have my doubts.
You could try something like this to blend between a material that is transparent and one that is not:
I don’t have a ton of experience using the node system, but what’s to stop you from doing what I did for my second example? It’s just one object with two materials with the opaque material using a black to white gradient as an alpha map. if you UV mapped the eye, it would be really easy to make the proper alpha map in Photoshop or the GiMP. Like I said, I’ve never really messed around with the node architecture, so there may be an easier way, but using an alpha map should give you a pretty good result. If you are indeed doing an eye, and that wasn’t just an arbitrary example, you could actually just use a single white material for the sclera, and have it blend to clear alpha where the cornea is, then place separate object behind the cornea for the iris and pupil, and even the retina if you want to get really detailed. It wouldn’t be that hard, considering what you’ve already gone through.
I may be wrong, but that seems to be what you’re looking for in your original thread. If you can tell me where this fails to meet the criteria, maybe I can help and work out a way to get what you need.
By the way I know it’s hard to tell, but that’s not just a texture laid over a glass material, it’s actually two blended materials using a grayscale map as a way to determine how they blend. They can have different IOR’s, bump, and spec values and will blend perfectly through whatever gradient you set them to.
It’s late (early) here, so I’m not going to do it tonight, but tomorrow, I can make an eye minus the iris and lens to show you how I would do it if you’d like.
@Star Weaver: Thanks for the screenshot! What you’re doing with the nodes however is simple alpha transparency and doesn’t incorporate fresnel-based ray transparency, so there will be no IOR, specular highlights, etc. Basically, it will be transparent, but will not resemble glass.
@m9: I’m sorry, it seems I hadn’t given your renders close enough examination. You’re right, that’s the effect I’m going for in your 2nd & 3rd renders! Would you mind posting a screenshot of your node trees? Thanks!
In the meantime, I think I might be onto something myself. Take a look at this node tree screenshot and let me know what you think. m9, I’m eager to see you eye example as well if you get the chance to make one!
Like I said, I’ve never really used the node system before, so i don’t know exactly how to pull it up. If I select the glass then go into the node viewer, there’s nothing there. If you know what I’m doing wrong, tell me and I’ll post the screens for you. Later today when I wake up again, though, I’ll take some shots of my current settings for you and maybe work on that eye. Also, I see in the node viewer that you’re making your own ramps. Blender provides a number of nice gradients for you already. If you go to materials and add a texture, then go to texture and make it a ‘blend’ texture with the drop window to the right of the texture selector, you get a nice gradient that you can mess around with. Also, setting the ramp to multiply or darken gave me the best results.
Ummm … ther’s no alpha transparency in my thing. I have a ‘ramp’ material that’s moderating a mix between a ‘grass’ material and a ‘dirt’ material. Replace the ‘grass’ with ‘wood’ adn the ‘dirt’ witih ‘refractive glass’, let’s see… waits for a render test
Direct image link, no popups.
That was done with this node thing:
Which blends between a ray mirror material and low gloss ray transp material. The blue lighting is from radio emitters inside hte sphere.
@m9: Right, I have a ramp in there but you can disregard it as the ramp could be any black&white pattern - I just needed something to add alpha values.
A point to take notice of is that the ramp’s color is being combined with the transparent material’s value and they are being sent to the alpha of the output node. I’m using “difference” instead of “mix” since it seems to work best of all the blend modes I tried.
I’m confused though - if not with nodes, how did you make those materials? They look like they were made with nodes. Unless they’re just simple textures over a transparent material? That would be too simple. Maybe that’s all I needed all along and I was overcomplicating the process…ok, back to the lab.
@Star Weaver: Yes, after taking a second look I noticed your node tree has to transparency. My mistake. By the way, how’d you get that interface color sheme?
Alright, I’ll explain the details later for those who are curious, but here’s a screenshot for now.
(simply adding a texture on top of a material with ray transparency doesn’t work because the texture also becomes transparent)
You need to use nodes, and here’s how I did it with a .png image texture.
Re color scheme: I went through and changed every dang thing manually in the interface menu, using copy color a lot.
@Star Weaver: Wow, you copy/pasted all the color coding manually? Not via python scripts but just by modifying Blender’s source code? It’s refreshing to see.
Well, here’s today’s progress. I still can’t get specular highlights to show up, and the whole thing lacks shading, so I’m still troubleshooting it. But here it is…
Actually I copy/pasted colors between all the color pickers in the themes options screen; which is probably more annoying than doing it in the code would have been. Why there isn’t a ‘set background-foreground for all headers’ ‘set all window background’ and such … O_O
I’m getting somewhere! I’ve realized that nodes aren’t even the way to go. Check out this test render with half transparency and half non-transparency. And the transparency maintains the IOR.
It was done just by mapping a texture to values of the material.
Here are the settings used in this render:
[Shaders] Shadow On / TraShado On / Bias On
[Mirror Trans] RayTransp On / IOR 1.25 / Fresnel: 0
Tex:[MapTo] Spec / RayMir / Alpha (pressed twice until btn turns yellow)
That’s what I was trying to tell you how to do. Sorry for not being able to explain it better.
Hehe, forgot about all the mappy objects. Come to think of it, I was trying to make a slightly scuffed reflective floor a while back, and was using those.
Guess I tend to go with nodes for that sort of thing now because defining two complete materials and mixing between them makes my brain happier than sort of defining one material and then un/redefining parts of it in the texture tree …
@m9: I see, thanks for explaining it even though I didn’t get it. I was for some reason thinking that you meant assigning different materials to different vertex groups on an object. What’s funny is that it occurred to me to try this technique from reading an unrelated materials thread. It pays to browse the forums aimlessly sometimes.
@Star Weaver: Yeah, I’ve been getting really into nodes lately and thinking in node mode. But I realize more now how the uses for nodes and uses for layered textures differ. It’s a matter of using the right tool for the right job.
Anyway, I made some good progress tonight and the most confusing part is over. There’s still more material tweaking to be done and I have to make the final UV textures. Here’s a render of where it’s at now…
Check out the tut in my sig for ‘making a planetoid’ for a way to combine different materials using UV mapping and nodes. VVV
Did you try making a black and white version of the texture and plug it into the alpha input in the output node?
The black and white texture would be your alpha map, the alpha input is not there to not be used in all cases.
I notices one simple setup where the output is used but the best way to use it is to plug a black and white version of the material in it so you know how transparent it will be.