Gradient Bump Map or Label

Started by blessid, December 03, 2013, 04:43:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

blessid

Is it possible to add a gradient texture to a material? I.e. I want a piece of glass that is frosted at one end, and fades to transparent at the other. i thought it may be as simple as creating a black to white gradient in in Photoshop and using it as a bump map, but it doesn't seem to work. I want to achieve something similar to the effect in the image below, though probably with a smoother gradient.


TpwUK

Try setting the gradient to the opacity slot and not to the bump ... Bump is for the texture of the material, as opacity is for transparency

Martin 

edwardo

I think the best result would come from merging two images in Photoshop, though this is no use if you want to animate.

Ed

blessid

TpwUK I have given this method a try, but the problem is that as it is being used as an opacity map, the 'white' end of my glass is invisible instead of just transparent.

Ed, this method certainly will help me for the time being, but as you say, for animation it wouldn't be any good.

I'm sure there must be a way. Hmmm...

edwardo

I've not tested these methods..... just a theory

Try duplicating the geometry, with one clear glass and one frosted, then flip the gradient assigned to opacity (180 degrees) of one of them (so frosted is at bottom and clear is at top). I'm guessing this might have strange results due to clashing geometry however.

Or

Try offsetting the outer geometry of each bottle by a fraction of a mm. Set this outer 'skin' material to a frosted glass effect then apply the gradient to the opacity setting, making it fade out towards the top. Most people use this offsetting technique for applying paper/foil labels on bottles and packaging (I think).

Hope one of these helps.

Ed

blessid

Hey,

Some great ideas! I think your second idea is probably likely to be the best option. I would imagine that, as KeyShot imports surface bodies from SolidWorks, i could essentially create a copied surface in SolidWorks then just import and update the model in KeyShot. As you essentially said, i could then make my solid body glass, and make my surface body a gradient frosted glass.

I had a bit of a brain wave on this (i think). As KeyShot uses black and white values to determine the opacity i think that as i have a black to white gradient (essentially 0%-100%) KeyShot is reading the black end of my gradient as 100% opacity. So KeyShot, naturally, assumes i want it to be invisible. Of course, glass is not 100% clear! So maybe if i change my black value to 93% (the approx. transparency of glass) i should theoretically get the results i desire?

I'll test both methods and let you know how it goes!

Luke

blessid

Okay, so i gave both methods a try...

My own method of changing the 100% opacity to 93% made very little difference.

I also tried the method of creating an offset surface, which i then added a frosted material to and a gradient map for the opacity. For some reason I am getting a scattered affect, where the original colour of my surface is still visible??? (See image below). Its hard to evaluate the effect of this method until i can see clearly what i am looking at.

All the best
Luke

TpwUK


edwardo

hi,

this was done using an offset surface (out side the bottle) with the frosted effect and uses a black/white gradient in the opacity setting. Its a terrible render and bad composition, but seems to get the effect right.... sort of. All keyshot... no post work at all!

let me know if you want the bip

hope it helps, or gets you started in the right direction at least.

Ed

blessid

Ed thats really good!

What did you use for the gradient map, did you make it yourself?  Any tips? How much did you offset the surface by? And did you use SolidWorks?

Thanks

edwardo

Hi, I used the 'linear gradient' that comes with keyshot but I increased the canvas size in PS (vertically) and added pure white at one end and pure black at the other ( just so I had a bit more flexibility when mapping it on). The bottle was modelled in rhino. It is 40 mm in diameter and the frosted 'skin' is offset by 0.1 mm. The frosted skin is actually a plastic material - you get a lot more variables to play with.

blessid

Thanks Ed. I'll give it another go. hopefully i can over come that strange scattering of yellow i'm getting too.

edwardo

Remember to check the global illumination box and probably put your ray bounce value to nearer 20 or so.

Good luck
Ed

blessid

Thanks Ed. Is there still any chance you can still share your bip.?

Cheers
Luke

Dominic Fasino

Hi! I know this post was a while ago, but I followed this tutorial https://www.keyshot.com/how-to-create-water-droplets-in-solidworks-to-render-in-keyshot/2013/ (I think) for a similar issue. If you offset the surface just a little like previously mentioned that should help. You can get away with a smaller offset if you make sure your tessellation quality is turned up when importing and make sure you save with a high quality before your import. If you are using Solidworks you should turn up your model display and save out your model, my friend found out that will help your geometry when importing. The weird effect you were getting when duplicating is when to surfaces are so close that overlap, this can also be seen in Solidworks when or offset a surface a 0.  I attached a picture of a test I made a while ago instead of a frosted gradient I used a condensation gradient, but the same idea should apply.