NULLs on-the-fly assigned to proximal object list.



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

    On 28/11/2010 at 09:14, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   11 
    Platform:   Windows  ;   Mac OSX  ; 
    Language(s) :   C.O.F.F.E.E  ;   XPRESSO  ;

    ---------
    Hi All,

    I am creating a scene to emulate the i-tunes style visualization spheres.

    I basically see it as a sphere with an attractor that pulls in and releases mograph cloner objects. When a mograph clone touches the sphere, it lights up only in that area. I can achieve this with a proximal shader, however, only for a single clone.

    Now I have seen some scenes that have  companion list of NULL objects that track the cloner objects position. The NULLs go in the list of the proximal shader and act as the trigger for luminostiy. While this can be manually setup, I am looking for a COFFEE/Xpresso solution to set all this up automatically. I may be faced with particle/clone count in the 100's or 1,000's.

    The Xpresso portion can iterate through all the clones. But it is the COFFEE portion I am having trouble with.

    Mainly, I need a way to create NULLs on the fly and insert them into the document object of the scene. I also would like some smart code that examines if the NULL already exists and skips creation if it detects an existing NULL for a clone.

    I also need a way to create a list (I assume a string or array of string) of NULL object names and assign it to the proximal shader.

    If anyone has any tips or has done something like this, I would appreciate any advice or direction.

    Thanks you.
    DS



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

    On 29/11/2010 at 06:18, xxxxxxxx wrote:

    It is not allowed to modify the scene hierarchy through expression tags (XPRESSO, COFFEE). The only way to add objects dynamically to a scene is through Thinking Particles and MoGraph.

    cheers,
    Matthias



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

    On 29/11/2010 at 09:50, xxxxxxxx wrote:

    Just to add to Matthias' response: You can add objects dynamically to a scene, but only virtually, by way of a generator object plugin.  They will only become actualized as real objects (and no longer be 'dynamic') if the user makes the generator editable.  And this would require you to use the C++ or Python SDK as neither COFFEE nor XPRESSO support object plugins.



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

    On 30/11/2010 at 17:13, xxxxxxxx wrote:

    So that is why this function fails...

      
    createSphere(passedIndex)  
    {  
      var sphere = new(SphereObject);  
      sphere#PRIM_SPHERE_RAD = 10;  
      sphere->SetName("mySphere"+ passedIndex);  
      doc->InsertObject( sphere, NULL, NULL );    
    }  
    

    InsertObject is not implemented.

    Ok, so you can do this via Python, is that correct?

    Can anyone translate the above code into python? Or point me to a python resource.

    Thanks


Log in to reply