This is a Fender Bassman amplifier that I modelled in ayam with nurbs and rendered in 3delight. Ayam is free open source software and 3delight is free for the first license. Only three of the shaders used are what I have created. They are the amp tolex material, the amp grill cloth material and the Fender badge material. The amp tolex shader uses an included function that I wrote to map the pattern around the amp. The shader used on the floor was RudyCtile01 by Rudy Cortes. Click the image for a larger view of it. The list of paramaters for the shaders is included at the top of the shaders. I am learning about shader writing so you may be able to improve or advise me on them. I hope this page and the shaders on it are useful to you in some way.
| AmpTolex.sl | Extra Files Needed |
|---|---|
|
This is a shader to mimic the tolex on my Fender Bassman amplifier. It is a woven stitching effect. One colour stitch goes one way and the other goes the other way. It can be used for other things (i.e. paving if it is to a larger scale). It is linked to my box projection function which makes an st pattern map to the 3 planes x,y and z depending on what angle the surface normals are facing. |
Displace.h Patterns.h Filterwidth.h Myproject.h |
| ShinyTextureMapMetal.sl | Extra Files Needed |
|---|---|
|
This shader was used for the Fender Bassman badge material. It started out as Larry Gritz's Shiny.sl shader (as the badge is made from metal and needed to reflect). I added the texture mapping part that maps the black to one colour and the white to another. Each color can have its own amount of Kd and Kr so as to change how shiny it is. In the case of my picture I made the writing to be shinier than the brown colour. I have included the texture file so you can see an example. It is in 3delight texture format but you can view and edit it in Gimp if needed. |
Rayserver.h Material.h FBManBadge.tdl |
| AmpGrillCloth.sl | Extra Files Needed |
|---|---|
|
This shader was used for the Fender Bassman grill cloth that covers the speakers. It is basically just a grid pattern with two colours and it is also has a bumpy grid to match the colours. |
Patterns.h Displace.h |
| FBMan.rib | Extra Files Needed |
|---|---|
|
This is the rib file exported from ayam that created the picture of the Fender Bassman (above) that I modelled. This is here as a reference to using the above shaders. Any other shaders used in this rib file that are not on my site can be found by searching on google. FBManBadge.tdl and FBManHandle.tdl are texture files used. They are in 3delight texture format. They can be opened in Gimp if you need to change them. FBManBadge.tdl is the texture file used with ShinyTextureMapMetal.sl to create the Fender Bassman name plate on the amp |
FBMan.rib-1 FBManBadge.tdl FBManHandle.tdl |
| Myproject.h | Extra Files Needed |
|---|---|
|
This is a function that you can include in your shaders. It is used to map a 2d pattern to 3d. It was used in my amptolex.sl shader to make the pattern wrap properly around the amp cab. It maps ss and tt coordinates to x,y and z components based on which way the surface normals are pointing and uses ds and dt for the filter widths of ss and tt (if needed). The mapping can be fine tuned by changing position of faces or by inverting the pattern. There is an example of how to use it in your shaders below. |
filterwidth.h |
The purpose of this function is to map 2d mappings i.e. st mappings to 3d mappings and basically to wrap a pattern around a shape based on which way the normals are pointing. It was used on the Fender Bassman cab model in the picture at the top of this page.
Below is a picture rendered with k3d_antialasedchecks.sl as the shader. As you can see it is mapped using st coordinates and as such the pattern gets squashed on the small sides of the shape.
Here is a picture rendered with k3d_antialasedchecks.sl that is converted to use myproject.h. Now it has the same pattern on each side and does not get squashed or stretched no matter what size the sides are.
Here are the steps that were taken to convert it:-
#include "myproject2.h"
DEFAULT_BOXMAP_EDITABLE_PARAMS;
DEFAULT_BOXMAP_PARAMS;
BoxMapFromNormals BOXMAP_PARAMS;
Then it is all done and should map to 3d instead of 2d. The paramaters can then be changed in the rib file or rendering program to suit the needs. You can compare the original file with my altered file to see how it looks before and after adding the function.