Home   |   Contact Us
  About Us     Controlled Manufacturing Process     What's New     Information Request  

Texture Mapping Aesthetic Defects of Injection Molded Parts: Advances in Virtual Molding

Geoffrey Engelstein, GRT-Mars, Inc., Mountainside, NJ

Introduction

Virtual Molding promises to dramatically improve the ability of the non-specialist to interpret and effectively utilize plastic process simulation results. This paper explores one facet of this technology – the incorporation of texture mapping of aesthetic defects. Specifically, attempts to mimic blush are discussed in detail. Tiled and procedural textures are compared, and a series of increasingly sophisticated procedural algorithms are described. The paper concludes with a discussion of application of the procedural texture techniques to other areas of virtual molding, along with planned future extensions of the techniques.

Virtual Molding Overview

The idea of 'Virtual Molding' (VM) was first introduced by the author in (Engelstein Antec/95). Current plastic analysis packages present a complete suite of results, but their interpretation and application can be difficult for the casual user. Rather than the multicolored bands of the traditional contour plot, VM would show a realistic shaded rendering of the part, incorporating aesthetic defects, such as blush, welds, gas traps, and sink marks, along with warp and other dimensional variations. In addition, colors and surface textures could be (in fact, should be in order to realize the maximum benefit) specified by the user to create an onscreen part that is as close to the actual molded part as possible. The ability to superimpose molding defects onto the actual color and texture of the part is a significant advantage of VM over traditional post-processing techniques, since these parameters can have a large role in the visibility, and hence, the acceptability of the defect. Black parts are much less forgiving of traditional molding problems than white parts. An analytic or graphical comparison of these effects is not possible with current analysis tools. However, VM is designed to supplement, rather than supplant, these traditional techniques, as they can be very effective in allowing the trained analyst to numerically evaluating processing parameters.

Texture Mapping Techniques

The core of VM is texture mapping. The term 'texture' refers to a multicolored pattern that is placed onto the surface of the part, much like a decal. Both a base texture as well as defect textures have to be superimposed on the part to create a photo-realistic rendering. Texture mapping was first developed in the mid-70's, so the techniques are well documented.

For all texture mapping, the surfaces have to be parameterized into a u-v coordinate system. This can be a difficult task for arbitrary geometries, and many sophisticated techniques have to be used to allow for consistent mapping on any surface. The process is much simpler for virtual molding, however, as the surfaces are not arbitrary, but are already broken up into relatively small, two-dimensional elements. These elements are, of course, the basis for the simulation as a whole. VM can leverage these elements into a simplistic mapping technique.

The next element of the texture is the actual image that is to be mapped onto the surface. There are two basic techniques here. The first, and more obvious, is an image texture, sometimes referred to by the generic term 'texture mapping'. Here an actual two dimensional image (a brick pattern, for example), is used as the basis for the texture, and simply transformed onto the surface using the u-v parameter space. Image mapping has the advantage of giving complete control over what the details of the texture look like, and can also be used to simply create real-world textures. For example, an image of bricks or wood-grain can be mapped onto an object.

Image mapping has some significant drawbacks, however. First, the texture should be 'seamless', meaning that if tiles of the texture are placed next to each other the image flows smoothly from one tile to the next. If not, seams and discontinuities will be seen on the object. Libraries of seamless textures are available which helps alleviate this problem somewhat, but the generation of new textures requires significant effort. Also, image mapping presents the problem of scaling. The tile must be scaled to an appropriate size before mapping, which can lead to aliasing problems, as well as obvious image duplication if the tile size is reduced significantly. The scaling issue is of particular importance to VM, as the size, shape, and severity of the defects is not known in advance, and can be arbitrary. Thus any texture would not just have to be scaled, but deformed (both spatially and chromatically) as well. This can lead to odd-looking surfaces and diminish the desired realism of the image.

The alternative to image mapping is a procedural texture. A procedural texture is an algorithm for generating the texture 'on the fly'. The algorithm generates the color for each pixel as it is needed. Procedural textures have the advantage of being scalable, compact, and seamless. In addition the algorithm can take into account the local situation (e.g. simulation results) when determining what the color should be. In addition, pseudo-random and fractal effects can be introduced to increase the realism.

Procedural textures are obviously superior to image textures for aesthetic defects. However, global textures (such as SPI standard textures) could be successfully modeled by either. The large scale homogeneity and small feature size (relative to part size) of these textures allows image mapping to be successful. Once libraries of standard plastic finish textures are accumulated their application is simple.

Our first attempts at creating a procedural texture for aesthetic defects centers around blush. Blush is a whitening of the plastic in areas of high shear stress. It is typically found around the gate, but can also be created by large variations in wall thickness. Blush was chosen for a number of reasons.

First, the onset and severity of blush can be reasonably tied to a single analysis result – shear stress. Rules of thumb exist for evaluating visibility of blush. While it obviously varies from material to material, blush typically becomes visible at approximately 1% of tensile strength, and maximizes at about 2% of tensile.

Second, blush has some inherently interesting visible artifacts, such as haziness and streaking in the direction of flow. It was our hope to capture some of these effects.

Finally, blush visibility is dependent on the base color of the plastic, and so can demonstrate the feasibility of VM as an enhancement to traditional analysis tools.

Procedural Blush Algorithm - Initial Development

The initial strategy for the procedural texture was to simply map the shear stress value of the pixel into a color. The overall process proceeds as follows:
 

  • Specify material tensile strength
  • Specify plastic color
  • Generate palette and assign shear stress ranges to each
  • Determine shear stress for each pixel and assign palette color


The first two steps are inputs to the system. The plastic color (and all colors in the algorithm) is specified by an RGB triplet. For example, (0,1,0) is bright green, and (1,1,1) is white. Note that each value can be scaled from zero to one.

The palette is broken up into thirty two colors. The base color is placed in slot zero, and the balance are generated by interpolating between the base and white. A standard color interpolation function is used, so if the base color is (0,0.5,0) the remaining colors are generated by stepping (1/32,1/64,1/32) for each palette entry. Thus the palette in this case would range from dark blue through lighter blues, up to white. Thirty two colors were chosen so as to not monopolize the palette, which might be as few as 256 colors. Note that once the pixel color is determined by the procedural texture, it is passed onto the shader for further modification based on the lighting, reflectivity, and angle of the surface relative to the viewer.

The shear stress at each point in an element is simply a linear interpolation of the shear stress at the nodes, based on the distance from the point to the nodes. Thus the shear stress will be 'banded' across the elements.

The color of a pixel is based on the shear stress, with values < 1% tensile being assigned the base color, and the interval between 1% and 2% tensile being divided evenly amongst the remaining colors. Shear stress values greater than 2% are automatically assigned to white.

This process can be simulated with existing post-processing tools that allow for palette customization. The colors have to be manually generated and assigned to shear stress ranges, but a good facsimile of the effect can be achieved. Simulations were performed using SDRC I-DEAS on an actual model. PC-based simulations were performed on smaller, two-dimensional meshes that automatically performed the color assignments. The results were highly banded, an effect that is exaggerated by the blush zone typically being small compared to element sizes. The results, given the importance of color, are not shown here but will be demonstrated during paper presentation and are available from the author upon request.

Blush Diffusion

The next improvement made to the algorithm was the introduction of color diffusion. Sharp banding of the colors detracts from the realism of the image, so a smoothing factor was implemented. Each pixel has a chance of moving up or down one palette spot based on where it is in the range for its nominal palette spot. Arbitrary probabilities of shifting up or down were set at 20% for shear stresses at the center of the range, and gradually shift as the shear stress moves towards the extremes of the palette slot. Values right on the margin have a 50% chance of shifting to the next slot, and 50% of staying the same.

This diffusion algorithm was successful in smoothing out the blush, and gave a much more realistic image. Testing the procedural texture against a variety of base colors and blush values yielded extremely positive results.

If a more graduated palette is used (with greater than 32 values) a more sophisticated diffusion algorithm should be used that would span multiple color slots. The color magnitude variation used in our software had a good 'look' to it (admittedly not an analytic evaluation) that should be emulated with larger palettes.

Streaking

Blush can also exhibit streaking, as the discolored material is dragged in the direction of flow. This is a less important effect than the diffusion simulated above, but one that can enhance the realism of the image as well as be a useful gage of process parameters. Blush streaking is evident at high shear rates, and can indicate poor processing in that area.

Streaking is a much more difficult addition than diffusion. It begins with the evaluation of flow velocity at the point, once again through a linear interpolation of the flow velocity vectors at each node of the element. The flow vector is then scaled by a fudge factor to determine the maximum distance over which the blush would be spread. For this procedural we experimented with many values until coming up with one that looked right. However this is admittedly a very rough and very arbitrary value that most likely varies with material and processing.

The vector is then scaled by a random factor between zero and one, and projected back upstream to determine a new point. The nominal (i.e. the streak procedure is not repeated) shear stress of this upstream point is then used as the basis for the color of the point.

We implemented this algorithm by taking the square of the random factor before scaling. This had the effect of making most of the streaks shorter, with only occasional longer streaks, and gave more aesthetically pleasing results.

There are a number of deficiencies with the current streaking algorithm. First, as discussed above, it is based on highly arbitrary scaling factors to determine maximum streak size and distribution. This makes it suitable for aesthetic purposes, and perhaps for drawing attention to high streak potential, but does not live up to the goal of emulating actual molded products as closely as possible.

Next, the upstream pixels are used to determine downstream colors, but the velocity vector that shifts backwards to the upstream pixel is based on the velocity at the downstream pixel. In areas of high velocity gradients, (e.g. near the gate, where blush is most prevalent) this can give a significant error as to the actual value of the upstream pixel. It can also lead to 'overshooting' and actually passing a blush minimum or maximum. A more ideal situation is to calculate the nominal blush condition on one pass over the whole model, and then use a second pass to shift colors downstream in a similar fashion, with randomly scaled vectors. The problem with this method is that it obviously doubles the computational time and also violates a basic procedural texture concept of being able to query individual pixels. For example, if a surface is hidden the shader might not request the value of pixels on that surface.

Finally, the algorithm currently only works for flat models. If the elements bend the vector needs to be projected along the three-dimensional flow path rather than just a simple translation.

All of these deficiencies need to be addressed before streaking can be successfully integrated into the procedural.

Future Work

In addition to color variations, blush can also result in changes in surface reflectivity. Right now the model does not support this at all. We are currently performing research to try to correlate shear stress values with changes in reflectivity. This is affected by the global surface texture as well (obviously a high polish finish will exhibit different behavior than a matte finish), and so we also plan to incorporate these into the renderer. Also we will continue to work on streak algorithms.

The work discussed above has direct applicability to weld line simulation. Weld lines are visible as both color and reflectivity changes, but the magnitude is based on weld line meeting angle, temperature at formation, and other factors. The synthesis of these factors into absolute color changes has not been researched to our knowledge, but we hope to develop an empirical model based on numerous molded products. Weld lines will also benefit from another texture mapping technique, called bump mapping, which allows for the simulation of surface bumps and indentations via shading variations, much the same way that buttons and toolbars on computers are made to appear three-dimensional.

Conclusion

A basic procedural texture for blush has been developed and gives excellent agreement with actual molded products. Extensions need to be added to improve streak modeling, and add reflectivity changes, but the soundness and usefulness of Virtual Molding as a post-processing technique have been demonstrated.

Product Categories    Product Examples    Items of Interest    About Us    Information Request