here is how(use attached images):
Correct me if im wrong, and tell me your opinions.
Rem ***** Main Source File *****
Load Image "base.png", 1
Load Image "ref.png", 2
Load Image "mask.png", 3
Load Image "overlay.png", 4
Make Object Plain 1, 400, 400
Texture Object 1, 0, 1 `base image
Set Blend Mapping On 1, 1, 3, 3, 6 `specular referance image
Set Blend Mapping On 1, 2, 2, 3, 7 `alpha mask
Set Blend Mapping On 1, 3, 4, 3, 7 `base detail image
rem below is just to show the images used
Sprite 1, 0, 0, 1 : Scale Sprite 1, 40
Sprite 2, 0, 102, 2 : Scale Sprite 2, 40
Sprite 3, 0, 204, 3 : Scale Sprite 3, 40
Sprite 4, 0, 306, 4 : Scale Sprite 4, 40
Do
a# = wrapvalue(a# + 0.1)
yrotate object 1, a#
Sync
Loop
End
If you want to see bump mapping work on this object, change the code with below:
Rem ***** Main Source File *****
Load Image "base.png", 1
Load Image "ref.png", 2
Load Image "mask.png", 3
Load Image "overlay.png", 4
Make Object Plain 1, 400, 400
Texture Object 1, 0, 1 `base image
Set Blend Mapping On 1, 1, 3, 3, 6 `specular referance image
Set Blend Mapping On 1, 2, 2, 3, 7 `alpha mask
Set Blend Mapping On 1, 3, 4, 3, 7 `base detail image
Set Bump Mapping On 1, 3 `this is how bump mapping actually works
rem below is just to show the images used
Sprite 1, 0, 0, 1 : Scale Sprite 1, 40
Sprite 2, 0, 102, 2 : Scale Sprite 2, 40
Sprite 3, 0, 204, 3 : Scale Sprite 3, 40
Sprite 4, 0, 306, 4 : Scale Sprite 4, 40
Do
a# = wrapvalue(a# + 0.1)
yrotate object 1, a#
Sync
Loop
End
To see the magic of alpha mask try this code:
Rem ***** Main Source File *****
Load Image "base.png", 1
Load Image "ref.png", 2
Load Image "mask.png", 3
Load Image "overlay.png", 4
Make Object Plain 1, 400, 400
Texture Object 1, 0, 1 `base image
Set Blend Mapping On 1, 1, 3, 3, 6 `specular referance image
Set Blend Mapping On 1, 2, 2, 3, 7 `alpha mask
Set Blend Mapping On 1, 3, 4, 3, 7 `base detail image
Set Sphere Mapping On 1, 3 `this is how bump mapping actually works
rem below is just to show the images used
Sprite 1, 0, 0, 1 : Scale Sprite 1, 40
Sprite 2, 0, 102, 2 : Scale Sprite 2, 40
Sprite 3, 0, 204, 3 : Scale Sprite 3, 40
Sprite 4, 0, 306, 4 : Scale Sprite 4, 40
Do
a# = wrapvalue(a# + 0.1)
yrotate object 1, a#
Sync
Loop
End