Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

Sphere as control object

 Post Reply Post Reply
Author
Message
peterakos View Drop Down
Member
Member


Joined: 2015 Jul 13
Online Status: Offline
Posts: 304
Post Options Post Options   Quote peterakos Quote  Post ReplyReply Direct Link To This Post Topic: Sphere as control object
    Posted: 2017 Sep 28 at 3:27am

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 !
Back to Top
knickknack View Drop Down
Forum Moderator
Forum Moderator


Joined: 2016 Jul 01
Location: Italy
Online Status: Offline
Posts: 165
Post Options Post Options   Quote knickknack Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Sep 29 at 2:43am
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
MAXON Computer GmbH
SDK Support Team
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.094 seconds.