Thursday, March 12, 2015

Unreal Engine 4.7 New "Two-Sided Foliage" Shader

Along with some other great updates, UE 4.7 now has a  "Two-Sided Foliage" shader. This is a great enhancement to the traditional Two-Sided option for "Default Lit" shaded materials. This shader enables sub-surface coloring on the back sides of thin planar geometry such as leaf planes and grasses adding much more realism. Below are 2 examples of the effect. The first is a screen capture of a mid-poly tree using "Branchlets" (as I call them) or "Fronds" (as with SpeedTree) made up of planar mapped branches, twigs and leaves on a single surface rendered in UE 4.4 without the Foliage shader option. A little "Emissive" self illumination has been added to help show both sides of the surfaces. Not an ideal solution but you get the idea. Also, this first render did NOT use a skylight. Just an omission on my part, not to demonstrate any particular effect.
A standard "Default Lit" 2-sided shader in UE 4.4

This 2nd image is the same tree using the new Foliage shader with the Sub-Surface effect. Notice how nicely lit the backs of the leaves are. This scene does also contain a skylight so there is a little indirect illumination as well, but it is not responsible for the sub-surface effect.
"Two-Sided Foliage" shader from UE 4.7

Here's a screen shot of the material setup. The Diffuse texture is also used to dictate the sub-surface illumination. Wiring it through a multiply parameter allows for some fine tuning. Epic recommends that you use perhaps a separate texture for this that has more contrast to dictate how the sub-surface effect varies within the texture map (twigs, veins, etc.). Cranking up the Multiply effect on the Sub-Surface Color can eventually wash out the effect much above 3 or 4. The Multiply parameter is not required on the Diffuse property itself but I like the added control to adjust the look.
A material using the new "Two-Sided Foliage" shader in UE 4.7

Below are also 2 screen shots "in game" of the tree in UE 4.4 and then in 4.7 Again, there was no skylight used in the UE 4.4 sample and perhaps a little too much "Emissive Color". In addition, a simplified Normal map was used, just the diffuse shader run through the nVidia filter in Photoshop. In the 4.7 sample a proper Normal map was used to specify and enhance the random orientation of the leaf normals, producing a far superior looking tree without any additional enhancement.

Tree in Unreal Engine 4.4 with standard "Default Lit" shader

Tree in Unreal Engine 4.7 using "Two-Sided Foliage" shader 
with enhanced Normal map and Skylight for indirect illumination.




Displacement Changes Do Not Update - Quick Tip

Have you ever been tweaking your Displacement render settings in max but don't see the results updating in your renders?

A quick tip when this happens is to make sure you have "Geometry Caching" disabled in the "Processing" tab of the mental ray renderer.


I've made this mistake several times and only seem to remember after several dramatic changes to settings seem to have no effect on my renders.

Monday, March 2, 2015

Unreal Engine is Now Free

Today (3/2/15) Epic Games announced that Unreal Engine is now available for free.
Click here for the official announcement.
The license restrictions still apply but there is no longer a monthly subscription fee, which frankly, was already a pretty good deal. We'll see if Unity follows next. It seems like the 2 companies are caught in an "Epic" battle to win over the gaming community.

Wednesday, January 28, 2015

Will Autodesk kill 3ds max next?

There have been so many extensive forum threads on this topic over the last year since Autodesk did away with SoftImage. A lot of warnings to 3ds Max users to choose another software program fast, abandon Autodesk, fear for your life, start learning Maya, etc. Max was next on the chopping block. The SoftImage users were a dedicated bunch, though statistically shrinking, but imagine how you'd feel if your career software package hit its end-of-life cycle? I thought these insights from the Digital Tutors Blog were very good and the subsequent comments insightful.
Read it here

Tuesday, January 27, 2015

Max 2015 vanishing icons

This bug has been bothering me since day 1, where sometimes the toolbar icons (particularly drop-down lists) or even parts of the UI vanish while working. Research has told me that this is because max 2015 is using hardware acceleration to draw the UI and in complicated scenes or when lots of graphic's intensive resources are being called up, some parts of the UI don't get completely redrawn.
Either way, an interesting workaround was mentioned on one of the forums (sorry, I don't remember the user). Pressing the "M" key to quickly toggle the Materials Editor will force a redraw of the icons and UI. Seems to be working so far. Thanks! (whoever you were).

Nitrous Soft Shadows & Shadow Map Resolution

Call me an idiot if you like, but when trying to achieve soft shadows from a Nitrous display, I just couldn't get it to work. Changing the Shadow Map size on the lights had no effect, nor increasing the Lighting and Shadows Quality slider in the Viewport Configs. Well, a little research and it turns out it's been there for a while if you try taking the Quality slider DOWN to the left. I didn't think to keep setting the quality of my viewport shadows down to lower and lower settings, but 2nd from the left is "Point Lights/Soft-Edged Shadows". Not sure how this affects other parts of the viewport quality but it might be handy on occasion.

You can use this feature along with a MaxScript command (available since 2014) that controls the shadow map resolution used to display shadows in the Nitrous viewports. Shadow Map size for lights ( you must have physical lights in the scene, not the default lights) can be set with a simple MaxScript command referring to the Nitrous Graphics Manager core interface. The default Shadow map size used by Nitrous is 512 but you can raise or lower this to your liking to affect the crispness of the viewport shadows. Use the following MaxScript command, typed into the Listener (w/o quotes of course):  "NitrousGraphicsManager.ShadowmapSizeLimit = 1024"  
(or whatever size you like, but not likely above 4096 which is the typical high end texture size limit for graphics cards). Keep in mind that though maxScript expects this number to be an integer value, it's probably a good idea to keep it power of 2.

Viewport Mouse Focus & Focal Point Sampling

There's been a feature out in max since 2013 called "AutoFocus Viewport" that allows you to maximize a viewport from a multi-view display, based on the current location of your mouse (with the hot key for maximizing a viewport (Alt+W)). In other words, you can maximize a viewport simply based on whether your mouse cursor is currently in that viewport. Previously you had to R-Click to activate a viewport before maximizing. This functionality can be enabled/disabled from the "Mouse" tab of the "Customize UI" options.The "Mouse" tab was implemented in release 2013 and also contains some other features including some old favorites that used to be in the "Viewport" tab of the "Preferences" options.


There have been some additional issues reported by users related to a new 2015 viewport navigation feature (not documented very well IMO) to resolve some older viewport navigation complaints. Any long time user is familiar with max's perspective view problem zooming and panning in large scenes. For example, after a lot of zooming in to an object, the increment of zoom and pan becomes very small and you are forced to zoom extents to re-establish an appropriate increment based on your current view/proximity. "Viewport Focal Point Sampling" was implemented to try and fix this, but apparently didn't work very well. You can follow some of the threads about this here: Focal point Sampling Issues. It is reportedly fixed in Serve Pack 3, though one of the user comments on the SP 3 release states that it is not fixed. SP3 is included in Extension 2 for subscription user and can also be downloaded here available from here: