PDA

View Full Version : Refractions rendering out grainy


Kev3D
05-26-2009, 02:10 AM
I'm using mental ray to render out a beer bottle. I've set up all the shaders correctly (as far as I understand them). I set the outer IOR to 1.45 and the inner to 0.885.
I gave the glass a low refraction falloff with a brown colour.
I gave the beer a higher refraction falloff with an amber colour.
I put a white card behind the bottle to illuminate it against the black background.
Now when I render it out, it looks very grainy and I am at a loss as to why that is. I've tried increasing the AA samples to 4,4.

I tried playing with refraction gloss samples and interpolation. This changed the look of the grain (bigger or smaller) but never illiminated it. I don't understand why this would have an affect at all since I have Refraction Gloss set to 1.

Has anyone got any ideas on how to get rid of this problem, I would really appreciate some help.

royter
05-26-2009, 06:25 PM
what's your lighting setup?

Kev3D
05-27-2009, 01:32 AM
Lighting setup is just a single spot light.

I've managed to get a pretty good result, it turned out to be an issue with gloss interpolation.

Now my problem is to do with droplets on the bottle. I thought that a displacement map would be the way to go but now it looks like the droplets are part of the bottle. Any ideas for a better solution?

royter
05-27-2009, 01:55 AM
model droplets that use the paint geometry tool to scatter them on the bottle

Kev3D
07-10-2009, 02:06 AM
Okay, the original problem has reared it's ugly head again. It seems that as soon as I give the refraction some gloss, I get this annoying noise again. I really want to give it some gloss because this looks the best and I am aiming for a high level of realism. If I turn on interpolation, I get flickering when I render out an animation. Rendering with rediculously high fixed samples (3,3) does seem to improve the situation but the render times go through the roof.

Does anyone now how to get good looking glossy refractions - that work in animations - along with manageable render times in Mental Ray? Is it at all possible? I'm starting to think that the answer is no, tell me I'm wrong.

Hamburger
07-10-2009, 03:39 AM
Now my problem is to do with droplets on the bottle. I thought that a displacement map would be the way to go but now it looks like the droplets are part of the bottle. Any ideas for a better solution?

http://forums.cgsociety.org/showthread.php?f=7&t=774976

Stellios
07-10-2009, 03:51 AM
ive never tried this so forgive me if it sounds stupid.


You could use shave and a haircut to instance geometry all over giving you control of the size and frequency of the droplets... maybe even have a couple difference hair systems for a couple of different droplet shapes? If this sounds dumb forgivness please. LOL

Kev3D
07-10-2009, 05:06 AM
http://forums.cgsociety.org/showthread.php?f=7&t=774976

GOLD! Thanks for that. I ended up using round droplets using Paint Effects but they look a bit too regular so I might give this method a shot.

Stellios: Sounds like a good idea but I have to be honest, I've never used shave or haircut so I have no idea whether that would work or not, I might give it a shot, see how this other method pans out.

No info on glossy refraction noise?

Libor
07-13-2009, 12:41 PM
Morlankey> Regarding your aliasing issues with refraction first thing which should help is to use adaptive sampling (do not use sampling like 4,4!!) with conjunction with contrast threshold parameter.

standard render settings (most cases):

min samples 0
max samples 2
contrast 0.100

High quality render settings (moire, staircases on edges)

min samples 1
max samples 3

contrast 0.100 (or even 0.05)

Do not use fixed sampling even on 2,2 ever (it kills your renders)


Regarding glossy refractions using mia shaders, I experienced the same issues as you, interpolation works when using high refraction samples (like 48) and resolution 1:1.

There is also another way, go and explore mip_rayswitch shader its really worth it ....basically what it does is that you can override shaders used for different rays (refraction, reflection, irradiance etc)

Hope this helped a bit.

L.

Kev3D
07-14-2009, 03:12 AM
Hi Libor, thanks for the tips.

I used 2,2 because it was my understanding that fixed sampling was best for glossy effects. I've also tried 0,2 and 1,3 each with contrast of 0.01 and the problem still rears it's ugly head.

I will give interpolation a go with high samples, sounds like it could be the key. I'll also give the mip_rayswitch a go.

Now, the brief has changed from lots of droplets to something more like this:
http://features.cgsociety.org/gallerycrits/170275/170275_1206586476_large.jpg
Created by Micah Stanley (http://micahthemartian.cgsociety.org/gallery/) in this thread. (http://forums.cgsociety.org/showthread.php?t=613658)

The description says that he cheated the condensation in Photoshop. I assume this means that he overlayed a photo of condensation on a flat surface. This obviously won't work for an animation.

So, are there any ideas? Is this at all possible?

Kev3D
07-15-2009, 01:41 AM
I'm sure I saw a thread somewhere here where someone had a similar question about getting the cold frosted look on the bottle. Another person answered the question briefly and then wrote a tutorial on how to do it as part of a series he was working on (maybe a book?), anyone remember such a thread?

edit: Finally found the thread I was talking about (http://forums.cgsociety.org/showthread.php?f=183&t=649244&highlight=ice+bottle). looks like he's put a map into the glossy parameter. Would probably work in an animation but doesn't look as real as the above example.

noizFACTORY
07-15-2009, 05:57 AM
If you put a 2d texture like fractal or noise in the bump slot of the mia shader at a low bump value then it breaks up your refractions and speculars as well which can give you that frosty look you are after.

-Sachin

Libor
07-15-2009, 10:45 AM
For the moisture and water droplets there are only two ways (not counting post in PS) >

To place some modeled drops on the bottle (probably best and most realistic result)

or cheat it in material using bump maps/ displacement in conjunction with carefully made masks for different paramters so glass surface has different settings compared to areas where bumps stick out.

Definetely check "No diffuse bump" checker in bump category in Mia_mat rollout (it basically looks like transparent bumpy layer over the surface of the object itself).


So in the end its all about a way to save a lot of work (way of placing all the stuff over your model) > particles, paint geometry etc....its upon you.

Cheers!

MicahtheMartian
07-15-2009, 04:13 PM
The description says that he cheated the condensation in Photoshop. I assume this means that he overlayed a photo of condensation on a flat surface. This obviously won't work for an animation.

So, are there any ideas? Is this at all possible?



Hi Kevin,


Yes, it's layer upon layer of two or three photos of condensation. I erased areas, enlarged other, enhanced things, etc. I actually didn't think it would work but it turned out ok. Not so good on the Yuengling bottle, lol. Fun little projects though.


As for an animation....I think Libor's got it in the above post. You could try a combination of the two. Maps for the smaller drops, fog, frost and geometry for the larger. Do the larger drops first, unwrap uv, paint/place texture around larger drops in photoshop? IDK, just thinking out loud, lol.




Micah

noizFACTORY
07-15-2009, 05:03 PM
I'm not sure if this will help you but there is some great info on creating frosted ice in this thread (http://forums.cgsociety.org/showthread.php?f=87&t=724375&highlight=frosted+ice), especially in post number 9 (http://forums.cgsociety.org/showpost.php?p=5658472&postcount=9) .

-Sachin

MicahtheMartian
07-15-2009, 06:10 PM
I'm not sure if this will help you but there is some great info on creating frosted ice in this thread (http://forums.cgsociety.org/showthread.php?f=87&t=724375&highlight=frosted+ice), especially in post number 9 (http://forums.cgsociety.org/showpost.php?p=5658472&postcount=9) .

-Sachin



Ok, that's excellent!!

Kev3D
07-17-2009, 02:44 AM
If you put a 2d texture like fractal or noise in the bump slot of the mia shader at a low bump value then it breaks up your refractions and speculars as well which can give you that frosty look you are after.

-Sachin

I like the idea of breaking up the reflection. I have to admit I haven't had a chance to give it a go but I wander if a simple fractal would look good close up?

For the moisture and water droplets there are only two ways (not counting post in PS) >

To place some modeled drops on the bottle (probably best and most realistic result)

or cheat it in material using bump maps/ displacement in conjunction with carefully made masks for different paramters so glass surface has different settings compared to areas where bumps stick out.

Definetely check "No diffuse bump" checker in bump category in Mia_mat rollout (it basically looks like transparent bumpy layer over the surface of the object itself).


So in the end its all about a way to save a lot of work (way of placing all the stuff over your model) > particles, paint geometry etc....its upon you.

Cheers!


As for an animation....I think Libor's got it in the above post. You could try a combination of the two. Maps for the smaller drops, fog, frost and geometry for the larger. Do the larger drops first, unwrap uv, paint/place texture around larger drops in photoshop? IDK, just thinking out loud, lol.


Thanks for the tips guys, I think this is a great solution.

I've sussed out the geometry paint tutorial, that method works really well for the larger droplets.

The really tiny droplets could forseeably work with a bump map, my only question is, how would you produce the bump map? I've tried using the 'stained glass' then 'gaussian blur' filters in Photoshop. I was mapping it to the displacement at the time. It looked okaybut a bit too regular. Maybe the trick is to make a few layers with different sized droplets and mix between them.

Last night I was at a screening where there was a bucket of ice with some beers in it so I had a chance to see what happens with really cold bottles. In this situation the bottles just appeared to go pretty frosty (read blurry reflections) over most of the bottle, I didn't see any micro-droplets although there were a few normal sized droplets. Now I know I've seen the micro-droplets before (the fact that Micah used real photographs is testement to this) so I'm going to guess that maybe air temperature and humidty plays a role in this. I'll bet this has been studied by scientists.

Anyway my point is, I might not have to go down the micro-droplet route.

During my searching travels I found this thread (http://forums.cgsociety.org/showthread.php?f=43&t=746368&highlight=coca+cola) where Mikko used an interesting technique to get a stylized frosty look. I've been playing a bit with some frosty textures found on cgtextures.com and have managed to achieve some decent results.

I'm not sure if this will help you but there is some great info on creating frosted ice in this thread (http://forums.cgsociety.org/showthread.php?f=87&t=724375&highlight=frosted+ice), especially in post number 9 (http://forums.cgsociety.org/showpost.php?p=5658472&postcount=9) .

-Sachin
Thanks for the link, lots of useful information there. I've made so many searches (cold bottle, frozen glass, frosted glass, etc.) can't believe I didn't find that one.

Anyway, I'm going to give it another shot hopefully next week (I'm on another job at the moment) I'll keep you posted. Thanks for all the useful info. Meanwhile if you come up with any more ideas, please, post them here.

Kev3D
07-17-2009, 06:03 AM
Okay, just had a closer look at a cold beer and it turns out that what I originally thought was a smooth seft reflection for the frosted bits is actually made up of lots of really really tiny droplets. I don't think the camera will get close enough for this effect to make a difference though.

Libor
07-17-2009, 10:18 AM
when talking about the scale of the droplets and way to achieve it you must consider the distance and resolution for your camera/scene....


So I would do the micro level via shader and its glossiness/specularity channels (read mapping these values somehow).

Regarding droplets of midsize (in bumpmap) and how to prepare them I would give a try Zbrush and sculpt them directly on the bottle and bake some bumpmaps or displacements.

There is almost no way to do reasonable "height maps" from regular photos of water/liquid droplets...maybe cheat it using CrazyBump application (trial version is available online).

Cheers!

L.

CGTalk Moderation
07-17-2009, 10:18 AM
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.