KeyShot Forum

Share => Materials and Textures => Topic started by: blessid on December 03, 2013, 04:43:52 am

Title: Gradient Bump Map or Label
Post by: blessid on December 03, 2013, 04:43:52 am
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.

Title: Re: Gradient Bump Map or Label
Post by: TpwUK on December 03, 2013, 08:46:22 am
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 
Title: Re: Gradient Bump Map or Label
Post by: edwardo on December 03, 2013, 04:47:53 pm
I think the best result would come from merging two images in Photoshop, though this is no use if you want to animate.

Ed
Title: Re: Gradient Bump Map or Label
Post by: blessid on December 04, 2013, 08:44:33 am
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...
Title: Re: Gradient Bump Map or Label
Post by: edwardo on December 04, 2013, 10:37:31 am
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
Title: Re: Gradient Bump Map or Label
Post by: blessid on December 10, 2013, 04:01:18 am
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
Title: Re: Gradient Bump Map or Label
Post by: blessid on December 11, 2013, 02:55:12 am
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
Title: Re: Gradient Bump Map or Label
Post by: TpwUK on December 11, 2013, 04:02:37 am
hmmmm interesting challenge ....
Title: Re: Gradient Bump Map or Label
Post by: edwardo on December 11, 2013, 11:47:12 am
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
Title: Re: Gradient Bump Map or Label
Post by: blessid on December 12, 2013, 01:38:50 am
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
Title: Re: Gradient Bump Map or Label
Post by: edwardo on December 12, 2013, 02:27:16 am
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.
Title: Re: Gradient Bump Map or Label
Post by: blessid on December 12, 2013, 04:27:02 am
Thanks Ed. I'll give it another go. hopefully i can over come that strange scattering of yellow i'm getting too.
Title: Re: Gradient Bump Map or Label
Post by: edwardo on December 12, 2013, 04:41:48 am
Remember to check the global illumination box and probably put your ray bounce value to nearer 20 or so.

Good luck
Ed
Title: Re: Gradient Bump Map or Label
Post by: blessid on December 13, 2013, 10:25:22 am
Thanks Ed. Is there still any chance you can still share your bip.?

Cheers
Luke
Title: Re: Gradient Bump Map or Label
Post by: Dominic Fasino on February 21, 2014, 04:44:14 am
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/ (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.
Title: Re: Gradient Bump Map or Label
Post by: tomlai on March 14, 2014, 07:41:46 pm
No micro offsets creating airgaps .... just separate the SURFACES and apply correct materials and IOR in keyshot
Title: Re: Gradient Bump Map or Label
Post by: tomlai on March 14, 2014, 09:15:22 pm
Use standard Rough normal ....
open in PS
select all
Create Pattern

Canvas Size -1000%
Paste pattern

Create mask
Create vertical Gradient
Apply Gaussian Blur

You get a hi-res rough normal texture

------------------

Apply to bottle using cylindrical map (no repeat)
Rotate cylindrical mapping to match axis of bottle
Scale to fit usually x axis scale is 10
Y axis scale to fit prolect object

Voila
gradient bump map
You can use other available texture normals as well for different patterns /logo etc
Title: Re: Gradient Bump Map or Label
Post by: tomlai on March 15, 2014, 12:57:37 am
one more render