Jan, 2008  All Rights Reserved
Grass Reference
05/11, 2008
 

Click the picture to open larger image.

 
..............................................................................................................
 
Grass Shader
05/11, 2008
 

In class, we use texture maps to add stripes for grass leaves. The following images show the difference when shader is with/without texture map on it.

Left images: without texture map.
Right images: with texture map.



 
..............................................................................................................
 
Problem and Solution
05/11, 2008
 

When doing this assignment, every time I tried to cooperate my .tex file in the .rib file, the render result became incorrect. Although the .sl file and txmake command have been compiled successfully and the shader itself is surely correct, this problem still stop me from getting the correct final render image.

After tried several different ways, finally I found that this mysterious problem can be solved by execute the same txmake command twice. Thus when one tried to apply texture map but get a weird image like this:

The stripes texture doesn't show at all, instead,
it turns into irregular bright bugle color.

What he can try to do is to execute the same .sl file again, and then execute the exactly same txmake command. This is supposed to make no difference since the original texture file does not have any difference, however, in my case, after remake the texture map for the second time, I can then have correct shader on my image.

 
..............................................................................................................
 
Render Result
05/11, 2008
 


 
..............................................................................................................