Modifying material previews
Garry Curtis & Robert den Broeder, June 20th 2005.
A tutorial for Realsoft3D V5+
Realsoft3D's user interface is
extremely configurable. One of the options you have, is to change the size
and shape of your material previews. This small tutorial shows you how to
create a new type of preview and how to change the size of both the preview window
and the materials tab of the Select window.
From list to preview
When you click the material tab in the Select Window, using the default
program settings, Realsoft3D shows you all available
materials alphabetically ordered and shows a small icon beside each material
Materials listed in default program settings
This list can easily be changed to present the available materials in a
more intuitive and interactive way to the user: the material preview. Try this: make sure
you are at the Materials tab, then click with the right mouse button
anywhere in the Select Window and select 'Show Previews' from the pop-up
menu. You will find this option almost at the bottom of the pop-up. Note,
that the next time you open the pop-up menu, you see a small check-sign at
the Show Previews entry. Selecting this option again, changes the display
back to the list of icons with text labels.
Before Show Previews....
and after Show Previews...
As you can see, the previews are all spheres. Some spheres, like the one
used with the Fog and with the Marble1 materials, are displayed more close up,
thus filling up most part of the small preview window. Let's investigate
some more about the configurability of these material previews.
The material property window
If you wish to change one or more properties of any material, you need to
open the material property window. This is done, as you probably know, by
double clicking on a material preview icon, or by selecting 'Properties'
from the pop-up menu. The material property window opens and by default shows a basic
interface that allows you to change almost any property of the selected
material. But that is not what we're after this time. This time we will have
a look at the material preview window.
The small sphere shaped material preview we have seen in the Materials tab
of the Select Window is also available in the material property window, but this is not switched on
by default. Click the 'Preview' checkbox at the top of the material property
window, to see the default sphere shaped material preview.
Preview option checked
Changing the preview type
There are several different material previews available for the user to
select. These are hidden in a
pop-up menu in the material property window.
Let's have a look at these. Open for instance the material property window
for the 'brushsteel' material and check the Preview checkbox. Now click the
right mouse button, when you hover your mouse pointer over the preview
image. A small pop-up menu shows:
Pop-up menu in the material property window Post particles preview selected
Try some of these settings and see what happens to the preview image. If you
wish to go back to the default material display, select 'material preview' from
the pop-up menu.
By the way, Realsoft3D offers another
way to select a different preview type. In the Material Property window,
there is a small button with three dots in it that allows you to directly
access the previews directory. This button is only there if the Preview
checkbox is ticked. Click the small button and a requester opens, allowing
you to select and load any of the available preview types. The small
rendered preview in the Material Property window will be updated
immediately. The default project can be
restored here also by clearing the 'File' name string.
Click the small dotted button to directly access the Previews directory
Please note that the Ctrl
key and Shift key modifiers also work on the material
So, click right mouse button with Shift key pressed and held: zoom preview
in and out and click right mouse
button (or middle mouse button if you have one) with Ctrl key pressed and held: pans the material preview window.
Select Reset if you wish to return to the default display position.
Would'nt it be nice to have the ability to show certain materials on a
different shape than a sphere? Let's change the sphere into a cylinder and
save that for future use.
Each of the different preview types has it's own small project file, which is
located in the Realsoft3D/previews subdirectory.
It is possible to just load one of them
in the same way as any other project. Before continuing, you may want to
back-up your previews directory, just to be safe.
To load a preview as a project, select File -> Load
and browse to the previews directory. Select and open the 'denim.r3d'
project. When the Load File requester pops up, click OK. Note there is no
thumbnail for this project, so the thumbnail preview window is black.
All the different material preview types
After loading the project file, you can
see it is a simple project with some lightsources, a textured sphere, a
textured rectangle and a wireframe invisible backdrop. To change the
appearance of our material preview, we simply need to exchange the sphere
with a different object, in this case a cylinder.
Make sure you use the wireframe display
mode. To ensure the original sphere and the cylinder are about the same
size, take a top view and then drag and drop the sphere from the Select
Window in the View window. This puts the sphere in the center of the view.
Click the Analytics tab, click on the cylinder icon and make a cylinder, at
the same position as the sphere and with the same diameter as the sphere.
Then take a front view and extend the cylinder, so that it becomes the same
size as the original sphere. Note that the new cylinder is added at the
bottom of the hierarchy. Now to replace the sphere with the cylinder, drag
and drop the cylinder in the preview directory of the hierarchy. Place the
cylinder directly above the Preview map object and then delete the sphere
from that directory.
Cylinder has replaced the sphere
Basically you now have a new project,
so if you want to use that project again in the future, you will have to
save it under a new name. Because it's a preview project, it must be saved
in the previews directory again. Select File -> Save as from the menu and
change the name of the file to previews/cylinder.r3d for example. If
you wish to change the user information and the file comment, click on the
black preview window. This updates the user information in the file save
requester. The comment has to be changed manually. Note that the black
preview is exchanged for a screenshot of the current project. When done,
click OK to save the project file. Then select File -> Close to close the
Information in the Save requester updated
and the updated material preview.
Next time you open the material
property window, you can select the new cylinder type preview from the
pop-up menu. The cylinder shows in front view and you must zoom out a little
and rotate the view a bit to make the cylinder fully visible.
If you like to see displacement in your
material previews, then the analytic object needs to be replaced by geometry
that supports displacement, like SDS and NURBS.
In a similar way you could change the
mapping type if you like. Simply exchange the Preview map with a different
mapping type, like sphere or cube. But for most cases
the original parallel mapping type suits best.
Changing the material preview size in the Material Property window
The material previews are 50 x 50 pixels by default, but with today's
faster machines, and when working with certain projects as well, you might
want to increase the size of that preview render.
Before this method is listed, it should be mentioned that the material preview
'list' in the Materials tab of the Select window, are actually a copied images of the real material
preview render. So, if your material preview render is set to 50 x 50 pixels, and you set
the image size in the Material tab of the Select window to 100 x 100, you will see pixelisation, obviously.
OK , so go into File/Preferences to open the Options window. Then select:
Graphical User Interface / Gadget / List property Gadget / Material Gadget.
Graphical User Interface / Gadget / List property Gadget / Material
When you have clicked the Material Gadget entry, you will see a list of
options appear on the right.
PreviewWidth currently shows a value of 50. Change that to 100.
Click "PreviewWidth". It's current value is set at 50, now change that
to 100. Then click "PreviewHeight" and change that to 100 as well.
Then close the Options window. The new option settings are activated
immediately. There is no need to save a new startup-file.
Now go back to the Material tab in the Select window. Note that seemingly nothing has changed.
Double click for instance at the brushsteel material icon to bring up it's Property window . Check the "preview" box and
when Realsoft3D does a preview in the window now, you'll see a good quality 100 x
100 render of this material.
A beautiful 100 x 100 pixel material preview render!
Changing the material preview size in the Materials tab of the Select window
To change the display of all your materials in the Materials tab of the
Select window to something more than 50 x 50 pixels, open the File/Preferences.
This time select:
Graphical User Interface / Gadget / Material Preview List and on the right at top you'll again see
two size options, called ImageWidth and ImageHeight.
Graphical User Interface / Gadget / Material Preview List selected,
ImageWidth and ImageHeight on the right.
Click ImageWidth and change it to 100, then change ImageHeight to 100 as
well. If you would have skipped the previous step (changing
PreviewWidth and PreviewHeight) then the aforementioned pixelisation will
Pixelised material display occurs if ImageWidth
Here you go! Nice smooth big material previews!
and ImageHeight have larger values then
PreviewWidth and PreviewHeight
To fix the pixelised display, make sure ImageWidth, ImageHeight,
PreviewWidth and PreviewHeight have the same values. Then close and restart
Realsoft3D, then simply click on a material and let Realsoft3D re-render the
preview image. You will see an updated Material display in the Select
Like mentioned earlier , you could have a landscape project placed in the
'previews' directory and then set the preview render to 200 x 200 and bingo !
Super fast previews of all kinds of materials on a terrain , simply by
selecting that landscape preview ! (right click on the material properties
preview render and select landscape from the pop-up menu).
Final note: the selected material preview
project is a material property, not a window property. Every time you edit a
new VSL material or a material that has no custom preview selection, the
program loads the preview project called 'material preview'. The user can
customize and save it to get a new kind of default preview setup.
I know you can easily come up with much more elaborate and interesting creations of your own . Hopefully this simple tutorial will help you to get started . Cheers !