Editing Shaders

You can use shaders to change the visual representation of the materials that are used when draping the cloth in 3D. This allows you, for example, to produce a bump effect on your cloth, add different images such as logos, or change the background layer. You build shaders in connection to the variants and articles created in the Shader Manager; therefore, the shaders are defined in layers and have a dependency according to their layer.

You first need to create Variants and Articles before you can edit the shaders. For more information, see Adding Textures to your Pattern.

To edit shaders:

  1. Open the Shader Manager (go to Windows > 3D Windows > Shader or press 9 on your keyboard).

The Shader dialog contains the following toolbar:

 

Use to create a new layer. You first have to create a background layer, then every layer added after that will be a logo.

Use to add a texture from 3DDI plugin.

 

Use to remove a layer.

 

Use to lock the layer's definitions. Best practice is to create a layer, modify it, then lock the layer so no changes will be made.

Note: Starting from version O/17 SP1, if you lock a shader you can replace the texture while keeping the same attributes. The same will happen if you want to change a logo, but keep the same attributes.

Layer Not Locked (notice you can change the attributes)

Layer Locked (notice the attributes cannot be changed)

Layer Locked Keeps Attributes (new texture)

 /

Use to change the order of the logos by sorting the layers. Meaning, you make the logo appear on top of the background or vice versa.

  1. While standing in the Shader Manager, select either a Variant or Article.

If you are defining a Variant, the following fields can be modified:

Field

Description

Shader/Type

From the drop-down list, select the Shader Material. The Shaders are automatically included in the installation files. Most of the Shaders will only appear when in HQR or PR3D mode.

Here is an example of the Waffle Shader in Open GL (regular simulation)

Here is an example of the Waffle Shader after turning on HQR:

Here is an example of the Waffle Shader after turning on PR3D:

Starting from O/18, you can change Shader attributes when standing on the Shader Material:

Notice the Angle and Scale fields are enabled allowing you to edit the angle and scale of the shader (not only textures, logos). See Angle and Scale below for more information about how to edit.

Texture Attributes/ Transparency

Use to change the transparency of the shader. You can either manually enter a value or use the slider to select a level of transparency.

Here is an example of the Waffle shader at 40 transparency.

Note: You can view the transparency in the best quality when in Photorealistic mode.

Material/Shininess

Use to change the shininess of the shader. You can either manually enter a value or use the slider to select a level of shininess.

If you are defining an Article, the following fields can be modified.


Note:All of the changes you make to the Shaders are also reflected in the 2D environment.

Field

Description

Texture Editor

 

Logos

Once you add a layer, the Layer appears with a number and a thumbnail of the image as follows:

Note: You can add up to 15 logos for basic material and 13 logos for leather, satin and velvet.

Background

You can only have one background and it is defined as the Variant.

Texture Attributes

These attributes are dynamic according to the logo or pattern you have selected.

Note: It is recommended if you want to define texture attributes on a piece (aside from a shader), you define the attributes either on the piece itself via 3D Properties/ Texture Attributes, or on the shader itself in the Texture Attributes section. You should not define the attributes in both places.

As a best practice, if you want a different texture on a specific piece, you should create a copy of the shader make changes to the texture attributes and then apply the shader to the specific piece.

 

shader logo

If you are creating a PR3D logo you can define the type of logo:

Note: You will only see the difference when in PR3D mode.

Applique:Use if you want the logo to appear as a separate entity on the cloth.

 

Printed: If you want the logo to appear printed inside the cloth.

Definition

 

Type

Logo - Appears as a logo on the cloth.

Splitting Logo - Currently not supported.

Repeat X Logo - Spreads the logo across the cloth horizontally.

Repeat Y Logo - Spreads the logo across the cloth vertically.

Pattern- Creates a tiling look. Use this option for Lace.

Location

This field is used when you have paired pieces. You must make sure you set this up correctly in the Piece Properties first. Then you can select the location of the logo.

Mirror

If your piece is Paired, select this checkbox, if you want to create a mirrored look of the logo..

Offset Origin

Select this checkbox, if you want to define a reference point/button for the logo. By default, all logos appear in the center of the piece. With this option you can assign a new point thus letting you change the location of the logo in accordance to a point and not the piece.

ClosedTo use the Offset Origin option, click here.

Video Click here to view the video tutorial.

 

  1. In the Shader Manager, add a logo.

  2. In the 2D window, select the point on the piece for which you are assigning the reference point.

  3. In the Shader dialog, select the Offset Origin checkbox.

This assigns the point as the offset origin (this is now your 0,0).

  1. From the Alignment drop-down list, define the reference point of the logo in accordance to the offset origin you assigned. By default the logo is centered, thus by changing the reference point of the logo you are changing the Y value. You can then manually enter a Y value and the logo will move according to it's new location. In the example below, you can see when the logo is centered, the Y value is defined according to the distance from the offset origin point to the center of the logo. When you change the alignment to top, the Y value changes to the distance from the offset origin point to the top of the logo.

Logo Align Center

Logo Align Top

  1. Change the Offest of the logo (in the Offset section). For example, manually change the Y to -10. Notice the logo moves according to it's point of origin.

  1. If you have defined an offset origin and you want to see the point of reference in the 2D window, select the piece (if the piece has a logo and an offset origin is assigned to it) the Display button becomes enabled and you can click Display to view the point of reference in the piece.

The grading point is highlighted as follows:

If no offset origin is assigned, the Display button is not enabled as follows:

  1. If you move the point/button that was defined as the offset origin, the logo will move accordingly with the piece (and the X/Y values remain the same). In the example below the offset was defined as -20, and after the origin point was moved, the logo moved and the offset remained the same:

  1. If you have two or more logos, you can define the Offset Origin for each logo separately. (each logo will move according to its offset origin:

Note: If the size in 2D is different than the size in 3D and you change the Offset Origin, the logo position in 2D updates according to the 3D changes.

Flip

Select this checkbox if you want to flip the logo:

Angle

Adjust the angle of the logo either by entering a value manually or by using the slider to adjust the angle.

Here is an example of the logo at 90 degrees:

Offset

Change the offset of the logo (from the center 0,0). You can either enter a ratio or manually change the X and Y values.

Scale

Change the size of the logo using a ratio (X and Y).

Note: If you have turned on the "Use Working Units for Scaling Logos" checkbox in Preferences, the scale will go according to the working units, meaning it will appear as 10cm: 10cm not 1:1.


This is how it will look like working units is on:

Lock

Select this checkbox, if you want to skew the image and not have it proportional.

Note: When this option is selected both the Width and Height values will be enabled.

Color

Select a color via one of the following methods:

Use the custom made Color Picker

Select a color from the color palette.

Upload your own color palette (.aco)

Color Palette

Here you can define the color palette that is used for your shaders. You have a few different options here:

Default Palette: Select if you want to use the default palette (provided by Optitex).

Remove Current Palette: Select if you want to remove the current color palette and you want to use a different palette.

Load New Palette: Select when you want to upload your own color palette. You can use the color palettes that are available in the sample pack, or upload your own.Note:

  • Optitex supports up to 16 bits.

  • Optitex supports colors defined in, RGB CMYK and LAB color spaces.

  • Colors that are defined in color spaces different from RGB are converted into RGB. As a best practice it is recommend to import RGB based colors to avoid the conversion.

Transparency

This is only available for Background layers (variants). Using the slider, set the transparency you require.

Note: It is recommended to use transparency on inner pieces, in order to get the full effect.

Set Defaults

Click this button to go back to the default properties.

Material

 

Shininess

This is only available for Background layers (variants).

High Quality Rendering

Currently under development.

 

 See also:Adding Shaders and Textures