If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Exciting News: Chaos acquires EvolveLAB = AI-Powered Design.
To learn more, please visit this page!
New! You can now log in to the forums with your chaos.com account as well as your forum account.
Does VRay support spline curve for rendering hair primitive? Like riCurve in RenderMan and hair primitive in mental ray?
Not sure about renderman, but I think mental ray also approximates curves with straight lines (although perhaps with adaptive step depending on curvature).
This is a bit more tricky and unfortunately we don't provide ready classes for it, so you'll have to do some extra coding (you could use the code from defparams.h as a starting point, of course). You need to re-implement the getXXXX() method of your plugin parameters to take into account the "time" parameter and return different values for different times.
This will work fine for rendering inside Maya; to export the animated parameter information to .vrscene files, you have to add some extra steps - if you need to do that let me know and I'll post how to do it.
Best regards,
Vlado
Thank you Vlado, I'll try your solution later on. And yes, it's very likely that I'll need to export animated parameter to .vrscene files. So it would be great if you can show me how to do it.
Thanks!
I've created another class derived from DefIntParam in defparams.h with stl map member store different time/value pairs. It did work well in Maya, however, I've noticed that when VRay was writing vrscene file, it didn't pass time parameter to my re-implementation of getXXXX so the result was incorrectly written in vrscene file. Can you tell me how to make VRay export correct animated parameters?
Thank you!
You need to add support for the EXT_INTERPOLATING interface to your parameter; this is defined in vraypluginsexporter.h. In the newInterface() method of your parameter, you need to add a check for the EXT_INTERPOLATING interface, and return a pointer to MyInterpolatingInterface (similar to how this is done for EXT_SETTABLE_PARAM and EXT_CLONEABLE_PARAM interfaces). The .vrscene exporter will check for this interface, and if present, will use its methods to query the parameter values at different moments of time.
Note: vraypluginsexporter.h includes a file called "cgauth.h" which you may not have - simply comment the #include line for the time being. This will be solved in newer versions of the SDK.
Thank you very much!
Finally I can export animated parameters now.
I've implemented a workflow similar to the sample "vray_geom_hair" in vray_plugins directory and I rendered a 10-frame sequence (I've tried both translating and deforming objects).
When the function "void GeomHairInstance::compileGeometry(VR::VRayRenderer *vray, VR::TraceTransform *tm, double *times, int tmCount)" is called, the parameter "times" contains only 1 element and "tmCount" is always 1, that means it'll always call rayserver->storeStaticPrimitive and no motion blur.
My question is, how do I make the parameters "times" contain more than 1 elements and "tmCount" larger than 1 such that I can render motion blurred custom geometry?
Thanks!
I've figured out a way to make "tmCount" > 1 in compileGeometry. For those who want to do the same as I did, you should set key on the transform of the renderable mesh in Maya (the one used to trigger procedural geometry), then "tmCount" will be larger than 1 and you can store moving primitives. The trick is to apply another step to "cancel" the movement caused by the transform. If anyone knows a better way to trigger moving primitive storing mechanism, please tell me.
Thanks!
I've tried connecting the "time" node to an extra attribute "inputTime" in vrayplane plugin example, and the mesh output is dependent on the attribute "inputTime", but in compileGeometry, the tmCount is still 1.
Did I do something wrong?
Thanks!
I've downloaded nightly build 17363 and saw a bug fixed: [bug] Incorrect self-shadowing of hairs by themselves for VRayFur and Maya hair - resolved.
Is that related to the problem in the post? http://www.chaosgroup.com/forums/vbu...274#post534274
If so, could you tell me how to resolve the problem for custom hair geometry? Which part in the sdk sample vray_geom_hair should I modify?
Thank you.
I noticed that the online stable build 16694 doesn't resolve the bug "incorrect self shadow problem in hair" yet, only the recent nightly builds resolve it.
Can you provide us a stable build that resolves the bug? Our production is ongoing now and we really need a stable build without the problem.
Thank you!
Comment