Sphere as control object
-
On 28/09/2017 at 03:27, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : C++ ;---------
Hello.I have a render engine in which I scan the hierarchy and for each object, I pass the object as geometry in the engine. To do that, I get each object's cache and if it is not a control object, I handle it appropriately.
For some reason though, the cache of a primitive sphere is always a control object.
I use the following code to test it in VideoPostData::Execute(BaseVideoPost* node, VideoPostStruct* vps) method (checks have been removed).BaseObject* first_object = vps->doc->GetFirstObject(); BaseObject* cached = first_object->GetCache(); if (cached->GetBit(BIT_CONTROLOBJECT)) { //code }
The primitive sphere's cache is always a control object. This happens only for spheres and only when I use the vps->doc. Any other primitive I have tried is retrieved correctly.
What's the problem with vps->doc ?
Thank you for your time !
-
On 29/09/2017 at 02:43, xxxxxxxx wrote:
Hi Peterakos, thanks for writing us.
With regard to your request please consider that when "Sphere" objects are created in Cinema they come with "Render Perfect" flag activated, which result in no cache creation since our internal render is capable to natively render the sphere primitive given the radius and position.
In order to get a tessellated representation just deactivate that flag or ask Giannis to implement a native sphere render primitive in Thea (which i think it might be already there) in order to render a "tessellation-independent" sphere.Best, Riccardo