(release 1.4)
Copyright 2008-2013 Nine Vectors.
All Right Reserverd. http://www.ninevectors.com

Objects.Geometry objects.Surface

Surfaces management

When you create a geometry object new surface is created too and automatically applied to the created object. However you can reuse the surface to other objects. In order to change currently applied surface for the geometry object click on the combo box Surface. Then you can select from available surfaces.

By clicking on the Edit surface button you can swicth to "Surface" tab. There you are able to adjust all the surface parameters. Of course you can create empty surface, copy existing or remove one using relevant icons in "Surface" tab.
Keep in mind that also some geometry settings such as "Distorions" may affect surface look. Combining them allow you to obtain pretty interesting effects.





Surfaces in Esquimo consist of layers such as: Fill , Lines  and Points for which you can choose basic parameters such as color. Each layer has specifis parameters and they don't affect parameters of other layers. You can turn on/off layers independently. 

Samples of surface layers combinations






Surface settings

There are few general parameters for the surface. Transparency is used globally for the layer, each layer has the same lavel of transparency. Right next to Transparency numeric stepper there is a combo box Blending where you can set blending mode either to Normal or Add.  The Add blending mode takes effect when Transparency is less than 100 or any textures with alpha channel are displaying. Usually the Add blending mode is used when you expect some transparency objects passing over other.




Default triangles making up the objects are drawn by the engine on one side only. Typically, on the side where the normal vector faces the camera. If you want the triangles of the object to be drawn independently from the normal vector return, in other words, the surface is drawn on its both sides, please select the checkbox – Double sided. Move the mouse over the examples below to see them in motion.

Double sided: OFF Double sided: ON


Object's surface can consist of 3 layers : Fill, Lines and Points. Let's have a look on their parameters.

Fill

There are few available shaders that can select for the Fill layer. In some cases you may need to select None, for instance when you wish to display lines only.

Solid color

The entire surface is filled with color specified in parameter Fill color

Texture

For the moment two of Esquimo objects can display textures - Textured plane and Import geometry. To apply texture on one of these type of objects you have to first load a bitmap to Esquimo using Texture manager button.  Texture manager is a store for images that can be used in the scene. Images are loaded in JPG, PNG or BMP format ( BMPs are converting into PNG after loading ). Esquimo displays .PNG textures with its alpha channel both in editor view and final SWF.

Important : Texture dimesions must be power of 2 though it doesn't have to be a square. For example allowed sizes are : 128 x 512,   256 x 256,   1024 x 512...

Texture manager has a very simple interface. The appropriate buttons allow adding an image, removing from the list and the possible replacement of the existing bitmaps for the textures already existing on the list. The added image becomes a texture and is listed under its own name, which can be changed by typing in the text box under the preview of the texture. In Esquimo, the texture is a sort of container for the bitmap. This feature is particularly applicable in circumstances, where, in the scene there are already textured objects and there is a need to change the look of the used textures. Then, it is enough to replace the contents of the texture – to load a new image file for the selected item from Available textures in Texture manager  - . All textures loaded into Texture manager are saved in scene file. Output SWF will include only textures that are being used in scene.

When textures are already available in Texture manager you can use them as surface layer of the object ( Shader combo box set to Texture ) . Click on the combo-box Texture and choose one of the available textures from the list.

Always publish - it is used mostly while using API. If the checkbox is set, the bitmap data of selected texture are included regardless the texture is used in the scene or not.

Cartoon

In the Cartoon shader the surface is filled with use limited amount of colors specified by Levels parameter. The second feature is an outline which the color and thickness can be set using Line color and Thickness parameters. The amount of levels doesn't affect rendering perfomance though cartoon shader itself loads GPU more than other shaders. You can obtain interesting effects by manipulating some lighting parameters. For instance Self ilum. specifes how much linerar the color levels' distribution is.

The specular spot if turned on is also divided into same amount of levels as the main fill color.

Lighting modes

Each object may react differently to lights placed in the scene. Lighting mode applies only to Fill layer. There are 3 options available:

Comparison of lighting modes
(click on the picture to see examples in realtime)

Additionally, for the surface you can set the intensity of self-illumination and the size of gloss. Self illum. parameter takes the values of 0-1 and determines the power of self-lighting. The greater is the value of Self illum , the greater is the own-glowing of the object. Move your mouse over the objects below in order to see them in motion.

Self illumination parameter
(click on the picture to see examples in realtime)



Light can generate also the gloss on the surface of illuminated object. The Specular parameter allow you to set the color of the gloss. Parameter called "Shininess" decides about the extent of the gloss. The more dense mesh the better the gloss looks. Move your mouse over the objects below in order to see them in motion.

Shininess parameter
(click on the picture to see examples in realtime)

 

Lines

Basic parameters enables setting up the color and thiskness of displaying lines. Checkbox Shaking lines activate the mode in wich lines in each frame of the animation are drawn with an offset of their correct position, what allows you to get an effect similar to stop-motion animation with pencil sketches. Max range specifies a maximum value of the offset.

Lines as well as points are drawing by rendering engine with use a quite tricky way what moves the load of calculations on GPU but in some cases look of lines might be disapointed. This is because limitations of OPEN GL version which Molehill is based on. Combining Fill and Lines might cause some lines are not fully visible. Well, use of lines is limited but you can still obtain nice looking effects. Good results gives displaying Lines and Points. The problem also becomes inconspicuous when Shaking lines is on. If you really need to display lines on the filled surface with no breaks or flashing parts you can try to prerender them as a texture in some other 3d software which is capable to export mesh with UV and then import it to Esquimo.

There is a little trick that makes lines and fill surface displaying simultaneously looking better. You just need to create another almost identical object but a little bit bigger. The bigger one ( outside ) is used to display lines and the inside one for "Fill" layer. In such approach lines don't go through the surface and lines blinking effect is not visible in most cases.

Check the samples below with different settings. Fill color is the same as background color in the example.
(Click on the picture to see it in motion)

 
Single mesh
Lines thickness = 1
Antialiasing : disabled
  Single mesh
Lines thickness = 3
Antialiasing : Minimal



Samples below are showing advantages of using additional object. Layers of Solid fill and Lines are distributed to separate objects.
Inside torus displays fill layer and its size parameters are : Radius 1 = 1.000, Radius 2 = 0.300
Outside torus displays only lines and its mesh is placed slightly above first torus surface.
Outside size parameters are: Radius 1 = 1.000, Radius = 0.311

 
Two meshes
Lines thickness = 1
Antialiasing : Disabled
  Two meshes
Lines thickness = 1
Antialiasing : Minimal
     


In other objects you might need to change different parameters, or sometimes just scale outside object a little bit up.
The point of the trick is to create another mesh which displays lines slightly above the filled surface.

Points

You can notice that points alike lines may not be displaying correctly together with Fill layer. Again, this is because of truncated OPEN GL used by Molehill. Everything comes to the way of Z-buffer way of work and triangles sorting issues. Points in Esquimo are essentially small squares wich size and color you can set  changing appropriate parameters.

 



Right next to "Surface" tab  there is a "Distortion" tab. You can turn on a Noise (the only one available at the moment) effect that affect a surface of the mesh. Noise causes a random shift of the vertices of the object in each frame of animation. As an additional parameter you can set the size of position disturbances of the vertices (Max dist.).

Combining Shaking lines and Distortion allows to create preety interesting effects. The main difference between them comes down to the fact that the first one modify the coordinates of the begin and the end of drawn lines, therefore, are visible only when lines displaying is on. The second ones modify the positions of vertices on the base of which there are drawn both lines and triangles filled with the color or texture.

Shaking lines , Distortion (noise)
(click on the picture to see examples in realtime)