Hello everyone,
I am new to VRay.
We have created a plugin in 3ds Max which deals with model and cloth. We are planning to give VRay render option to customers. For that, we need to send our model and cloth mesh details to render along with some other details like lights, camera position, etc.
I went through VRay SDK and samples, got some ideas also. But, I am still confused where to start for rendering.
can anyone suggest, from our plugin, how to send mesh details VRay and start rendering.
Thanks in advance.
Regards,
Gopinath.
Hello,
Could you elaborate a bit more on what details do you want to send to V-Ray. Ideally if your geometry provides a Max Mesh object V-Ray should just render it.
Best regards,
Yavor
For the color issue - is it possible that this is some kind of GI bleed from the cloth material. What is the cloth material and what are your render settings ?
For the Ortho view issues - it is a known issue with V-Ray GPU (internal number VMAX-8968 ). I’ve bumped its priority a bit.
To control the various render settings through code you don’t need to use the V-Ray SDK - all the settings are in ParamBlock2 of the render object and you can control them with the Max C++ access. That would be something like this:
Renderer *renderer=.../*get the renderer - for example GetCOREInterface()->GetProductionRenderer();*/
if (!renderer)
return;
Class_ID classID=renderer->ClassID();
if (Class_ID(0x698a4b98, 0x4edd05f5)==classID) { // V-Ray GPU class ID
// V-Ray GPU has only one param block
IParamBlock2 *gpuPBlock=renderer->GetParamBlockByID(0);
if (gpuPBlock) {
gpuPBlock->SetValue(93/*id of the sampler type parameter*/, TimeValue(0), 0 /*0 - bucket, 1-progressive*/);
}
} else if (Class_ID(0x73bab286, 0x77f8fd0c)==classID) {
IParamBlock2 *pblockIS=renderer->GetParamBlockByID(2 /*V-Ray has multiple blocks, ID 2 is the id of the Image sampler settings pblock*/);
if (pblockIS)
pblockIS->SetValue(361/*id of the sampler type parameter*/, TimeValue(0), 0 /*0 - bucket, 1-progressive*/);
}
Hello Yavor,
Thanks for your quick reply and suggestions.
cloth material is multi / subobject, in which each piece is applied with double sided material, and each of them are standard material. Default render settings of VRay.
Thanks for pushing up zoom issue.
will try with the paramblock method as you suggested.
Regards,
Gopinath.
Hello Yavor,
When i tried to get the names of each paramblock items using id, i am getting more empty names. i am attaching the file which i got the details, can you please provide me a complete list, so that i can look into other sections for what to use.
Regards,
Gopinath.
vrayrenderdetails.txt (2.41 KB)
You seem to be using V-Ray GPU as your production render. It has some specific set of options in addition to the standard V-Ray options. What you’ve got in the text file are the V-Ray GPU options. To get the regular V-Ray options you need to do:
if (Class_ID(0x698a4b98, 0x4edd05f5)==classID) { // V-Ray GPU class ID
Renderer *vrayRenderer=static_cast<Renderer*>(renderer->GetReference(1));
and then the vrayRenderer will contain the rest of the options.
You can use the following function to start interactive rendering:
vrayStartIPR()
and the following to stop it:
vrayStopIPR()
Thanks Yavor, will give it a try.