***
EDIT!! Sorry!!. Just noticed that your second parameter is wrong too. Must eat supper now - but will come back and edit the rest of this post as soon as I can.***
2nd Edit The second parameter of the
set blend mapping on is the texture blending stage and should be numbered consecutively from 0. In your case you are using four blending stages so the second argument should be 0, 1, 2 and 3 for the four blending stages used in your snippet. (I'm not sure what happens if you miss stages out - you might get strange results as you will be relying on default behaviour for the those missing blending stages.)
Original reply follows.
OK. Several questions there. I'll try to answer them.
Question 1
Quote: "If I wanted the detail textures to be from texture stage 3 and up (to leave stages 1-2 open to experiment with shaders like bump\parallax), what would I need to modify?"
You need to make sure that the
TexCoordMode parameter (the fourth parameter) of the
set blend mapping on command is pointing to the right set of UV coords. You want four I believe, i.e. stages 0 to 3. The earlier demo had two, i.e. stages 0 and 1. So let's look at your suggestion:
scale object texture 2, 4, 35, 35 ` added 3 May 2010 by GG
set blend mapping on 2,3,3,3,D3DTOP_SELECTARG1,D3DTA_TEXTURE,-1,-1,D3DTA_TEMP : rem copy mask texture into TEMP
set blend mapping on 2,4,1,0,D3DTOP_SELECTARG1,D3DTA_TEXTURE,-1,-1,D3DTA_CURRENT : rem copy A into current ` changed 3 May 2010 by GG
set blend mapping on 2,5,2,11,D3DTOP_LERP,D3DTA_TEXTURE,D3DTA_CURRENT,D3DTA_TEMP,D3DTA_CURRENT : rem lerp A and B, using TEMP ` changed 3 May 2010 by GG
set blend mapping on 2,0,4,3,4` added 3 May 2010 by GG
The first blending stage (stage 0) has TexCoordMode set to 3 - i.e. "Steal UV Data From Stage Zero". This means that the first blending stage in your snippet uses the UV0 coords. TexCoordMode 0 would have had the same effect in this case.
The second blending stage in your snippet has TexCoordMode set to 0, i.e. "Regular UV Stage Match". Since this is stage 1 (remember blending stages start with 0 so stage 1 is the SECOND blending stage

) it's telling DirectX to use the UV1 coords. This is not what you want - you want it to use the stage 3 coords for the detail texture. To do this you need to specify TexCoordMode = 13 (as 3 = 13-10 - see Help file).
The third blending stage in your snippet also needs to use the stage 3 UV coords so that should also have TexCoordMode = 13. At the moment it is 11 which means use the stage 1 (= 11-10) UV coords which you say will be reserved for something else.
The fourth blending stage in your snippet has TexCoordMode = 3 which means "Steal UV Data From Stage Zero". Since this is the base texture that is what you want.
One word of caution. You should think about whether you really need two extra sets of UV coords - i.e. are you sure you can't use the existing stage 0 or stage 1 coords? Don't worry, it's quite possible you do need them.
Question 2
Quote: "However, would I need to change:
set vertexdata UV v,1,get vertexdata U(v,0),get vertexdata V(v,0)
to
set vertexdata UV v,1,get vertexdata U(v,3),get vertexdata V(v,3)
?"
No. You want the existing stage 0 coords to be copied into stage 3, i.e.
set vertexdata UV v,3,get vertexdata U(v,0),get vertexdata V(v,0)
Question 3
Quote: "And this line just confuses me.
convert object fvf 2, 530 ` = XYZ+NORMAL+UV0+UV1 = 0x002+0x010+0x200 = 2+16+512
How would I need to change that?
"
In that line 0x002 means that the vertex data will contain the familiar position data, i.e. the XYZ coords. Similarly, 0x010 means the vertex data will contain normals (I assumed you needed these) and 0x200 means use two sets of texture UV coords, i.e. UV0 and UV1. In your case your want four sets of UV coords (UV0, UV1, UV2 and UV3) so you need the hexadecimal value 0x400 which is 1024 in decimal. Assuming you need normals then your FVF format needs to be 0x002 + 0x010 + 0x400, i.e. 2 + 16 + 1024 in decimal, i.e. 1042. The Help file tells you what the different values correspond to (it is somewhat opaque I agree

).
Quote: "One final question."
Can you count?
Quote: "Sorry for more questions,"
No problem.
Quote: "but I promise, they are my last."

