Hi there,
I'm trying to achieve a particular effect which I've distilled down to a very simple test case. Essentially, I'm trying to shade an object at a particular node in my geometry network, bake the results into the geometry and then transform that geometry, thereby distorting the effect of the shader in accordance with the transform.
I've attached a hip file of my very simple test case. It contains a single Glow material in the SHOP context, a camera and a geometry object. The geometry object itself is very simple: I start with a Sphere SOP set to output NURBS, and pipe that into a Material SOP that references the Glow material in SHOPs. This is then piped into a Bake Vex SOP to bake the results of the shader into the NURBS, and finally a transform SOP simply rotates the shaded, baked sphere around by 45 degrees in the Y-axis to change the apparent aspect of the glow. Ideally, the centre of the glow should then appear to be offset from the centre of the sphere, as if it had been rotated around with the sphere itself.
The problem is, the resulting render just looks as though the shader has been applied to the sphere as normal, and that the bake hasn't worked. I suspect that this may have something to do with the nature of the shader itself: it shades based on the relationship between the surface normal and the camera viewing direction.
Does anybody have any thoughts as to where I might be going wrong? Am I applying my Material SOP to the wrong part of the geometry (by point, primitive or detail), am I using the Bake Vex SOP incorrectly, or is it that the Glow material (or any normal falloff shader, for that matter) simply wont bake into the geometry in this manner?
Many thanks,
YBM
Baking my shader into geometry
2524 3 0- YoBeardMaestro
- Member
- 23 posts
- Joined: Nov. 2007
- Offline
- probbins
- Member
- 1145 posts
- Joined: July 2005
- Offline
- YoBeardMaestro
- Member
- 23 posts
- Joined: Nov. 2007
- Offline
probbins,
Do you think you could be a little more descriptive about your suggestion? I've tried creating my own shader (instead of the Glow material) that involves the UVCoords VOP, but piping it in to the UV parameter of a seemingly relevant VOP (such as the Lighting Model VOP) doesn't seem to have any effect (i.e. UVCoords' UV output into UV input of Lighting Model VOP, and its clr output into shader's Cf output node).
Or am I just being particularly dense…?
YBM
Do you think you could be a little more descriptive about your suggestion? I've tried creating my own shader (instead of the Glow material) that involves the UVCoords VOP, but piping it in to the UV parameter of a seemingly relevant VOP (such as the Lighting Model VOP) doesn't seem to have any effect (i.e. UVCoords' UV output into UV input of Lighting Model VOP, and its clr output into shader's Cf output node).
Or am I just being particularly dense…?
YBM
- probbins
- Member
- 1145 posts
- Joined: July 2005
- Offline
Not at all, sorry. I'm just hiding the fact I'm weak in this area.
What I did was multiply the colour with UVcoord vop so get a result. Likely not what you were looking for specifically.
I've included an altered example.
What I did was multiply the colour with UVcoord vop so get a result. Likely not what you were looking for specifically.
I've included an altered example.
“gravity is not a force, it is a boundary layer”
“everything is coincident”
“Love; the state of suspended anticipation.”
“everything is coincident”
“Love; the state of suspended anticipation.”
-
- Quick Links