I'm trying to project a texture from a light onto a surface and want the texutre maps pure values to be used on the surface. The light affects the render with what ever shader I use. If I use constant I can't use the light. If I use lambert theres a gradient. How can I setup a projection for a texturemap that will 1to1 use the texturemaps values on the surface.
Like a very pure slide projecter.
Thanks much…
-mikey
projecting a texture purely
6134 9 1- maddabbo
- Member
- 32 posts
- Joined: July 2005
- Offline
- Mario Marengo
- Member
- 941 posts
- Joined: July 2005
- Offline
Hi there,
If using VOPs, then just connect the texture color directly to Cf (and don't use the lighting model VOP).
If using a pre-canned shader, then choose one that offers an “emittance” map, then feed your map as the emittance texture, set the emittance intensity to 1, and slam everything else (diffuse, ambient, specular, reflection, etc.) to zero/empty.
Cheers.
If using VOPs, then just connect the texture color directly to Cf (and don't use the lighting model VOP).
If using a pre-canned shader, then choose one that offers an “emittance” map, then feed your map as the emittance texture, set the emittance intensity to 1, and slam everything else (diffuse, ambient, specular, reflection, etc.) to zero/empty.
Cheers.
- mark
- Staff
- 2590 posts
- Joined: July 2005
- Offline
maddabbo
I'm trying to project a texture from a light onto a surface and want the texutre maps pure values to be used on the surface. The light affects the render with what ever shader I use. If I use constant I can't use the light. If I use lambert theres a gradient. How can I setup a projection for a texturemap that will 1to1 use the texturemaps values on the surface.
Like a very pure slide projecter.
Thanks much…
-mikey
surface
show_light()
{
vector nn = normalize(frontface(N, I));
Ci = 0;
illuminance (P, nn) {
Ci += Cl;
}
}
- Mario Marengo
- Member
- 941 posts
- Joined: July 2005
- Offline
- maddabbo
- Member
- 32 posts
- Joined: July 2005
- Offline
- maddabbo
- Member
- 32 posts
- Joined: July 2005
- Offline
Let me just tell you that I've got very limited experience with shaders. I don't see Ci as a global variable in the notes. What is Ci?
Thanks again.
-mikey
THOTH-> vcc -u m_project_light.vfl
“m_project_light.vfl” line 5 WARNING (2005) Implicit casting failed for set().
This is because there are multiple versions of the function
and the compiler cannot determine which version to use
based solely on the arguments given.
The compiler has chosen “int set(int)” instead of:
matrix3 set(int)
matrix set(int)
float set(int)
vector set(int)
vector4 set(int)
Ci = 0;
^
“m_project_light.vfl” line 7 WARNING (2005) Implicit casting failed for add).
The compiler has chosen “void add(vector &, vector)” instead of:
void add(vector4 &; vector)
Ci += Cl;
^
“m_project_light.vfl” line 5 ERROR (1008) Undefined symbol “Ci”
Ci = 0;
^
REMARK (3003) 1 error and 2 warnings encountered
REMARK (3007) No output is generated due to errors in the source code
Exit 1
Thanks again.
-mikey
THOTH-> vcc -u m_project_light.vfl
“m_project_light.vfl” line 5 WARNING (2005) Implicit casting failed for set().
This is because there are multiple versions of the function
and the compiler cannot determine which version to use
based solely on the arguments given.
The compiler has chosen “int set(int)” instead of:
matrix3 set(int)
matrix set(int)
float set(int)
vector set(int)
vector4 set(int)
Ci = 0;
^
“m_project_light.vfl” line 7 WARNING (2005) Implicit casting failed for add).
The compiler has chosen “void add(vector &, vector)” instead of:
void add(vector4 &; vector)
Ci += Cl;
^
“m_project_light.vfl” line 5 ERROR (1008) Undefined symbol “Ci”
Ci = 0;
^
REMARK (3003) 1 error and 2 warnings encountered
REMARK (3007) No output is generated due to errors in the source code
Exit 1
- maddabbo
- Member
- 32 posts
- Joined: July 2005
- Offline
- maddabbo
- Member
- 32 posts
- Joined: July 2005
- Offline
- maddabbo
- Member
- 32 posts
- Joined: July 2005
- Offline
- maddabbo
- Member
- 32 posts
- Joined: July 2005
- Offline
-
- Quick Links