Jump to content
Dear members and visitors, click here to subscribe for full access to community. This includes posting, plugin and asset downloads, free premium training courses and removal of Google ads. ×

Abyss

Limited Member
  • Posts

    128
  • Joined

  • Last visited

Posts posted by Abyss

  1. 56 minutes ago, zeden said:

    Of course it is better for everyone than staying with physical/standard. But it is not about progression on CPU rendering it's about lifting C4D's general rendering into present times which means: GPU

    The CPU version is said to be multiple times slower.

    Which CPU renderer is faster though?

     

    also it depends on the persons computer. some people dont have a great GPU. 

  2. I think with fields you would definitely have control over it. where its to show up first etc. Also cel renderer might be a quicker option. And secondly it would probably be easier to do it in post like After Effects. maybe two render passes. one with the shaded main file and one with just the cracks. on top of it. You could then easily mask that crack pass layer in after effects and expend the mask during the animation. might be slightly more work not sure.

  3. I am also not that familiar with Sketch & Toon. but i noticed there is a opacity map option. So if you have R20, you could create vertex map on the Voronoi fracture (they even have prexisting vertexmaps, like outside faces, edges etc). And use fields to control the vertex map. Which would then in turn control the Sketch and Toon and when it shows up. 

  4. 50 minutes ago, jed said:

    I agree - there's a ton of Python tutorials on YouTube, but the hard part is interfacing it with C4D. I find the official C4D Python SDK extremely difficult, so I tend to grab little bits of code from stuff I don't really understand in posts here, CG Society and the plugin site.

     

    I guess one plus point is - ordinary programmers just get to (mainly) crunch numbers, whereas we get to move stuff around.

    Yeah I have done a lot of python tutorials and I feel I get most ofi t at this point. Well all the basics. Ive completed codeacademy and a lot more. But when you hop over to python for C4D. 90% of all that python knowledge is almost lost. well lets just say 70%. It feels knowing the C4D SDK documention and how it all works is about 70% and then all the python functions and syntaxes is only about 30%. If you want to change anything in C4D you really need to know where to look in the different c4d modules and which part and which function etc. 

  5. 50 minutes ago, jed said:

    A recent cafe thread about automatic anagram animation got the old grey matter ticking, and here's the current WIP. Might amuse somebody -

     

     

    Python scene file

    https://www.dropbox.com/s/yvqtmxjmzbukjkm/carthorse.c4d?dl=1

    Nice job Jed.

    love all your python stuff. 

     

    Have been recently trying to learn it myself and its definitely so much fun and its interesting to be able to create things in Python.

    Its just a shame there is so little information out there. There are only a handful of people actually utilizing python in cinema it seems.

  6. 36 minutes ago, natevplas said:

    Thanks Abyss!  Yes, I should try that.  I'm a little concerned that this will cause my computer to have to compute a lot of unnecessary clones, though.  Maybe it's not a big deal, but seemed like there must be a better way.  Also, I plan to render with Octane, so I'm not sure if the shader effector works properly with it or not.  I might try X-Particles too.

    It will work with Octane, since all the shader effector will do is tell you where the clones will be cloned on. And I am not sure but I think if clones arent visible they wont be computed. If you have a grid of 100 polys and each has its own clone. If you then say only have this one poly show its clone. thus ending up with 1 clone. I am pretty sure the other 99 that arent being used or shown will not factor in.

  7. 1 minute ago, SolarPH said:

    You mean I just need to replace "print any" with "if"?

    this was my complete post:

    just assign that any part to a variable and then you can just check if that value is True

     

    ##################

    DATA_REGISTRY = [203,200,202,201] # any order
     

    print any((True for x in DATA_REGISTRY if x in OBJ_C))

     

    _________

     

    so something like this

     

        lst = [200,201,202,203,204]
        DATA_REGISTRY = any((True for x in lst if x in OBJ_C))
        
        if DATA_REGISTRY is True:
            print "yay"
        else:
            print "nay"

  8. 4 minutes ago, SolarPH said:

    it prints out True even if I changed the "True" with "x"

     

    but I can't find out how should I use it as a boole result for an if-else statement

    That's what I added underneath my last post

     

    you can also use this to find out which of the number in the list was found.

     

    for x in lst:
            if x in OBJ_C:
                print x

     

  9. 37 minutes ago, SolarPH said:

    I think I should change the next step, since I think I can assign a link input named NullPort, which is an empty link field.

     

    The next step now is to make the script compatible at some range, like IDs 200, 201, and 202

     

    For my current project, I do have 3 object classifications:

     

    1 . Interactive Block (BLOCK_REGISTRY)

    2. Structure (STRUCTURE_REGISTRY)

    3. Item (ITEM_REGISTRY)

     

    If you are familiar with Minecraft rigs or the game itself, the Interactive block will be with my redstone rig, the Structure with my End rig, and Item for the Item Frame rig, which is also in my redstone rig pack.

     

    I need one of the IDs to be present, if none does, the object field will be cleared by this line:

     

    obj[c4d.ID_USERDATA,1] == NullPort

     

    which obj is the source, and NullPort is the input port with an empty link field.

     

    I have this now in the ID assignments:

     

    DATA_REGISTRY = 200

     

    I changed the lines in the condition with this:

     

    if DATA_REGISTRY not in OBJ_C:

              obj[c4d.ID_USERDATA,1] == NullPort

     

    I tried to change the ID assignment to this:

     

    DATA_REGISTRY = [200, 201, 202]     #First Attempt

    DATA_REGISTRY = 200 or 201 or 202     #Second Attempt

     

    On the first attempt, nothing worked, but also no error

    On the second attempt, only 200 worked, others didn't, and still no error

     

    DATA_REGISTRY = [203,200,202,201] # any order
     

    print any((True for x in DATA_REGISTRY if x in OBJ_C))

     

    _________

     

    so something like this

     

        lst = [200,201,202,203,204]
        DATA_REGISTRY = any((True for x in lst if x in OBJ_C))
        
        if DATA_REGISTRY is True:
            print "yay"
        else:
            print "nay"

     

     

  10. 12 minutes ago, SolarPH said:

    This line from your script might be the cause.

     

    idnum == tup3[0].id     #which returns the first User Data ID on topmost of the UserData Manager

     

    instead of:

     

    tup3 = [x[1].id for x in tup2]     #which returns a list of all UserData ID that exist within an object linked

    Alright I guess you are right. That does indeed return a list of all the userdata not just the first one.

     

    And your next step is?

     

    you want to clear the remove the object from the object user data input? the object link.

    if the id is not 200. or if OBJ_C returns an empty list

  11. 18 minutes ago, SolarPH said:

    For the example you gave, it did only scanned the first user data in the manager.

     

    Also, it always works in any range of user data count.

     

    Btw, I have some modifications with your script, and searched for python codes for extracting user data IDs, and revising it, I have hit the code that I wanted.

     

    import c4d
    #Welcome to the world of Python

     

    image.thumb.png.2eae8701bddfbe96d953230c147ab437.png


    def main():
        
        objlink = obj[c4d.ID_USERDATA,1]
        
        OBJ_A = objlink.GetUserDataContainer()
        
        print OBJ_A
        
        OBJ_B = [x[0] for x in OBJ_A]
        
        print OBJ_B
        
        OBJ_C = [x[1].id for x in OBJ_B]
        
        print OBJ_C
        
        if 200 in OBJ_C:
            print "Success"
        else:
            print "Failed"

     

    OBJ_A extracted all the User Data entries from the object linked

    OBJ_B extracted the first tuple entries from all the tuples available

    OBJ_C extracted the actual IDs of all User Data entries from OBJ_B

     

    Since I have accomplished this step, the next one is to clear the object field if the linked object either don't have the ID number, or have an Invalid Object ID from User Data 200, since it uses Static Text userdata subtype.

    What exactly did you change in this one that does make it work? it basically is the same setup.

     

    I had only added an extra feature under try. To see if there is a user data present at all. 

    With the script you added here you cant see that. You are looking for ID 200 and if that isnt there you simply have it return as failed. But then you dont know whether it failed because the user data number on the object isnt equal to 200 or that here is no user data at all or perhaps even a different error. 

  12. 1 minute ago, SolarPH said:

    @Abyss

     

    I have tested your code.

     

    Yes, it works, but has a downside.

     

    It only scans the first tuple, so the script will not work as expected.

    What do you mean it only scans the first tuple? It doesnt .

    Do you mean it only scans the first the user data? 

     

    You can easily fix that and have it scan the second if there is a second one or even third, fourth, fifth.

     

     

    If you want to check if an object with multiple user data inputs has any input with the id 200 . you can do that too. As it is now. it checks if the first user data input is equal to 200 and it also checks if there is a user data input at all. if not it will also return false

  13. @SolarPH

     

    Interesting.

     

    Well first of all to find out whats wrong you can print out what objlink.GetUserDataContainer() returns and print out what [c4d.ID_USERDATA,200] returns.

    They return different types.

     

    the first is a list of tuples and the other is a list of two numbers. That's why it is not working.

    What you can do is first to try and extract the number you are looking for in the list of tuples

    once you have that you extract the number from the list as well and then simply compare if they are the same.

     

    In this case you dont have the extract the number from the list since you know what value you are looking for. its 200. so you can simple compare the first extracted number to 200.

     

    Hope this all makes sense.

     

    Here is the code. it should work.

     

    def main():
        
        objlinktemp = obj[c4d.ID_USERDATA,2]

        tup = objlinktemp.GetUserDataContainer() # returns list of tuples
        tup2 = [x[0] for x in tup] # returns the first tuple list
        tup3 = ([x[1] for x in tup2]) # returns the second tuple number which is the id

        while True:
            try:
                idnum = tup3[0].id     #returns objects first userID number
                if idnum == 200:
                    print "Success the object id 200"
                else:
                    print "Failed the object id is not 200"
                break
            except IndexError:
                print "No user id input in the object"
                break

  14. Well in your scene it is working too.

    However in your scene there is no collision. You are only colliding with the floor. You arent colliding the clones with each other.

    Which is what you have connected in both Object A and Object B.

     

    Throw an attractor in there so they all collide. Then you will see it works.

  15. Fairly simple with a Python node in Xpresso.

     

    What you are looking for is the  "c4d.CheckIsRunning(c4d.CHECKISRUNNING_ANIMATIONRUNNING" command.

     

    Then its basically just an "if" statement with that command. Output a boole type in your enable or visibility input of what you want to hide.

     

    I have added a file.

     

     

    HideonPlay.c4d

  16. Looks great indeed. I didn't notice the glass bowls. The only thing that caught my eye a bit. are the intersections with the floor. especially the kitchen area. the wooden part for example it almost feels like its floating off the ground, maybe also the carpet..

    Maybe more ambient occlusion would help? 

  17. On 21-3-2017 at 11:02 PM, Dbit said:

    Actually originally I wanted one set of controls to take over and another to cut off, and it could just parameter jump to wherever. But now I realize that I need that and also to limit the outputs. So what I was hoping to achieve is kind of like this, plus a switch, but you can't have multiple input sources for the same objects..

     

    So stack 1 should control effect 1, 2 & 3;

    Stack 2 should control effect 1 & 2;

    Stack 3 should control effect 1;

    etc. But they are dupes of each other, so I'm trying to think this one through and having trouble with it. 

     

    58d1a2ee8e97f_ScreenShot2017-03-21at3_06_39PM.thumb.png.f9a13ea62c4416e482c9cd2562972e0e.png

    You can use the Math:Add node to hook them all up properly so they work simultaneseously. Which will mean that sliders with the same parameters. For instance the rotation in all three, will all be used as a mix. (slider 1's value + sliders 2 and 3)

    But if you only want the current "activated" slider to have control. What you can do is make dupes like you have done. And use the "On" port.

    Then have that On port which is a boole be controlled by a switch.

    And that control can simply be something like " if slider number three's value is more than 0 than produce an off on the switch". And have that switch go into the other two dupes where you have your other sliders hooked into.

    And that switch can be based off anything. Maybe you only want the slider to be active that has been pushed the furthest. then have that control the switch. you get the idea.

     

  18. On 9-3-2017 at 2:58 PM, shining said:

    Hi,guys.
    Sorry for the simple question,how to insert an effector into the effector list of the cloner object? my code is not working,but there is no errors in the console.I don't know what I am doing wrong or does have to add some another codes .here is my code as in the screenshot below :

    Thank you very much!

    code.PNG

    Insert Effector.PNG

    add this final line:

    cloner[c4d.ID_MG_MOTIONGENERATOR_EFFECTORLIST] = efflist

  19. 20 minutes ago, jed said:

    That's iterating 2 sets of 4 items - @degrotepeter wanted 1 output 'has there been any collision with items in the iteration list'.

    yeah sorry it wasnt nessecarily in reply to his question, i figured you already figured that out.

    It was more my personal enquiry if a list can somehow be used in the collision node, which you can but its limited, .for certain purposes it would be useful, for instance changing a property of one of the collided objects when its being collided with.

    but for calucations and such, it seems you have to drag the objects in at some point. 4 is still easy but imagine having 200 objects. I guess thats where python comes in.

  20. 4 hours ago, jed said:

    @Abyss I've a gut feeling there's an easier solution that I'm missing. I think the reason the original setup didn't work is mixing iteration with normal nodes. The linklist is outputting several objects one after the other, but the collision node is a 'static' test. It's like when you hang a result node on some iteration object - you don't see what you expect, you see the last object on the list.

    iteration.jpg

    A brute force method would be to just have a big page of collision nodes eg this setup detects the sphere colliding with any cube - then scale it up.

    collision.jpg

    It's more or less what my Python list method does.

    I've only dabbled in XPresso Python nodes. There's an area of Python I've yet to learn, where the script manipulates C4D objects and methods by name/ID. I think some nested loops where you could test 'does any object on list #1 collide with any object on list #2' would solve this multiple collision problem.

    Well apparently it does work, at least it does calculate the whole list you put in. Its just having issues with the output. Outputs wont read it. unless you output it again in a list.

    Collision-list.c4d

  21. 7 minutes ago, smenegozzi said:

    I have a sculpt that is 3.8 million polys, it's a level 6, and is taking up 780 MB of memory.  My computer has 64 gigs of memory, a fast processor and graphics card, and yet the viewport moves incredibly slow, like less than 1 fps.

    I tried this same project out on a computer at work that's running r14 and has worse specs and it has no problem moving around in the viewport.

    I've turned off Open GL and upped the sculpting memory to 4 gigs and still no difference.  It does get better when I lower the sculpt level though.  Rendering is quick though, what I'd expect from my card.

    Any ideas?

    It should be able to handle 4 million polys, especially if its one object. if its multiple objects, C4D does slow down a lot.

    But your example is just one object. So I am not sure. You can try to put the object in a connect object. to force it to see it as one object.

    If that doesnt help, make sure that your Cinema 4d is allowed to use all your RAM and such.

×
×
  • Create New...