generator parts missing @ external render



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/05/2009 at 06:52, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   9.6+ 
    Platform:      
    Language(s) :     C++  ;

    ---------
       Hi,

    i have this generator plugin and everything works fine so far. When i do an editor render its all cool, but when i click external render, or set the option
    'Use Render LOD for editor Render', only parts of the generator are rendered, and some are missing..

    Im completely at a loss here, as to what might be the reason. It happens in 9.6 and R11 alike.

    It does not seem to be related to my dirty flag, or to missing UPDATE Messages.

    Might it be bc of the way that i setup my virtual hierarchy in the generator ? Its a somewhat deep hierarchy and i use several sweep nurbs that use spline instances as profile.

    some of my virtual sweeps get rendered and some are not, when using the render lod / external render setting.

    Has anybody had the same problem yet ?

    thanks,
    Daniel



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/05/2009 at 06:55, xxxxxxxx wrote:

    Finally somebody who experiences a similar problem with the LOD :D

    I have the same problem: My Landscape object is strangely called twice with different LOD values. It renders with high LOD, but clone objects that create clones on the landscape, seem to relate to the Low-LOD geometry.

    Nobody seemed to understand what the problem is, when I posted it.

    Problems with Display Tag LOD

    Unfortunately, I still have no solution, because we cannot change the way, how Cinema calls our plugins. Fixing this (or providing proper information about how to do it right) would be up to the SDK team ;-)

    Greetings,
    Jack



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/05/2009 at 07:11, xxxxxxxx wrote:

    Hi Jack,

    i saw your post before, but i think its a different problem.

    Your using some numerical LOD override as i understood, while i just want to render it normally with the external renderer (not using display tags or anything).

    Also you seem to have your stuff double, while for me there's some stuff missing.

    Maybe my problem has to do with the

    > hh->AddVFlags(VFLAG_POLYGONAL); \> . \> . \> res = op->GetAndCheckHierarchyClone(hh,cube,HCLONE_ASIS,&dirty;,NULL,FALSE);

    part as i dont understand this fully, just c&p;'ed it from the sdk..

    If you dont use display tags, and make an editor render, with Display->'User Render LOD for editor Render', does it work for you as it should ?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/05/2009 at 12:05, xxxxxxxx wrote:

    Also here's my GetVirtualObjects, maybe there's something wrong there:

    > <code>
    > BaseObject *Generator::GetVirtualObjects(PluginObject *op, HierarchyHelp *hh){
    >      
    >      BaseContainer *bc= ..
    >      BaseObject* parent = ..
    >      BaseObject *main=NULL;
    >      BaseObject* res= NULL;
    >      // get the object to generate stuff from / for
    >       // it specifies the dimensions for the generated objects/hierarchy
    >      BaseObject *cube = ..
    >
    >      if(cube==NULL){
    >           // make sure its not null
    >        ..
    >      }
    >         // just in case..
    >      if(cube==NULL) return NULL;
    >      
    >      // request polygonized input
    >      hh->AddVFlags(VFLAG_POLYGONAL);
    >      Bool dirty = cube->IsDirty(DIRTY_MATRIX|DIRTY_DATA);
    >               
    >      
    >      // GetAndCheckHierarchyClone also hides the original obj, as its replaced with the virtual objects.     
    >      res = op->GetAndCheckHierarchyClone(hh,cube,HCLONE_ASIS,&dirty;,NULL,FALSE);          
    >      // if !dirty, object is already cached and doesn't need to be rebuilt
    >      if(!dirty) return res;     
    >      if (!res)   return NULL;     
    >           
    >      BaseThread    *bt=hh->GetThread();
    >      // group all further objects with this null object
    >      main = BaseObject::Alloc(Onull);
    >      if (!main) goto Error;     
    >
    >      // get object settings from the interface
    >      Real ow = ..
    >      Real oo = ..
    >      Real od = ..
    >      Real iw = ..
    >      Real io = ..
    >      Real id = ..
    >      
    >      if(!CreateVirtualObject(bt,main,op,ow,od,oo,iw,id,io)) goto Error;     
    >
    >
    >      blDelete(res);
    >
    >      // this is the virtual object (hierarchy) that gets drawn
    >      return main;
    >
    > Error:
    >      blDelete(res);
    >      blDelete(main);
    >      return NULL;
    > }
    > </code>



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/05/2009 at 01:05, xxxxxxxx wrote:

    Hi all,

    sry to bump this, but it's a critical bug for me, as it wont let me make correct renders of my generator :(

    Does Nobody have a clue? I could post some more code if needed..

    thanks,
    Daniel



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/05/2009 at 02:07, xxxxxxxx wrote:

    I think you have to step through the whole code with your debugger, when starting an external render. Really, line by line. I know it takes a long time, but it's the only possibility to see, if some parts simply aren't generated for some funny reason.

    The reasons can be so versatile, I can't tell from your code. Looks ok to me (just I do a ->Message(MSG_UPATE) on main and op before returning my results. It *seems* to be faster sometimes, but who knows :D ).

    Greetings,
    Jack



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/05/2009 at 06:50, xxxxxxxx wrote:

    The code looks ok to me. Maybe it's something in the CreateVirtualObject() function.

    cheers,
    Matthias



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/05/2009 at 06:55, xxxxxxxx wrote:

    Hi.

    it turns out, that some stuff is not rendered bc a certain check returns false, when doing an external render, which is kinda strange.

    i'll investigate and post the results here, unless it all was just due to some stupidity on my part ;-)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/05/2009 at 08:08, xxxxxxxx wrote:

    ok i got it:

    at some part i was getting an object from a linkfield,
    and used GetActiveDocument() :

    > \> BaseObject\* object = (BaseObject\* ) bc->GetLink(WD_OBJECT_LINK,GetActiveDocument()); \> if(object ==NULL) return NULL; \>

    this returns the object not, during an external render, but it does during an internal/preview render.

    So now i just pass the doc of my plugin (op->GetDocument()) into the function, and viola it works.

    I will check my code now for other parts where i call getactivedocument, and see if i should change those as well.

    greetings,
    Daniel



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/05/2009 at 08:20, xxxxxxxx wrote:

    Yes, GetActiveDocument() only gives you the editable document, e.g. the one you can see in the editor. The picture viewer renders a clone of this document making your links invalid.

    This is also important to note for expressions.

    cheers,
    Matthias


Log in to reply