Vertex map access from a tag plugin?



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

    On 19/07/2004 at 23:44, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.503 
    Platform:   Windows  ;   Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    Hi,

    is it possible to access and change a vertex map - from the same or another object - at the beginning of each frame from a tag plugin?

    I would like to sample lighting data to change the vertext map - any special considerations here?

    Thanks for any input!

    Kabe



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

    On 29/07/2004 at 06:41, xxxxxxxx wrote:

    Ok, maybe it's my Englich? Or was my question downright stupid? Have I overlooked something obvious?

    Thanks for any comment

    Kabe



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

    On 30/07/2004 at 17:15, xxxxxxxx wrote:

    Hi Kabe,

    if you register your tag plugin as an expression it will be evaluated for each frame. Then you can access the tag list of an object via

      
    BaseTag* BaseObject::GetFirstTag(void);  
    

    You can check the tag type via

      
    BaseTag::GetType()  
    

    The type ID for vertex map tags is "Tvertexmap".

    Then, when you cast the BaseTag object to VariableTag, you can access the actual vertex weights using

      
    LONG VariableTag::GetDataCount()  
    LONG VariableTag::GetDataSize()  
    void* VariableTag::GetDataAddress()  
    

    In a vertex map there should be one Real value for each vertex (same order as vertices).

    Hope this helps. Cheers,
    Marcus



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

    On 03/08/2004 at 04:34, xxxxxxxx wrote:

    Thanks, it helps indeed!

    Kabe



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

    On 31/10/2004 at 09:44, xxxxxxxx wrote:

    how do i have to cast this ?
    please post example code
    thx



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

    On 31/10/2004 at 13:28, xxxxxxxx wrote:

    ok, i have all the weight data now, but how do i know which point belongs to which vertex ?
    http://wwws.htwk-leipzig.de/~ctheil1/code.jpg



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

    On 31/10/2004 at 20:58, xxxxxxxx wrote:

    void *GetDataAddress() should be cast to a Real* for vertex weight maps (Tvertexmap).

    The array contains a Real element (weight value) for every vertex in the polygonal/point object - they are in the same order as you would get from object->GetPoint().

    Since you are using COFFEE, some this may need conversion from C++ syntax. :)



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

    On 01/11/2004 at 02:02, xxxxxxxx wrote:

    thank you very much!
    if they have the same order, it must be possible for me to get the relations. i hope so :)
    by the way, i only could play around with this vertexmap stuff, because i found an example somewhere inside the i-net, but i currently don´t know how to make one by myself ... i didn´t found the tag in the list, but c4d works with it like i can see in the example.
    so how do i have to create such a tag ? and how can i define the vertex to one special vertextag ?
    greetz.


Log in to reply