PDA

View Full Version : Frosted Glass


sander0105
03-23-2006, 10:35 AM
Anyone an idea how to create a realistic frosted glass shader?
I'm rendering with FG+secc. diff. The only solution i've found so far is the use of DGS shaders with 1.00 glossy, low shiny and .9 transparancy. But rendering this takes ages and it still doesn't look convincing.


This is how the material should look like:
http://vizdepot.vismasters.com/common/images/products/photos/features/vraymaterials/Frosted_02.jpg
-image from VisDepot-

JulianS
03-23-2006, 07:34 PM
You can use L_Glass v2.0

It has the attibutes to create that effect. You can download it from here
http://yashu.go.ro/

or you can try ctrl_shading_1.1
http://forums.cgsociety.org/showthread.php?t=252304&page=1

I haven't try it.

zeroeefx
03-24-2006, 02:22 AM
I would love to see the light setup and setting ... if anyone will share

JulianS
03-24-2006, 04:30 AM
Here is a little Quick and Dirty 5 minute test with L_Glass

Left No Dispersion --- Right with Dispersion

http://creating3d.com/Help/blur.jpg

JulianS
03-24-2006, 06:39 AM
One more test with Glossiness

at .025, .050, .1, and .2



http://creating3d.com/Help/blur_v2.jpg


I hope This helps.

sander0105
03-24-2006, 06:51 AM
That's just the look i want, perfect. I feel a bit stupid though... I'm using L_glass al the time... never thought of looking into the glossyness setting.

How high dit you set your L_glass samples?

Thanks:thumbsup:

JulianS
03-24-2006, 04:58 PM
L_glass
Samples 16

FG
Rays 400
Distance % for min max
No secc. diff.

Globals
Samples 0 - 2
Filter Gauss
Raytracing 1X1/2

Pixeldisfunction
03-24-2006, 09:54 PM
Thanks for sharing julian, was looking for this info too.

anim8or_7
03-24-2006, 11:18 PM
I was not looking for this, but I am sure going to try this out. Thanks for the information, Julian!

By the way, Julian, did you work on Aslan's fur for the Chronicles of Narnia? Saw a post a while back - can't remember if it was you. Mighty fine job on the fur - looks absolutely stunning!

MrPositive
03-25-2006, 07:24 AM
L_glass
Samples 16

FG
Rays 400
Distance % for min max
No secc. diff.

Globals
Samples 0 - 2
Filter Gauss
Raytracing 1X1/2

Hey Julian, did you use an IBL in your render or just a background gradient in the environment?

JulianS
03-25-2006, 08:32 AM
Is just a polysphere with reverse normals and a ramp in the Ambient color for the FG


http://creating3d.com/Help/simpleSetup.jpg

MrPositive
03-25-2006, 11:15 AM
Is just a polysphere with reverse normals and a ramp in the Ambient color for the FG




Thanks so much Julian! You are very helpful and giving. If I can ask a small question.... how do you control overall transparency with the lglass shader? Frosted glass is well just frosted glass, but let's say I want glass that is just not transparent.

sander0105
03-26-2006, 10:07 AM
Is it also possible to get accurate shadows according to frosted glass. Now I'm using a transparancy shadow node which gives me sharp shadows instead of "blurred" ones.

zeroeefx
03-26-2006, 01:15 PM
Anyone know how i would go about adding a label to the glass ,,,color and all( a label that is emboss off the glass ,,,not a paper one ,, ) kind of like a water mark .... normally in software i would use a layer shader and make the label and overlay it ...But this is not software :)

JulianS
03-26-2006, 05:10 PM
Hello There take a look at my website in the Techniques section Under Quick and Dirty MR. I show how to add textures and opacity textures in MR. it not going to give you the final answer but is a great start.

I hope this helps.

http://www.creating3d.com/rnd/index.html

MrPositive
03-26-2006, 05:13 PM
Hello There take a look at my website in the Techniques section Under Quick and Dirty MR. I show how to add textures and opacity textures in MR. it not going to give you the final answer but is a great start.

I hope this helps.

http://www.creating3d.com/rnd/index.html

Hey thanks Julian, does the mib_bump_map work on Lglass shader?

JulianS
03-26-2006, 05:58 PM
Here it is with color

http://creating3d.com/Help/Blur_Color.jpg

Mr. Positive
The way the bump works in MR is a connection to the specular Attr or the the Normal Camera, but i dont see why will you want to put bump in glass. do you have examples or ideas.

krolichka
03-26-2006, 06:40 PM
You say you use Final Gahter to render. Is it possible to make an animation without getting the flickering from the final gather rays?

krolichka

JulianS
03-26-2006, 06:53 PM
sander0105
For soft shadow try The "Light Radius"
This is from Rebuiltworld Quote " a number of FG rays will increase shadow quality."

http://www.rebuiltworld.co.uk/tmp/raytrace.gif

My Example

http://www.creating3d.com/Help/FG_Gi_SoftShadows.jpg

JulianS
03-26-2006, 06:59 PM
krolichka

From lamrup.org

FG/GI Flicker Tips
First, disable photon mapping (caustics and GI) until you have adjusted your FG settings. You can try increasing the number of FG rays to 1000 or 1500, but the most important option for decreasing FG flicker is the FG maximum radius. Decreasing the radius reduces flicker. Enable the FG diagnostic mode so that you can see where FG points are being generated. Do not decrease the FG maximum radius to the point where the diagnostic display shows a solid mass of FG points. If you appear to have a sufficient FG point density and you are still getting flicker, increase the number of FG rays until the flicker is acceptable. Also, using FG points from a final gather file instead of using "finalgather rebuild" can reduce flicker. Remember to delete the file before rendering the first frame of the animation.

Once final gathering looks correct, disable it and enable photon mapping. For GI, I have gotten good results with an accuracy of 2000 to 4000 photons and a radius sufficient to encompass those photons. The accuracy radius is just a speed optimization; it should not be used to control quality. The accuracy radius tells the renderer "Don't bother looking outside this radius". In a well-illuminated area, you'll always find N (e.g. 2000 to 4000) photons within the radius. To get good photon "shadows" with an accuracy of 4000 photons, I made sure that 4 million photons were stored in the photon map. I was doing volume GI as well as surface GI, so you can probably store fewer photons.

Once the photon mapping looks correct, enable FG and render your scene.

sander0105
03-26-2006, 07:02 PM
hmm that's the method i'm using now, the downside is that all my shadows are blurry now. I've got bot clear and frosted glass and i hoped to show a diffrence between them (shadow wise)

JulianS
03-26-2006, 07:05 PM
sander0105

Can we see some examples of what u trying to achive.

MrPositive
03-26-2006, 10:37 PM
Ok Julian

I need to create glass like the example below. As you can see the glass is ribbed, however, we've decided to go with a bump map along the extrude because of how many pieces of glass we will have to render. The lglass appears to look better than the dielectric when we had modeled the ribs/grooves into the glass. But now since we are using a bump map for the ribs, both the lglass and dielectric look kind of poor (we used some guys phenomena off his site). This is why I was also asking about the transparency for this type of glass, because as you can see it is very opaque (though some types are more transparent). Thanks so much for your time, and any help or suggestions would be much appreciated.
Clint

JulianS
03-27-2006, 02:10 AM
What u need is a displacement shader.

I highly recoment "ctrl_multidisplace" by francesca

Take a look at this
http://forums.cgsociety.org/showthread.php?t=251048&page=1&pp=15


http://img94.echo.cx/img94/3679/ctrlmultid0039cc.jpg

JulianS
03-27-2006, 03:26 AM
Here is a cylinder with L_glass and displacement

http://creating3d.com/Help/ice.jpg

zeroeefx
03-27-2006, 03:55 AM
still playing with the getting the color on the glass ,,, can i se a pic of your network ?

JulianS
03-27-2006, 04:42 AM
zeroeefx

There is No network just the L_glass out the box. In this case i just add a displacement map with Glossiness and some Approximation Nodes.


http://creating3d.com/Help/ice_blur.jpg

zeroeefx
03-27-2006, 04:57 AM
no the placeing the label on th surface of the glass ,, having problems with that part ... I got the displacement to work

MrPositive
03-27-2006, 09:28 AM
What u need is a displacement shader.

I highly recoment "ctrl_multidisplace" by francesca

Take a look at this
http://forums.cgsociety.org/showthread.php?t=251048&page=1&pp=15




Hi Julian
My only problem with the displacement is wouldn't it crash the system (or be an insanely slow render) when I'm trying to render 300 pieces of glass with displacement at the same time? I'll test it and thanks man.

JulianS
04-02-2006, 07:26 AM
zeroeefx

For the color just replace the white with an image file. That should do the trick.

zeroeefx
04-02-2006, 01:37 PM
I got the color to work a couple of days ago. Here is what i have been working on ... Any help you can give ... I will take it ... On that same topic I want to thank all who have help me this far.....

http://kennorman.com/bang/bang_updatek.jpg

krolichka
04-02-2006, 04:55 PM
i get this msg when i try to render in mental ray

// Info (Mayatomr): Aborted //

i can see the I_glass material and apply it to the mesh but when i render it doesnt show up.

i get this in my output window

Cannot open plugin C:/Program/Alias/Maya7.0/bin/plug-ins/image/AEl_glassTemplate.mel.
Error: plugin C:/Program/Alias/Maya7.0/bin/plug-ins/image/l_glass.dll does not have valid entry point type/name
Cannot open plugin C:/Program/Alias/Maya7.0/bin/plug-ins/image/l_glass.mi.
Cannot open plugin C:/Program/Alias/Maya7.0/bin/plug-ins/image/render_l_glass.xpm.
mental ray: got 8 satellite CPUs.
API 0.0 error 301031: call to undeclared function "l_glass"
API 0.0 error 301032: while defining material "l_glass1SG": undefined shader "l_glass1"

i followed the instructions from the readme file included when i downloaded l_glass-v2-beta2

Also, in the readme file it says "2. INSTALLING - Windows users need MSVCR71.DLL"
what kind of .DLL file is that? didnt get it when i downloaded l_glass-v2-beta2 ?

thanks in advance

krolichka

Lamster
04-02-2006, 06:25 PM
Cannot open plugin C:/Program/Alias/Maya7.0/bin/plug-ins/image/AEl_glassTemplate.mel.
Error: plugin C:/Program/Alias/Maya7.0/bin/plug-ins/image/l_glass.dll does not have valid entry point type/name
Cannot open plugin C:/Program/Alias/Maya7.0/bin/plug-ins/image/l_glass.mi.
Cannot open plugin C:/Program/Alias/Maya7.0/bin/plug-ins/image/render_l_glass.xpm.


I think normally when I try to install a mental ray shader, I'd place the AE_XXXXTemplate.mel file in the C:/My Documents/maya/7.0/scripts/ folder
The .xpm file in the C:/My Documents/maya/7.0/prefs/icons/ folder
and the .dll file in the C:/Program/Alias/Maya7.0/mental ray/bin/ folder
The .mi file in the C:/Program/Alias/Maya7.0/mental ray/includes/ folder

Then I'd go and update the maya.rayrc file to include the 2 lines to declare the shader one, one to declare the .dll file, the other to declare the .mi file.

That usually works for me.

Terence

JulianS
04-02-2006, 06:38 PM
zeroeefx

Can you tell me a little about your scene. Lighting setup, type of render, global shaders.....
The first thing i can see is that u scene is missign a lot of contrat. This can be fix by adding more ambiant color to the global shadow, it will produce more energy.

Can we also see a snapshot of your global setup

krolichka
Have you try L_Glass_v1. and did u update your rayrc.file

link "{MAYABASE}/lib/l_glass.{DSO}"
mi "{MAYABASE}/include/l_glass.mi"

krolichka
04-02-2006, 06:44 PM
yeah

thats exactly what i did, but it doesnt work.

this is what it says in my file, pls take a look and say what is wrong :

registry "{MRMAYA_START}"
link "{MAYABASE}/lib/base.{DSO}"
link "{MAYABASE}/lib/physics.{DSO}"
link "{MAYABASE}/lib/mayabase.{DSO}"
link "{MAYABASE}/lib/contour.{DSO}"
link "{MAYABASE}/lib/subsurface.{DSO}"
link "{MAYABASE}/lib/paint.{DSO}"
link "{MAYABASE}/lib/mi_openexr.{DSO}"
link "{MAYABASE}/lib/mayahair.{DSO}"
link "{MAYABASE}/lib/l_glass.{DSO}"
mi "{MAYABASE}/include/mayabase.mi"
mi "{MAYABASE}/include/base.mi"
mi "{MAYABASE}/include/physics.mi"
mi "{MAYABASE}/include/contour.mi"
mi "{MAYABASE}/include/subsurface.mi"
mi "{MAYABASE}/include/paint.mi"
mi "{MAYABASE}/include/mayahair.mi"
mi "{MAYABASE}/include/l_glass.mi"
echo "mental ray for Maya - startup done"
end registry
$lookup "{MRMAYA_START}"

cpan
04-02-2006, 07:07 PM
krolichka, try downloading the msvcr71.dll from this link and then copy it in windows/system32:
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr71


help it works

krolichka
04-02-2006, 07:50 PM
Julian, what is vbmenu_register("postmenu_3413423", true); ?

shall i type that into rayrc.file to?

yashy, i downloaded that msvcr71.dll file and when i tried to extract it into the folder it says "do you want to replace the msvcr71.dll file?" and i said yes, and then i got this error that it cant be replaced because some other program might use the dll file. so i closed everything down but it still says i cant replace it.? strange i can apply the glass shader and tweak it and so on but when i try to render it just says // Info (Mayatomr): Aborted //

JulianS
04-02-2006, 08:13 PM
Ho disregard that that was from CGTalk forum.

JulianS
04-02-2006, 08:14 PM
krolichka

Are you other Shaders Working?

krolichka
04-02-2006, 08:29 PM
yes all ot them works fine, and mental ray works fine with them all, but not I_glass, and the thing is that i can apply the shader but the image of the shader looks strange.
but when i render this shader it just says
// Info (Mayatomr): Aborted //

JulianS
04-02-2006, 09:09 PM
The only custom shader i see here is the L_glass try something like the Dirtmap shader and see if that works.

http://animus.brinkster.net/index.html

registry "{MRMAYA_START}"
link "{MAYABASE}/lib/base.{DSO}"
link "{MAYABASE}/lib/physics.{DSO}"
link "{MAYABASE}/lib/mayabase.{DSO}"
link "{MAYABASE}/lib/contour.{DSO}"
link "{MAYABASE}/lib/subsurface.{DSO}"
link "{MAYABASE}/lib/paint.{DSO}"
link "{MAYABASE}/lib/mi_openexr.{DSO}"
link "{MAYABASE}/lib/mayahair.{DSO}"
link "{MAYABASE}/lib/l_glass.{DSO}"
mi "{MAYABASE}/include/mayabase.mi"
mi "{MAYABASE}/include/base.mi"
mi "{MAYABASE}/include/physics.mi"
mi "{MAYABASE}/include/contour.mi"
mi "{MAYABASE}/include/subsurface.mi"
mi "{MAYABASE}/include/paint.mi"
mi "{MAYABASE}/include/mayahair.mi"
mi "{MAYABASE}/include/l_glass.mi"
echo "mental ray for Maya - startup done"
end registry
$lookup "{MRMAYA_START}"

krolichka
04-02-2006, 09:35 PM
i used the melscript getenv "XBMLANGPATH" to see where my current icon directories is, and i am not sure its pointing to the right folder, how can i change that?

JulianS
04-03-2006, 04:38 AM
krolichka

Set ur MR Translation Export Verbosity to Detail Messages.
Let know what it says.

PS: What is "XBMLANGPATH" and where did u download that from?

JulianS
04-03-2006, 05:24 PM
krolichka

I forgot to mention this. from "Trix R 4 Kids"

http://www.jupiter-jazz.com/wordpress/wp-content/data/tr4kv2/html/chapter1-FG.html

Reduce low-frequency flickering when using FG in animations


This is a two steps approach which requires mental ray standalone since Maya 6.0 does not provide support for the 'FG only' rendering mode use in step 1. 'FG only' just creates FGmaps on disk, no images are rendered when this mode is used. These maps will contain only FG precomputing points.


So, you are going to render an animation, say from frame.1 to frame.100 and the trick here is to pre-render in a first step one single FGmap or multiple FGmaps every n-th frames.

Notice that multiple FGmaps are useful in two situations:


when single FG map size is too big
when there are many hosts (more than mental ray can utilize effectively for multihosted rendering), so multiple FG maps are required to parallelize step 1 over many hosts.
If none of these apply, rendering with multiple FG maps is roughly same effective as rendering with one big finalgather map.


Either you have one or multiple FGmaps they will both act as helper(s) in the following Step 2, where we will use such FGmap(s) without evaluating any FG precomputation point (rebuild freeze), only eventual rendering points will be computed.


Step 1 - Rendering FG only


The first thing to do is decide if you want one single FG map or if you want to use n-FGmaps every n-th frames:

1.a - Rendering one single FGmap file


set finalgather 'only'

set FG rebuild to 'off'
specify one single FGmap fine name
Render each n-th frame (n depends on the camera movement speed and the scene).
You will end up with one single FGmap file which contains irradiance informations sampled every n-th frame allover our timeframe. Since rebuild is off we are sure we didn't recompute any point, but just new points and those were appended to the single FGmap.



1.b - Rendering multiple FGmaps files (say we render every 10 frames, keep in mind the gap depends on the camera movement speed and the scene)


set finalgather 'only'

set FG rebuild to 'off'
render frame 10-th on host A with a FG name ["map010"]
When this is ready, render frame 20-th on host A with ["map020", "map010"]
and *simultaneously* render frame 30-th on HOST B with ["map030", "map010"]
and so on...




With multihosted rendering, the idea is to render at least 1 frame on a single (or few with multihosting) host, and when render further frames using all maps which are already finished.

If possible, it is a good idea not to interleave subsequent frames across hosts, but make host A render maps for each 10th frame in the range 0 to 100, host B render each 10th frame in the range 101 to 200, etc. This reduces the amount of redundancy.

You will end up with n FGmap files which contains irradiance informations sampled every n-th frame, since rebuild id set to off each FGmap will contain only the new FG points compared to the previous FGmap, without recomputing any point. Obviously the first map will contain a complete set of points for its relative first frame.

JulianS
04-05-2006, 07:01 AM
Just having fun with the shader.

I saw a tv commercial that use clear text in Frosten Glass, and i was like... L_Glass can do that!

http://creating3d.com/Help/Fun.jpg

zeroeefx
04-05-2006, 01:10 PM
Well here are my settings and lights.. Your glass seem to be still coming out better then mine.
,, I'm trying to get that under ground local bar feel... Any help you guys can give i will take .. thanks for the all the help..
http://kennorman.com/bang/rendersettings.jpg
http://kennorman.com/bang/lightsettings.jpg

JulianS
04-05-2006, 05:14 PM
I can totally see what u doing.

What u need is to add some HDRI into ur scene. U have very little or almost no speculars.
U have few options.

+find an HDRI with colors close enough to u scene
+capture ur own HDRI
+and finally make the HDRI from your scene here is a tutorial that can help u with that.
http://www.vi-motion.de/latlong_Tutorial/

- Dont render all at once, break it down into elements and layers.

On your settings.(note: these will only improve your look after u have a good ligth rig)

- FG Rays are way too low try 1000
- Measure your scene and apply the min max Radius (Usually, the Max Radius setting will be about 10% of the size of your scene, and the Min Radius is 10% of the Max Radius. You can find out the size of your scene by using the "Create > Measuring Tools > Distance Tool
- About Trace:
finalGatherTraceRefraction" 2 + finalGatherTraceReflection" 2 = finalGatherTraceDepth" 4

- Dont worry about caustics for now.

Pixeldisfunction
04-06-2006, 10:01 AM
IM enjoying a lot through the post and learning too, thanks both.

zeroeefx
04-18-2006, 11:04 PM
how did you get the see through look in some of the areas ( like clear glass then smoked glass ) I though it all control by the samples? Where are you placing the texturings?

tryhard
05-09-2006, 09:09 AM
zeroeefx

learned a lot in this thread. thank you all. maybe i can give someting back now. i work with 3sd max but maya will be about the same i guess ...

SFX Glossiness controls the frost.

so as mentioned before 0,02 ist a good starting point. soft frost ...

the clear areas are done by a mask in this slot. i took a black an white mask. but beware. white is the same as 1,00. so you can control it by an output mask. set rgb output to 0,02. so white will be reduced to this value, thatīs the frost - and black remains and this is the clear area.

hope that helps

JulianS
05-10-2006, 07:34 AM
Hello zeroeefx

i Just Post all the scenes in this Thread

"Here are some of my scenes The one with displacement ,Levels of Frosten, Displacement, Color and clear Vs Frosten. Enjoy :)"

http://forums.cgsociety.org/showthread.php?p=3531163#post3531163

how did you get the see through look in some of the areas ( like clear glass then smoked glass ) I though it all control by the samples? Where are you placing the texturings?

JulianS
05-10-2006, 06:17 PM
How to set Match The Color Chooser Values To the Color Picker in Photoshop???

Is simple as I mention before I use values that range from .025, .050, .1, to .2. it can get messy trying to find out the correct number to match in Photoshop, so the solution is to change the "Color Chooser" to RGB and then 0 to 255. Now you have numbers that can be use in Photoshop.

This way you can paint Glossiness, Dispersion, saturation and everything u need to create a custom Glossy look.

NOTE: the same technique can be use for the rest of attributes including color. Test the color and Maya and then paint them in Photoshop.

I hope this Help. =)

http://creating3d.com/Help/Color%20Chooser.jpg



http://creating3d.com/Help/FromToColor.jpg

gioffry
01-23-2007, 05:44 PM
Just having fun with the shader.

I saw a tv commercial that use clear text in Frosten Glass, and i was like... L_Glass can do that!

http://creating3d.com/Help/Fun.jpg

can you help me ... to make left glass ? (with lglass)

flatulentFuzz
12-26-2007, 09:38 AM
Is there any way to get this shader to work in MAX?

Any help would be appreciated

silentwind
01-22-2008, 09:04 AM
i need to get the dispersion effect in a diamond.seems this shader could work it out.
but the lglass v2.0 website link has dead.

does anyone here has a copy? i really need something like this.
if anyone still got this shader,please send me one. thanks alot

or is there anything better than lglass shader?

HellstormDe
01-22-2008, 06:54 PM
Anyone tried the mia_material and mia_material_x shaders for things like frosted glass with clear text?
I guess this shader should also do the job.
You could also add some transluescency to get a more milky look.

CGTalk Moderation
01-22-2008, 06:54 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.