lukegeldart
06-05-2006, 04:49 AM
Does anyone have any ideas on baking a shader to a texture?
I have a model of some structure/object and a shader that defines a surface colour for all polygons based upon its distance from some reference point in the world. Shader is easy etc. but i would like to calculate some statistics from the shader output on the model surfaces.
Currently i am looking at the following:-
1) take each polygon that makes up each object. Somehow orientate the camera to look at each polygon face on.
2) Switch off all other polygons when rendering.
3) Render this polgon and save output to a bitmap.
4) Process this bitmap for stats.
This is a bit of a pain as i cant use many of the scene apis that are available as i need to know about every polygon in every object to orientate correctly.
If there is an easier way that someone out there knows then can they give me a few hints please.
I have a model of some structure/object and a shader that defines a surface colour for all polygons based upon its distance from some reference point in the world. Shader is easy etc. but i would like to calculate some statistics from the shader output on the model surfaces.
Currently i am looking at the following:-
1) take each polygon that makes up each object. Somehow orientate the camera to look at each polygon face on.
2) Switch off all other polygons when rendering.
3) Render this polgon and save output to a bitmap.
4) Process this bitmap for stats.
This is a bit of a pain as i cant use many of the scene apis that are available as i need to know about every polygon in every object to orientate correctly.
If there is an easier way that someone out there knows then can they give me a few hints please.