Jump to content

Glass material


Guest hajer
 Share

Recommended Posts

Guest hajer

hi all

here is a trick I always do when rendring

a glass material especiely exterior one.

I use standrad material with black ampiant

and diffuse and middle tone for the highlight

u could use any color for the highlight but

I prefer middle gray cuz the color usully com

from the sky reflection

now for the specular I usullay set it to

somthing lik 45 and the shinnes 25

I then set the bump map to 8 with nois map

set to 125 this shold giv u a nice curvy reflection now for the reflection I use

rytrace materil in the reflection map set to

somthing like 50 or 70 .

u also need to soround ur sceen with have cylindar

and map it picture of city scape and set the RGB

multiplyer to somthing like .5

now for the high lights I usually use an omni

with only specular enabled and position it close

to the glass material this shold giv u a nice

gradiant specular . that,s it .

 

another techniq I use is render the glass materila

to plain rytrace materil withe default setting

and then do another pass withe all lights off

and set the glass material to 100% self illumniation and take it to photoshop and

do what ever u want up there

Link to comment
Share on other sites

Hi hayer,

 

Tnx for sharing this technique. ;)

 

Does anyone knows how to setup a good glass material with deep fall-off in reflection/opacity?

 

I studied the techniques from the 'architectural glass'-script but I still don't now how to make it really really good (i.e. looking superb and renderable within a reasonable time). It must be because I still doesn't understand the material properties of glass that well...

 

I know the reflection gets stronger when the angle of view gets sharper, but what about the opacity? Should that fall-off too?

Architectural glass makes a deep material in the reflection slot, but does not use fall-off in the opacity slot. Why should one do (or do not) do this?

 

And what about the shadow/light fall-off. Does glass reflect more or less when a shadow cast it?

Does this depend solely on the darkness/lightness of the space behind the glass, before the glass or both?

Does darkness/lightness affect opacity too?

How does this all work together? And how do we simulate this?

 

Is there any use of the fresnel fall-off in simulating glass?

 

So basicly how should I use the fall-off?

(perp.parallel/shad.light/fresnel in the reflection or opacity slot?)

And how do I setup the fall-off-curves in each slot?

 

Sorry for all these questions, but I do hope some one does know the answer to them ;) because I don't. (Well... not for sure anyway...)

 

rgds

 

nisus

Link to comment
Share on other sites

Guest hajer

hi nisus

u don,t need to use fall-off map to get a good

glass reflection .... fall-off map are used when

u have a round surface but when u have a flat

surface like a glass sheet u can,t see any

fall-off .. infact u don,t need to make ur material trancparent to get a convincing glass

material it,s all enviormetal reflections

if u buld a good enviorment u will end up

with good glass reflection

Link to comment
Share on other sites

Hi Hayer.

 

Tnx for your feedback.

Indeed one doesn't need fall-off on every project - I've been doing without for years - but lately I've seen some renderings of skyscrapers with really amazing glass.

They catch a combination of a color gradient, good environmental reflection and interior walls and ceilings. I am just wondering how to setup a light like that.

 

rgds

 

nisus

Link to comment
Share on other sites

I personally prefer to use fresnel glass in architecture, as glass gets less transparent and more reflective the more you move away from 90 degrees,

and i have saved a material setting i use almost always now, and although most people cant pick wether its fresnel or not, its 1 more thing that the eye cant catch, and feel there is something wrong, and too cg'ish

 

i have a tut on doing fresnel water here......

 

http://www.angelfire.com/scifi/wolfslair/water/water3.html

 

its almost identical process for glass, so just get the idea from the water, and play with the settings to get glass.

when your happy with it, save the material and use it again without having to recreate it.

Link to comment
Share on other sites

Tnx Wolf,

 

This glass/water material is a bit like the one I use myself, except for a few differences, in other words I still have a few questions.

 

1) What is the difference between Fresnel and Perpendicular/Parallel? (I use the last one for glass, the first one for water but to be honest I don't know why. I've read these things somewhere, but those books never explained me why...)

 

2) Why load a raytrace map in the first slot if you set it's value to zero? (I only use an RT map in the second slot, leaving the first one blank)

 

3) What about curves? Do you make them curved instead of linear? In what direction do you adjust? Center up or down?

 

4) How would you add a shadow/light-falloff map in your material tree? (Above or Under your current seetings?) And why of course?

 

As I've mentioned before "Architectural Glass" (script) is the only advanced/complex glass setup that I've came across (except for my own settings)but I've never found some explanations for their methods yet...

 

So if anyones knows... tnx!

 

rgds

 

nisus

 

Btw, here is another tip for users who don't use fall-off maps often: copy them temporarily into the color/diffuse map and give them very saturated colors to studie the effect (e.g. magenta and green works well)

Link to comment
Share on other sites

Yeah thx Wolf, realy usefull to me!

Just one question left...

Should I put raytraced maps in both slots and make the value of the first 0 in the falloff of the tranceparency too, or just from the reflection?

 

Thx

Link to comment
Share on other sites

Hey Nisus

 

The perpendicular/parallel falloff option is a uniform transition with a linear curve.

where as the fresnel calculates a much more accute angle, and also takes into acount the IOR (index of refraction) of your material, due to the fact that things like diamonds have a much higher degree of falloff than glass does.

 

The reason i put a raytrace material in both map slots, rather than using a normal material,

is due to the fact that the standard max material calculates transparency and reflections as additive, which in my opinion looks a bit fake.

The raytrace material does a much better job of calculating the reflections and transparencies.

 

If you really wanted to get technical and the ultimate realism with glass,

you will find if you look at a real life glass door, that has part of the door in shadow,

it seems to be more transparent and less reflective in the shadow area.

This is where you would use your falloff shadow light options i presume.

I havnt gotten that fussy over my glass yet, to bother doing this,

but i imagine it would make a pretty realistic effect.

 

[ May 23, 2002, 09:13 AM: Message edited by: Wolf ]

Link to comment
Share on other sites

Tnx Wolf! (for explaining the difference between fresnel and perp/par.)

 

I got still got a few questions:

Does the reflection / opacity of glass depend on the amount of light before and after the glass panel? (I think it does, because a lit interior seen from outside is transparant while unlit the glass will reflect) But how does this work?

 

rgds

 

nisus

Link to comment
Share on other sites

Guest hajer

I like ur approach wolf

The problem is with tricky material like glass is that it takes allot of tweaking to get it right and that means allot of rendering .... but try this approach create standard material with retrace material set to 100%

And the transparency set to 0% and the highlight set to something like 80% black and render ur scene

Know all u get is good clean glass material with some nice subtle reflection do another render only this time set the glass material to 100% self illumination and turn ur light off what u should get is an alpha channel for ur glass material take both render to ur photosomthing and know u really have a total control

Over the how should ur glass look like …….. it always work for me

Link to comment
Share on other sites

Hi all,

 

Another mystery of glass... We all know that glass reflects more when seen under a greater angle, but it does reflect too if you look straight at it being in a lit room while it's dark outside. How do you explain this?

 

rgds

 

nisus

Link to comment
Share on other sites

Hi samp,

 

Best thing to do is to copy the script in your 3dsmax/scripts/startup/ -directory, that way it will run at startup. Next go to the material editor ("m" and check the material type of a standard material.

 

rgds

 

nisus

Link to comment
Share on other sites

when having a dark area outside the glass, it acts as a mirror. in fact, what is a mirror? It's a glass with a dark surface sticked on one side.

the dark surface doesn't let light to pass trough.. but it' doesn't reflect either.. because it's black. so. the only glass reflected light is seen. I think the glass reflects the same light but if you have a dark area outside... you can see the reflected light better...not sure..

I'm sure there have to be some webpages explaining the physics of glass and light. :o

Link to comment
Share on other sites

Tnx a lot Hector,

 

I'm gonna think about that black-idea. I might get to some good results. Unfortunately, I haven't found any webpages explaining the reflection of glass better than the books I've read (and these were not enough to get a good understanding of the topic). So if anyone has got a link, pls post it ;)

tnx!

 

nisus

Link to comment
Share on other sites

Guest ghraben

nisus:

 

i think your best bet at getting your questions answered is going to be thru a physics book. you are asking very specific questions related to light's behavior. i seem to remember from my high school physics days that there are plenty of equations and the like to explain what light does when it hits glass. terms like "angle of incident" and "rarefaction" seem to stick out in my mind. once you understand the physics, all you have to do is find the components in the software that mimic the natural effects.

Link to comment
Share on other sites

Tnx Ghraben.

 

Unfortunately I've read and studied these things years ago, but there is nothing useful I could remember. These methods show you how a beam of light is reflected or transmitted throug a medium, but not why! They just don't explain the very simplest questions like why a beam of light does reflects this way in a certain situation and another way in another situation.

I think it's odd that no one can explain this phenomenon in very simple words, especially not the ones who simulate glass everyday - as a living too.

Must be something in the air...

 

I think I'll call a university tomorrow, just to ask them to explain these 'simple' things. ;)

 

rgds

 

nisus

 

ps: Am I boring (on this subject?)

Link to comment
Share on other sites

  • 3 weeks later...

Hi samp,

 

Best thing to do is to copy it in your scripts/startup directory. Restart max, and next time you'll make a new material type, you'll see it in the list. Max4, not working in max3.1, don't know about viz.

 

rgds

 

nisus

Link to comment
Share on other sites

  • 4 months later...

Hi all,

 

This is an original post by Dave Buchorfer (or something almost like it...) that fit's better inhere:

 

>>How Do I create realistic, clear, reflective glass?

 

I guess this is a good place to start the book~

 

Well, that can be a month long discussion

 

As a starting point, which you can adjust as you wish.. Start with Any shader type, I personally prefer Oren-Nayar-Blinn.. but anything works reasonably..

 

Glass is usually 2 sided in real life.. If modeled as a simple plane then click the 2 sided checkbox under the shader basic parameters..

 

15'ish Opacity works as a starting point, a middle grey Diffuse color.. can go to black if needed for a bit more of a "clear" look.

 

Diffuse level: Over 100 makes it more white.. under 100 makes it more clear. Roughness will give it more of a translucent look if you raise the opacity, but doesn't do much anything for standard glass.

 

Specular highlights, we generally want a small bright highlight on Glass.. So level ~80 and Glossiness 90-95ish should work. As always, tweak to your liking.

 

Now, what makes it look realistic or not is the Reflections. Sooo.. you can set this up one of two ways.. depending on if you have something for the glass to reflect or not.

 

Anyway, down in the Maps section, you'll want to set your Reflection slot to a MASK type. Inside of the mask type, you want your MAP to be a Raytrace.. Default settings ok here.. Use local excludes to make it render faster if needed. in the MASK swatch add a Falloff map. Where there is white, reflections will be, Where black, it will be clear. (Check the helpfile for what it does.) Now, I prefer to set the top part of the falloff map up a bit, say.. 30'ish color, so that there is a little bit of reflection all over, and leave the bottom swatch at the 255 (White) color. Falloff type can either be set to Perpendicular/Parallel for more exxagerated results, or Fresnel for more physically accurate yet dimmer reflections..

 

If you're really going all out, or have curved glass pieces, then you'll want to use a Refraction also, putting a raytrace map in the refraction slot works fine for this. You set the amount of refraction in the "Index of Refraction" parameter under the Extended Parameters rollout.

 

Lastly, is the quality of the reflections, You can adjust the smoothness or AA (Anti-Aliasing) of the reflections via the Supersampling rollout in the main level of the material. Clicking Enable Sampler will start it working, Max 2.5star is usually fine, For higher amounts of AA to remove artifacts, you may want to use the Adaptive Halton type. Defaults to 0.5 quality.. Try it, and then experiment with upping it.

 

Also remember to go into the Raytrace Globals dialog box and set the number of Bounces to something lower to speed up rendering. Anything less then a mirrored box generally doesn't need more then 3 bounces. 2-1 is usually fine. You can check to see if you have blank spots in the reflections by setting the Color in here to some bright color, and then rendering.. From here up the bounces until the color you set dissappears from your rendering. The lower the number of bounces the faster it renders.

 

Render times go up exponentially when you start using all of these options at once. so only use what you need, where you need it.

rgds

 

nisus

Link to comment
Share on other sites

you don't need any scripts...

 

The thing with glass is it doen't look like glass untill you set your refractions good.

 

if you make a glass object make sure you copy the object, past it in another layer, flip your normals and make a material called air.

 

before light hits your glass i went trough air, air has a refraction of 1.003 and glass has a refraction of 1.5 so that's what makes your glass look realistic all your reflection will be refracted this way now.

 

also make sure your glass has a bump value off 2% cause glass is never totaly clear also glass does have scratches and dust.

 

Also make sure your air is totaly transparant, it's pure the refraction correction you want and no colour at all.

 

your glass material is not totally transparant, it's massive and not empty, it reflects light with another refraction value.

 

that was all i could share from scratch :D

 

hope it does you any good....... goodluck

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...