Page MenuHome

New Material Preview
Closed, ResolvedPublicTO DO

Authored By
William Reynish (billreynish)
Nov 7 2018, 11:17 PM
"Yellow Medal" token, awarded by duarteframos."Love" token, awarded by kynu."Love" token, awarded by Jaydead."Love" token, awarded by oxben."Love" token, awarded by zeddb."100" token, awarded by DaPaulus."Like" token, awarded by Bit."Love" token, awarded by Quijx."Love" token, awarded by sebastianmroy."Love" token, awarded by wo262."Like" token, awarded by 0o00o0oo."Love" token, awarded by amonpaike."Love" token, awarded by julperado."Like" token, awarded by juri3d."Love" token, awarded by aliasguru."Love" token, awarded by Scaredyfish."Party Time" token, awarded by manitwo.


With the addition of Eevee, we had to update our built-in material preview, which didn't work with it. This has prompted a larger update to the material preview.

The project makes use of work done by Robin Marin (Tuqueque) who put together some new material preview shapes. This has been adapted for use in the material preview.

List of changes

  • Added full support for Eevee (with an Irradiance Volume and Light Probe)
  • Added Shader Ball, Cloth & Fluid preview shapes
  • Removed the Monkey object. I think that the new shader ball is a better material preview object
  • Replaced mesh lights with light objects, which work in both Eevee & Cycles.
  • Added slight bevel to the cube
  • Objects have more subdivisions for previewing displacement
  • Fixed & improved UV mapping for all shapes
  • Added the new icons for the new preview types
  • Small changes to the Blender source code to support this new material preview

Here are some images that give an idea of what the new preview looks like. In this case Blender is set to Eevee:


Preview blend file:

Special thanks to Robin Marin (Tuqueque) who supplied the new preview shapes.

I would welcome some testing on this material preview with many types of materials.

Revisions and Commits

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@Gavin Scott (Zoot): the reason it doesn’t go full edge to edge, is so you can see displacement. But even so I could probably zoom in a wee bit more.

@Clément Foucault (fclem): Yes, the fluid one is a bit excessive and doesn’t need a Blender logo, I agree. I also think that it’s probably too complex - it could be a simple drop or puddle. I will ask Robin Marin if he wants to make a new one.

For the cloth, we could omit it. But the point of these shapes is to better test your shading on something vault representative of the type of material you are creating. Robin Marin also made a hard surface preview object, which is somewhat interesting.

For the shader ball, the rationale is that the grey part is middle grey, so that you have something to compare to. It’s also become a convention that different apps have different cutouts.

Here's Robin Marin's Hard Surface preview shape, for reference:

I agree about the Blender logo getting in the way of the cloth, particularly if you're trying to see a texture pattern. On the shader ball the curves on the logo help to see what the material does, for the cloth the logo is not using the material, it's just a grey spot in the middle of the preview.

File size is a bit of a concern, this is .blend file is still 13MB compressed. I don't think the base meshes need to have that many polygons if subsurf was used, but maybe be a lot of work to remodel, I'm not sure.

@Brecht Van Lommel (brecht): Yes, I will update to remove the Blender logo on the cloth and to remove the base there too. Maybe Tuqueque has a version without the Blender-shaped hole.

I mean, we don't put a Blender logo on the sphere, and the hair doesn't work the outline of the Blender logo either :)

One of things that make the file large is the complex and detailed fluid object. I agree with @Clément Foucault (fclem) that it's too complex. Something smaller, simpler, more blobby would work well for fluid I think.

A few updates:

  • Removed Blender logo & pedestal from cloth:

  • Greatly simplified fluid. This is much more lightweight now, and removes the need to a pedestal here too:

I think this can still be better though.

What is the scale of the scene? I mean, how one of those squares on floor is big? 1 BU?
It would be great if one could set the scale of the preview, to se how mataerials react at arbitrary size

i think the ball should remain under the cloth to help visualize transparency

@nick wolfert (nicholasw) Yes I agree with this. The checkerboard texture you have there helps with this. I will add that.

Updated the scene with an assortment of smaller changes.

  • Removed Blender logo from the cloth
  • Added the checker ball inside the cloth

  • Changed fluid preview to be much simpler:

This could still be much better, but it is a start.

  • A few other small tweaks
Quijx (Quijx) rescinded a token.
Quijx (Quijx) awarded a token.

Update: New liquid splash preview shape by Tuqueque included.

This looks good to commit, except maybe the file size. The latest version is 30MB uncompressed / 4.8MB compressed.

That consists of roughly:

  • 17MB uncompressed / 1.1MB compressed EEVEE cached light data (needed for correct reflections)
  • 13MB uncompressed / 3.7MB compressed mesh data.

The EEVEE light cache could be left out and computed on the fly probably, but would need some code changes.

@William Reynish (billreynish) will look at reducing the mesh sizes.

Updated the preview blend file.

It's less than half the size with no apparent visual difference

  • Removed redundant UV maps
  • Removed unused solid shape
  • Decimated areas of cloth and fluid shapes that are not visible to the camera
  • Heavily decimated sphere, cube and plane, and added Subdivision Surface modifier instead
  • halved resolution of light probe
  • Removed BG letters object

Update: Purged some lingering unused data for more space saving

If it needs to be smaller, I can also retopo the fluid object fo save even more space.

I think this is small enough. The shader ball base seems to have gone missing?

I've updated the patch with some changes:

  • Replace world sphere by toggle to use world for any shape.
  • Material icon / asset preview now uses specified shape instead of always a sphere.
  • Increase default preview render height a bit.

Updated the file and added back the base, which was deleted by mistake when the hard surface object was deleted.

@Brecht Van Lommel (brecht): tested the World toggle, but it seems to do nothing - does it require changes to the preview blend?

Eg, make the World background neon green, enable material mode World toggle. Appears to be no change in appearance

It doesn't have much visible effect in the default startup file:

  • The floor remains in the scene, unlike the old world sphere.
  • The default startup.blend world is dark and has little influence.
  • The area lights are quite strong.

I don't think hiding the floor would be ideal, for a lot of environment textures the bottom part is not useful to look at. We could disable the area lights. But it really depends on the scene if the world by itself provides enough lighting by itself.

So not sure what to do here, though it's a bit confusing that by default this option seems to have no influence.

Actually it seems a bug snuck into the patch, will fix.

Ah yes, it does work I see - just not very visible with Eevee because the lighting is baked via the probe :)

But for Cycles it does indeed work.

It's a conundrum with the lights. I would say probably it makes the most sense to hide them when World is on? Otherwise the built-in lights will drown out whatever HDRI map you are using to test your materials. If you want to preview using the World HDRI, you probably want to *only* see that, otherwise the World toggle is not so useful I think.

Should I organize the preview blend differently for this, or can you programmatically disable lights when World is on?

I am not entirely happy with the fluid preview shape. I don't like the stem so much in the way it pours down from outside the view.

For this reason, I have been trying various alternative shapes.

Current fluid shape:

Alt 1:

Alt 2:

Alt 3:

Alt 4:

Alt 5:

Comments appreciated.

I really like Alt 4!
Alt 1 is also nice.

I like Alt 3. My main problem Current and Alt 1, and to an extent with all of them, is that the thin parts don't look realistic. Maybe an actual simulation with flip fluids would be nice

I also kinda like Alt 4. Not a fan of the thickness at the bottom though. Maybe the shape of Alt 4 with the thickness of Alt 1 ,which would give more room for maybe a few more drops at the back?

Updated preview blend above with an updated fluid scene. It is lighter, with a greatly reduced poly count.

@JUGURTHA (mazigh) I don't get it. This is already how it works. Did you try the patch?

@JUGURTHA (mazigh) I don't get it. This is already how it works. Did you try the patch?

i am sorry
It's just a It's just a proposal
i did not try the patch

Looking for an object to visualize the transparent and translucent materials, I think you could find something with grace, that as Suzanne could be imported by default. Suzanne not being flat does not rest well on the surface and always has to adjust its position a bit and does not always fit.
It is only a sketch, if interested you can work better and optimize.

Very nice, when will it be implemented in Blender 2.8?

Robin Marin has contributed an alternative fluid preview primitive here:

We could perhaps add this to replace the other fluid primitive.

How about NPR and toon shaders? Is here anyone utilizing them? What would be the best preview material for super flat shaders?

@momotron2000 (momotron2000) These are just preview shapes. You can use them with any material, obviously.

Brecht Van Lommel (brecht) triaged this task as High priority.Apr 9 2019, 1:34 PM

Regarding file size. After discussion with Campbell the proposed solution is to put this file in a git submodule, for example release/datafiles/assets. In the future this could then also contain asset .blend files once we bundle them.

The other options would be to use svn or git lfs, but it seems simplest to stick to what we already use elsewhere.

Comments appreciated.

For fliud there should be variation that includes

  • thin fragment for transparency
  • thick wedge fragment with known thickness, for absorbtion
  • spherical for reflection/ refraction

So it can be Alt1 with Alt4 splash bubbles, maybe in invisible petri dish

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Resolved.Apr 14 2019, 8:28 PM

Committed, considering this resolved. Further tweaks to the shapes are always possible later.