Tuesday, December 16, 2008

Creating Seamless Tiles

Introduction

One of the main problems with the creation of bitmap based materials is getting them to look as though they repeat or tile seamlessly across a rendered surface. This tutorial explains the various ways by which this can be achieved.


By way of an illustration of the problem, look at the two bitmap tiles illustrated on the right. They are both 100px by 100px. They are both JPEGs and superficially they both look similar. However, when used as a material, one of them displays obvious seams while the other doesn't. The bluewave1.jpg image was created simply by scribbling with the Airbrush Tool in Photoshop. The bluewave2.jpg image has been tweaked so that it will tile seamlessly. The rendered result of each of these two images are illustrated below. The material based on the bluewave1.jpg image is shown on the left and the material based on the bluewave2.jpg material is shown on the right. The bluewave1 material displays obvious vertical seams. In this case, the horizontal seams aren't too obvious but that's more a case of luck than judgement. What we need is a sure fire method of creating a material that can be tiled without showing any seams.




bluewave1 material exhibiting "seams" bluewave2 material tiling "seamlessly"

So, how can an image be tweaked to avoid such seams? At the heart of this technique lies the Photoshop Offset filter. You may have been working with Photoshop for some time and never come across this filter but this is exactly the purpose for which it was designed. Let's first have a look at how bluewave2 was created.

Creating the bluewave tile

1. Start Photoshop and open a new image, File>New… from the pull-down menu. Set the new image size to 100px by 100px. Select a pale blue as the foreground colour and then use the Paint Bucket Tool Paint Bucket Tool to flood fill the new image. Select a slightly deeper blue and then use the Airbrush Tool Airbrush Tool to draw some blobs on the background. Select a dark blue and use the Airbrush Tool again to draw some wiggly lines. You can build up deeper textures by repeating this process a number of times. When you're done, the image should look something like the one on the right.
2. Use the pull-down menu to start the Offset Filter, Filter>Other>Offset… The Offset Filter dialogue box appears and offers just a few options.

Offset Filter Dialogue Box The first thing we must do is enter values for Horizontal and Vertical offset. In each case, the offset value should be set to exactly half of the full size of the bitmap. In our case, since the bitmap is 100px by 100px, the offset values for both the horizontal and vertical directions should be set to 50px.

The option for Undefined Areas must be set to "Wrap Around" in order to get the effect we need.

When you have made the settings shown in the illustration above, click the OK button to apply the filter. When you have done this, your image should look something like the one shown on the right. Notice that we now have the edge seams running across the middle of the image. This is because we have offset the image by half of its width and height and wrapped it round. We now have the opportunity to do something about the seams.
3. Use the Airbrush Tool with the same colours you used previously to join up the wiggly lines across the seam. Since we know that the edges of the image already wrap around, thanks to the Offset Filter, all we need to do is eliminate the visible seam in the middle of the image to produce a truly seamless tile. The finished result should look something like the one shown on the right.
4. Finally, save the file as a JPEG using the Save for Web option, File>Save for Web… This will give you the opportunity to control the compression level. Remember to save the file to your textures folder so that it can easily be found in the future. To test the tile, create a new bitmap material in AutoCAD, attach it to an object and render it.

Other Strategies

The sequence above illustrates just one strategy for creating seamless tiles. Although in every case, the Offset Filter should be used, there are lots of different ways you might go about building up the texture. For example, one of the simplest methods is illustrated below.

1. Make a random pattern of splodges but keep away from the edges of the image. 2. Use the Offset Filter to offset half the bitmap height and width and Wrap Around. 3. Simply fill in the gaps with more splodges and Hey Presto! you have a seamless tile.

If this simple 3 step process is repeated a number of times, you can create beautiful deep seamless textures. After 3 or 4 more iterations using different colours, the tile above finished up as the scrub.jpg file shown on the right. The result of and AutoCAD render using our Garden.dwg file is shown below.

To get some really good results, you need to experiment. Try using different Photoshop filters, consider using Layers to build up your textures. The textures below are the result of a few minutes experimentation using various brushes, the noise and blur filters and gradient fills; they are all completely seamless. The possibilities are almost limitless.

bluegrass.jpg furrow.jpg steel.jpg swamp.jpg

To download any of the images above, right-click on them and select Save Picture As … from the pop-up menu. Save the image to your textures folder and test them out as materials in AutoCAD.

Read More...

Monday, December 15, 2008

3ds Max Tutorials

The 3ds Max & Viz (now called Max Design) tutorials section contains a range of tutorials from beginner to advanced. The tutorials are divided into categories and each category forms a self-contained module with sample data for you to download so that you can follow the tutorials. The following categories are available; The Basics, Working with Objects, Create a 3D Landscape, Materials & Production and Techniques. If you're looking for something specific, try the relevant category or take a look at the full listing on this page.

Read More...

Wednesday, July 16, 2008

Using Co-ordinates

Introduction

A good understanding of how co-ordinates work in AutoCAD is absolutely crucial if you are to make the best use of the program. If you are not familiar with co-ordinates and co-ordinate systems, take some time to familiarise yourself with the basic concepts.

Co-ordinates fall into two types, namely Cartesian and Polar. A basic understanding of these co-ordinate types will help you to use AutoCAD to construct drawings more easily. In addition, these two co-ordinate types come in two distinct flavours. They can be either Absolute or Relative. Knowing just when and where to use the various types and flavours of co-ordinate is the key to efficient drawing with AutoCAD.


Cartesian Co-ordinates

Despite the fancy title (named after the French philosopher and mathematician René Descartes 1596-1650), the Cartesian co-ordinate system is the standard co-ordinate system. The position of a point can be described by its distance from two axes, X and Y. This results in a simple point description using two numbers separated by a comma e.g. 34.897,45.473.

In the example on the right the point described lies 34.897 drawing units to the right of the Y axis and 45.473 drawing units above the X axis. The first value (34.897) is known as the X co-ordinate because it's value is measured along the X axis. The second value is known as the Y co-ordinate because it's value is measured along the Y axis. The X and Y axes are two lines of infinite length which intersect at the origin point. The co-ordinate value of the origin point is always 0,0.

When viewed in plan the X and Y axes are always perpendicular to one another with the X axis in a horizontal position and the Y axis in a vertical position (See illustration). X co-ordinate values become negative to the left of the Y axis and Y co-ordinate values become negative below the X axis. All co-ordinate values (both X and Y) are negative in the lower left hand quadrant and positive in the upper right hand quadrant. Normally we try to work in the positive quadrant. Although this is not essential for AutoCAD to operate, it does tend to make life easier because we don't need to worry about negative numbers.


AutoCAD allows you to use co-ordinates to draw objects rather than using pick points. For example you could draw a line like this:
Command Sequence

Command: LINE
From point: 34.897,45.473
To point: 54.896,65.395
To point: Return (to end)

This sequence draws a line between the two co-ordinate points specified. Note that if you enter a co-ordinate that is off the screen the line will still be drawn to the required point. You will then need to zoom out in order to see the whole line. You can also start the Line command by clicking on the Draw toolbar or from the pull-down menu (DrawLine).

Polar Co-ordinates

Polar co-ordinates achieve the same result i.e. the description of the position of a point. The main difference is that polar co-ordinates use one distance and one angle to describe the position of a point rather than the two distances in the Cartesian system. The distance and angle measurements are made relative to an origin. This results in a point description which looks like this 34.897<30 style="font-weight: bold;">

The UCS Icon

In the bottom left hand corner of the AutoCAD drawing window you will see a symbol like the one shown on the right. This is called the UCS (User Co-ordinate System) icon and it is there to remind you which is the X axis and which is the Y axis. The empty box at the intersection of the X and Y axes is there to remind you that you are using "World" co-ordinates and that the UCS icon is not positioned over the true origin of the current co-ordinate system, probably because it is off screen. See the UCS Icon tutorial for more details on this feature.

Absolute & Relative Co-ordinates

Both Cartesian and polar co-ordinates come in two flavours, absolute and relative. The distinction is quite simple, absolute co-ordinates relate to the X and Y axes and the origin of the current co-ordinate system, whilst relative co-ordinates relate to the current pick point. When you are specifying co-ordinates you need to tell AutoCAD which type you want. Absolute co-ordinates are typed exactly as in the examples above.

To specify a relative co-ordinate you need to use the "at" symbol as a prefix. In the case of the two examples above a relative Cartesian co-ordinate looks like this @34.897,45.473 and a relative polar co-ordinate looks like this @34.897<30. style="font-weight: bold;">

The Status Bar

Co-ordinates The status bar at the bottom of the AutoCAD window always shows the current co-ordinate value at the cursor point. Watch the co-ordinate values change as the cursor moves across the drawing area. You can turn the dynamic co-ordinate display off and on using the F6 key on the keyboard.

Read More...

Monday, July 14, 2008

Tip Command Line

The command line can be very useful, especially for beginners because AutoCAD often gives useful promtpts which helps when learning how to use some of the more complicated commands. The command line is also used by AutoCAD to report information back to the user, but sometimes that information may run to several lines of text, and disappear from view. A good example of this is the Distance command (you can run this from the keyboard by typing DIST). The problem is that by default, the command line is only two lines high and so if you use the Distance command, you don't even see the distance reported to the command line.


One way round this problem is to increase the depth of the command line to show more lines but this takes up valuable drawing area. A better solution is to display the command window using the F2 key on the keyboard.



As you can see above, the command window also allows you to scroll back through the command line so that you can review your recent drawing history.

Read More...

Monday, May 12, 2008

Wellcome!

Wellcome to CAD-Tutor Blog, we hope this blog can give more reference for you about CAD.

Read More...
 
CopyRight ©  2008 | Template by Blogspot Tutorial | Modified by Nanang Suryana