BakeTexture in vertex map shader
-
On 08/06/2016 at 05:48, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : C++ ;---------
Hello.I have my a MaterialData plugin that can pass shaders in my render engine as textures.
The problem is that the vertex shader is not baked correctly, even though the physical render shows the correct result.
Noise, gradients , colorizer and other shaders appear fine.So I suppose the way the vertex map is baked differs from the rest. Is there anything I can do to bake the vertex maps correctly ? Do I need specific Bake settings ?
Here are the settings that I use.
bake_settings.InsData(BAKE_TEX_WIDTH,GeData(resolution_x)); bake_settings.InsData(BAKE_TEX_HEIGHT,GeData(resolution_y)); bake_settings.InsData(BAKE_TEX_UV_LEFT,GeData(0.0)); bake_settings.InsData(BAKE_TEX_UV_RIGHT,GeData(1.0)); bake_settings.InsData(BAKE_TEX_UV_TOP,GeData(0.0)); bake_settings.InsData(BAKE_TEX_UV_BOTTOM,GeData(1.0)); bake_settings.InsData(BAKE_TEX_AMBIENT_OCCLUSION,GeData(FALSE)); bake_settings.InsData(BAKE_TEX_ILLUMINATION,GeData(FALSE)); bake_settings.InsData(BAKE_TEX_SHADOWS,GeData(FALSE)); bake_settings.InsData(BAKE_TEX_NO_GI,GeData(TRUE)); bake_settings.InsData(BAKE_TEX_USE_CAMERA_VECTOR,GeData(FALSE)); bake_settings.InsData(BAKE_TEX_SHOW_STATUS,GeData(TRUE)); bake_settings.InsData(BAKE_TEX_PROGRESS_BITMAP,GeData(TRUE)); bake_settings.InsData(BAKE_TEX_COLOR,GeData(TRUE)); bake_settings.InsData(BAKE_TEX_DIFFUSION,GeData(FALSE)); bake_settings.InsData(BAKE_TEX_LUMINANCE,GeData(FALSE)); bake_settings.InsData(BAKE_TEX_ALPHA,GeData(FALSE)); bake_settings.InsData(BAKE_TEX_TRANSPARENCY,GeData(FALSE)); bake_settings.InsData(BAKE_TEX_REFLECTION,GeData(FALSE)); bake_settings.InsData(BAKE_TEX_DISPLACEMENT,GeData(FALSE)); bake_settings.InsData(BAKE_TEX_NORMAL,GeData(FALSE)); bake_settings.InsData(BAKE_TEX_BUMP,GeData(FALSE));
I bake only the color channel.
Thank you.
-
On 13/06/2016 at 02:28, xxxxxxxx wrote:
Hello,
the pyhsical renderer does not bake the vertex map shader (or any other shader). It can simply sample the given shader in object or world space.
Can you post some more code showing how exactly you are trying to bake the shader?
Best wishes,
Sebastian