Hi, so I've tried researching this but can't seem to find a straight answer.
I have an asset in UDK where part is glass and part is not glass. Glass needs to be glossier than the rest of the material.
Previously I had assumed that the 'specular power' slot behaved similarly to the gloss map slot in 3d programs, but now I seem to be learning it's only meant for a single value and UDK doesn't like when you try to use a bitmap in it? (I tried the 'multiply' trick but it didn't help at all, the highlight was reduced but remained the same radius through the whole asset)
So what's the deal? Is there any way to get an image to work in this context? And if not, how are we supposed to achieve material separation in UDK with no control over the gloss factor?
Replies
I'd guess the brightness difference in your texture is too small or it's some sRGB/linear space issue.
Hmm, I think I got it working. I had to REALLY crank the contrast/material difference on the gloss and combine that with multiplying by a VERY high value (of 2000) to get a noticeable difference in highlight radius. Thanks for the tip!
I confused cause I was going through some threads on other forums and the explanations ranged from everything from 'spec power slot only wants a constant value' to using some bizzare lerp node network to get it going lol
Also are you using a specular map? Because that will be the defining feature to truly give the light reflection of the glass.
Yup, of course. Specular and also a cubemap (right now some generic UDK one but I'll prob make a custom one that represents my level more)
this lets you explicitly tell the shader what the lowest and highest specular exponents you want to represent, than just have it interpolate everything in between.
or i just use a constant.
The only times i tend to use the lerp setup, is if im making a material for a object, that has multiple material types like wood, metal, glass, rubber etc. Since all of those materials got very different specular exponents.
so would that basically be analogous to using the "levels" function in photoshop on an image?
Still sounds like there is something off if such a large contrast and multiply value is required. Mind showing your spec textures?
For a quick comparison, this is what I get with a texture with pure white and mid grey and a multiply by 50. You can clearly tell the difference in the spec highlights: http://abload.de/img/texturespecpower01cpunh.png
Also it's true that a Lerp node will give you more control over the spec power values within the editor.
Sure, here are the textures I'm using for spec:
And this is what the asset looks like with, like I said, the spec power multiplied by a value of 2000:
Well it good to level gloss textures before export so your using the full range of values in the image, but no.
Levelling maxmizes the usage in the 0 to 1 range, the lerp let's me take data that is in 0 to 1, and represent a new range like say 15 to 80.
Really your door is pretty much all metal so you could have it all as a cconstant.
Also I think you glass should have dark colour in gloss not a high colour.
In the specular power low values like say around 5 will give you very wide and large highlights which is more ideal for glass. For the metal I would try for values between 30 and 80.
Yeah metal and glass aren't thaaaat different in spec, it probably wouldn't be that noticeable esp. once there's a cubemap there but I'd rather just get this figured out, since sometimes i like to use a gloss map even when there's no difference in materials, just to give the spec a richer and more dynamic feel.
Wait, so are you saying lighter values = broader highlight, and darker values = smaller highlight ?
That might depend on the target engine. In UDK, I know that smaller value = broader highlight, bigger value = tighter.
Really most of glass look you will need to use a cubemap for.
I mean when you think about, the reason things like cube maps are used for glass is it's supposed to simulate a mirror-like reflection, which is enabled by the fact that the highlights on glass are so small, they allow for the "resolution" to reflect light down to being able to make out individual objects in a reflection, at least that's my understanding, and why in Marmoset for instance, "cubemap" reflection is enabled only when you have a very high gloss on a surface.
Just expirment make the prop and shader place it in the scene, and tweak.