Materials explained?
by Guimo · in Torque 3D Professional · 11/30/2011 (5:09 pm) · 4 replies
Hi everybody,
I was wondering, is there any document which explains each parameter on the Material structure?
I know there is the Material Editor, but I was just wondering if there was some documentation on each of the parameters.
Thanks!
Guimo
I was wondering, is there any document which explains each parameter on the Material structure?
I know there is the Material Editor, but I was just wondering if there was some documentation on each of the parameters.
Thanks!
Guimo
About the author
#2
My problem is not creating a simple material. I was wondering about the texture operation cascades and how to control them.
I imagine that is the reason for a material to allow 4 entries per each cascade level 0-3 (diffuse, specular, normal) but I can't find a way to control all the cascade, that is, how do I tell the shader to do an addition, subtraction or anything between one cascade level and the next.
My problem especifically. I have a model and I want to texture it part by part. Unfortunately I don't have the source file, only the final DTS.
So my plan was to break the material in 2 parts, one for the robes and one for the cloak using some alpha to mask out opacity. So I can setup a material as:
singleton Material(RedGreenWizard) {
diffuse[0] = redrobe.wizard.jpg
diffuse[1] = greencloak.wizard.jpg
}
So I get a wizard with red robes and green cloak. My theory is that the first render pass will render the red robe and the second will render the cloak and of course I want to use the alpha level of the diffuse1 material as the opacity map (that is to operate the common (alpha * (1-alpha)) or something like that I forgot... so long since I did this)
But to do that I would need to control the operations and I can't find references to that. So I was wondering if there was some docs with the full and detailed explanation of the material system.
11/30/2011 (9:14 pm)
Hi Malcolm,My problem is not creating a simple material. I was wondering about the texture operation cascades and how to control them.
I imagine that is the reason for a material to allow 4 entries per each cascade level 0-3 (diffuse, specular, normal) but I can't find a way to control all the cascade, that is, how do I tell the shader to do an addition, subtraction or anything between one cascade level and the next.
My problem especifically. I have a model and I want to texture it part by part. Unfortunately I don't have the source file, only the final DTS.
So my plan was to break the material in 2 parts, one for the robes and one for the cloak using some alpha to mask out opacity. So I can setup a material as:
singleton Material(RedGreenWizard) {
diffuse[0] = redrobe.wizard.jpg
diffuse[1] = greencloak.wizard.jpg
}
So I get a wizard with red robes and green cloak. My theory is that the first render pass will render the red robe and the second will render the cloak and of course I want to use the alpha level of the diffuse1 material as the opacity map (that is to operate the common (alpha * (1-alpha)) or something like that I forgot... so long since I did this)
But to do that I would need to control the operations and I can't find references to that. So I was wondering if there was some docs with the full and detailed explanation of the material system.
#3
12/01/2011 (11:18 am)
I don't believe the engine currently has that feature. To my knowledge each pass is rendered in numerical order. So for example if you want the pass 0 to be visible through pass 1 you set alpha blending / testing / whatever.
#4
Exactly the problem... how do I set the rendering operations for the second (stage 1) pass?
Thus my original request. Is there any documentation on the material system scripting?
Luck!
12/01/2011 (4:34 pm)
Hi Dan,Exactly the problem... how do I set the rendering operations for the second (stage 1) pass?
Thus my original request. Is there any documentation on the material system scripting?
Luck!
Torque Owner Malcolm
Project Alpha
I'm not sure how verbose it was however it allowed me to work out how to add materials.