How to Setup Materials for Assets to Mimic A Game Engine?

I’ve been creating quite a few assets to be used in various game engines, but have trouble previewing them correctly in Blender. I’m wanting to be able to preview them as they would be seen in a game engine, or even just a basic setup like P3D would be awesome.

Here is my current node setup (Yes, the fresnel isn’t even connected):

Does anyone have a good node layout for such a setup, or suggestions to make my current one work?

My diffuse and normal seem to work fine, but I’m thinking my normal is losing some of it’s potency (hence the Normal Map node). Aside from that, I’m having a hard time finding the right way to apply the specular and fresnel to show correctly. :spin:

Thanks in advance. :smiley:

Erm…, a diffuse shader (the only shader you use) by definition doesn’t show any specularity or reflectivity. If you want that, you will have to use a mix shader of glossy and diffuse, with the Fresnel and specular maps as mixing factors for those two shaders.

Also, I’m not sure how much sense a dedicated Fresnel map would make - you can simulate those effects much easier with the Fresnel / Layer Weight nodes.

Ok, I’ll see what I can come up with. Any suggestions on the normal map, or is that fine? I tried using the specular and fresnel as their own glossy shader, but even set as “non-color data”, it still shows the white, which it should just effect the actual roughness, and gloss. What am I doing wrong?

The fresnel map is so that I can control the effect over different visual materials I use in a single model. I don’t want everything to be glossy, just the spots on the map.

I think this could be a typical setup:

You use a mix shader to combine glossy and diffuse attributes and the “specularity” map acts as the mixing factor between the two.

Not sure if I understand your normal issue, but do I understand correctly that your “Fresnel” map is in fact a “reflectivity” map? Fresnel (in my understanding) means a certain optical effect of reflections getting stronger at glancing angles.

In addition to that, Cycles doesn’t really have a concept of “specularity”. In fact, specularity is in a way a cheap imitation of reflectivity from the early days of CG or in situations where real reflection is too costly to calculate. As a pathtracer Cycles only knows “real” reflection, so, it seems your “specularity” map and your “Fresnel” map actually do the same thing?

Are you sure Cycles is the best way to visualize your game models? It seems to me that Blender’s internal renderer is closer to the shading mechanisms of game engines and all of your different maps will actually have corresponding shading effects there?

Fresnel (node) is the same as facing factor (pronounced frenell/fray-nel btw :)), except abide to laws of physics, where the governing factor is (real factor of) material index of refraction. Fresnel (mode) in the layer weight node is supposed to be a 0-1 normalized value of fresnel values, but I don’t know the range or how its computed.

Fresnel (both the node and layer weight mode) currently seem to bug out badly with Transparent Shader, and you’ll have to approximate using Layer Weight in Facing mode. For dielectric reflections (plastics, glass, topcoats etc) I pretty much always use Fresnel (node), maybe at high values to get a more solid effect, and then multiplying with <1 value to bring down the reflectivity if I need to.

True, “specularity” used to be just fake reflection of light sources. Now, specularity and reflection is the same thing. However, it would be extremely useful to have access to a isotropic/anisotropic specular “ramp shader” which doesn’t deal at all with real reflections.

Cycles have a non activated Phong shading as a specular distribution model, but I’ve never tried it. Does this reflect as well? If not, does it have limitations to what kind of light sources/emitter will be accounted for in shading? Hell, even with use restrictions this would be extremely usable as a builtin shader, if only to add to other shading effects (iridescence being a perfect example, for when the real thing isn’t simulated at all).

Yeah, but I’m not quite sure how this is related to the OPs question?
However, is it really necessary to hijack this thread with your rant about Fresnel and transparency in Cycles or your feature requests for shading nodes? You have made that point in other threads already. Just saying…

Ok, that setup works great! I had never thought of putting the diffuse and normal through both shaders. :S

I would have thought there was a way to use the fresnel, since I’ve seen many threads where people used the fresnel for their facing value to various effects in cycles, but didn’t really help in terms of mixing with a diffuse/normal/spec map. I’ll look around and see if there is a resource I overlooked, that will help my achieve this goal. I could go back to the internal render engine, but I’ll keep looking around until I know it is not possible.

Thanks a bunch Ikari! That node setup has given me a great base to work from, and hopefully learn a lot more about materials and lighting.

Thank you as well Carl! That was definitely one of the best explanations of the difference of the two maps, and has helped me understand how Blender makes use of these effects.

Ok, I have a setup that works now, and this is what it looks like:

If anyone knows of a better setup, please let me know. In the meantime, this will work just fine. :slight_smile:

Thanks for all of the suggestions, and help along the way!