We are trying to find a way to build a plugin that does instancing at rendertime, so far we found a couple of good examples how to generate mesh at rendertime. But we couldn’t find a way to instance a single mesh that has been compiled before.
Also, is there any documentation about the GeomStaticNURBS plugin?
I like to read the surface data and get surface position at a certain UV coordinate.
I couldn’t find anything about NURBS in the documentation.
Alright, so far I have simple spheres mapped onto a NURBS surface at rendertime. However can somebody explain to me how I convert a parameter object to a plugin?
Doesn’t seem to work.
The surface param is of type Plugin, getObject returns a PluginBase, but this gives me a base object that isn’t of any use.
All I need is an InstanceID and I am good to go..
Any thoughts?
Jeroen,
House of Secrets
EDIT: False alarm.. seems to work, vrscene wasn’t set up correctly
Yes we are on a good track now, starting to understand the API a little better every day.
The only thing I still have to figure out is how I should use a BitmapInterface before the resource has been loaded. When requesting the size, the render crashes.
I figure it is because the resources are loaded after the plugin is done.
Log looks like:
… Starting render sequence.
Preparing renderer… <-- This is where the plugin is working Creating bitmap manager<-- Loads the resources
…
Is there a workaround for this? I promise I will free the bitmap when I’m done
Yes, that is right. We like to use a density map for our instancing. But we like to do this at rendertime.
So I tried linking a BitmapBuffer plugin. But this didn’t work out, so I’m looking for alternatives.
Nevermind, since we are recalculating the scatter points every frame. This enabled the bitmapManager, now I’m able to access the BitmapInterface options.
This was just a happy coincidence, I still haven’t figured out how we had to accomplish this in beginSequence though.
Sorry for the late reply, we have made some nice progress with the plugin. We are at the point of stabelizing the features and memory usage.
Thanks for pointing at the renderBegin() method, I could use this information the next time!
Yes, I am developing under Linux and Windows so I tried to attach gdb, but I am not sure how.
But information about either gdb or visual studio is welcome.
Either of them should work fine; there is no problem to debug the version of V-Ray that you have. You won’t get symbol information, but it will work fine and you can still debug your code.