MaterialData->SetVector(specDataID + REFLECTION_LAYER_COLOR_COLOR, specular_color) MaterialData->SetInt32(specDataID + REFLECTION_LAYER_MAIN_BLEND_MODE, MATERIAL_TEXTUREMIXING_ADD) MaterialData->SetInt32(specDataID + REFLECTION_LAYER_MAIN_ADDITIVE, REFLECTION_ADDITIVE_MODE_ADD) MaterialData->SetFloat(specDataID + REFLECTION_LAYER_MAIN_DISTRIBUTION, REFLECTION_DISTRIBUTION_SPECULAR_BLINN) ReflectionLayer* layer = c4d_material->AddReflectionLayer() Setting the data in the layer is pretty straight forward except for a couple details. You would add a layer for specular (comprising specular and specular color) and another layer for reflection. If you want to control exactly what you are doing, you may want to delete all layers and start fresh.Ĭ4d_material->RemoveReflectionAllLayers() Īdding a layer is simple. We gain access to the reflectance channel through the material data.īaseContainer* materialData = c4d_material->GetDataInstance() Īs the reflection channel come initialised with one basic specular layer. ![]() For this, you will need to get your hands dirty and create a reflectance channel using the new API. If (c4d_material->GetChannelState(channelId))Ĭhannel = c4d_material->GetChannel(channelId) įloat spec_width = channel_data.GetFloat(MATERIAL_SPECULAR_WIDTH) įloat spec_height = channel_data.GetFloat(MATERIAL_SPECULAR_HEIGHT) Ĭreating specular and reflection won’t work alas. Int32 channelId = CHANNEL_SPECULAR /*or CHANNEL_SPECULARCOLOR, CHANNEL_REFLECTION*/ The reflectance API is located in header file c4d_reflection.hĪccessing the Specular, reflection channelsīecause the accesses were remapped, accessing the specular or reflection channels the old way will work for extracting or modifying the information Any plugin dealing with the specular / reflection channels such as material plugins or interop filters need to properly support the new feature. C4D files coming to R16 have their specular and reflection automatically converted to the new reflectance layer. This paradigm change means exporting consistent looking materials via your favorite interop format will only work if a material has one layer for specular and one layer for reflection. In consequence, we cannot give a specific layer index where specular or reflection may be found. This means it is may not be possible to find out the specular or the reflection layers in the material. It is now possible to do specular AND reflection on the same layer. ![]() In this post, you’ll find how to make the best out of the new feature.Ī layered material is different from the old specular and reflection channels in one important way. This channel allows layered materials which can be used to do more realistic materials such as car paints, human skin, etc. ![]() In Cinema 4D R16, We replaced specular and reflection by a new channel called reflectance.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |