Hello,
VRay Version:Vray 5.20.20
In BRDFVRayMtl,I need a diffuse map and a bump map.one uv coords with different transform.
I set the uv coords like this:
for diffuse map transform:
for bump map transform
But I can`t get transfom effect of bump map,I want know where is the wrong,Or how do it in right way.
Thank you!
VRay Version:Vray 5.20.20
In BRDFVRayMtl,I need a diffuse map and a bump map.one uv coords with different transform.
I set the uv coords like this:
Code:
VRay::ValueList channelDiff; VRay::ValueList channelNorm; channelDiff.push_back(VRay::Value(0)); channelDiff.push_back(VRay::Value(texCoords)); channelDiff.push_back(VRay::Value(&indices[indexStart_], indexCount_)); channelNorm.push_back(VRay::Value(1)); channelNorm.push_back(VRay::Value(texCoords)); channelNorm.push_back(VRay::Value(&indices[indexStart_], indexCount_)); VRay::ValueList mapChannels; mapChannels.push_back(VRay::Value(channelDiff)); mapChannels.push_back(VRay::Value(channelNorm)); [B]mesh[/B].set_map_channels(mapChannels);
Code:
VRay::Plugins::TexBitmap diffuseMap... ... VRay::Plugins::UVWGenChannel uvwchannel0 = mVRayRenderer->newPlugin<VRay::Plugins::UVWGenChannel>(); uvwchannel0.set_wrap_u(1); uvwchannel0.set_wrap_v(1); uvwchannel0.set_uvw_transform([B]transformDiff[/B]); uvwchannel0.set_uvw_channel[B](0[/B]); diffuseMap.set_uvwgen(uvwchannel0); [B]brdf[/B].set_diffuse(diffuseMap);
Code:
VRay::Plugins::TexBitmap bumpMap... ... VRay::Plugins::UVWGenChannel uvwchannel1 = mVRayRenderer->newPlugin<VRay::Plugins::UVWGenChannel>(); uvwchannel1.set_wrap_u(1); uvwchannel1.set_wrap_v(1); uvwchannel1.set_uvw_transform([B]transformNrom[/B]); uvwchannel1.set_uvw_channel[B](1[/B]); normalMap.set_uvwgen(uvwchannel1); [B]brdf[/B].set_bump_map(normalMap); [B]brdf[/B].set_bump_type(1);
Thank you!
Comment