Jump to content

maliohammad

Limited Member
  • Posts

    2,039
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by maliohammad

  1. you are welcome :) yes , xpresso helps a lot , and speed up your workflow
  2. use this in your script for i in objs: tag = c4d.BaseTag(c4d.Thaircollider) i.InsertTag(tag) doc.AddUndo(c4d.UNDOTYPE_NEW, tag) BTW , most tag in python are T+tag name , and here is a link which will help you with the irregular ones : http://villager-and-c4d.cocolog-nifty.com/blog/tag-type.html
  3. @howie here is the file suspension test 1.1.c4d
  4. now I get what is your problem :) you have to access the mograph data and get the position (not the null position ) , I will make it and give you a sample file (or maybe some one do it before me :D )
  5. the delay is adding a little bit of movement , delete the protection tag and set the delay to 75% and you will see the effect better
  6. not it is very fast if you are using a lot of reflections , I use HDRI with completely reflection materials (no GI ) and it give me very fast results and nice very nice looking . the "slow" is caused by GI , so if you didn't use GI every thing will be much faster .
  7. I am not sure if it still worth it or nut , but if it is speed up your workflow then use it , always use the most useful thing for your workflow .
  8. I am not sure about your question , but HDRI Light Studio is a great app for making + editing HDRIs . It even have a connection for c4d to test how the HDRI is working (in realtime )
  9. I tried (NONE,False,True,True,c4d.BUILDFLAGS_0) and no crash ,but nothing happened . Did you recheck your code , maybe something is wrong , and you can ask the question on plugin cafe so you get better answers .
  10. I think ExecutePasses() will help to fix the problem (see the doc about this method )
  11. you are simply adjusting the blend option of the layer shader , which don't have much controls . I think you have to use multiple materials to create the effect you want , or just use gradients to colour them .
  12. when you open the obj file in c4d , set the scale to a millimetre or micrometer then set the phong angle to 180
  13. this is what I get when I want to download the file
  14. I tried to do it with expresso , but honestly I couldn't . so as a workaround , add retarget tag(to the planes null) from the character tags , then set the nulls group as the source , and the planes group as target . it will transfer position , Scale and rotation .
  15. I adjusted the code , you have to create cube , add segment in the y axis , make editable then run the script . this way you won't need to extrude import c4d from c4d import utils def SquishPoints(cube): """Welds the top 4 points of a polygon Cube.""" cube.GetTag(c4d.Tphong)[c4d.PHONGTAG_PHONG_ANGLE] = utils.Rad(40) if (cube is None) or (not cube.IsInstanceOf(c4d.Opolygon)): return points = cube.GetAllPoints() point_id_groups = [[11,8],[5,2]] # Split into sub-lists so each can be welded in turn. # Go through each set of points to weld. for point_id_group in point_id_groups: # Weld command isn't easily called via script, so we'll move the points we want to weld # to the same position, then call the Optimize command. # Calculate the center of the points point_position_sum = c4d.Vector(0.0) for point_id in point_id_group: point_position_sum += points[point_id] number_of_points = len(point_id_group) center_point = point_position_sum / number_of_points # Move points to the center for point_id in point_id_group: points[point_id] = center_point # Store the changed points cube.SetAllPoints(points) def main(): # Get a list of active objects. active_objects = doc.GetActiveObjects(flags=c4d.GETACTIVEOBJECTFLAGS_0) # Start recording changes you'll later want to undo. doc.StartUndo() # Squish together the points for all selected objects for obj in active_objects: doc.AddUndo(c4d.UNDOTYPE_CHANGE, obj) SquishPoints(obj) # Use the optimize command to weld them c4d.CallCommand(14039, 14039) # Optimize... # Let C4D know that something has happened and it should redraw. doc.EndUndo() c4d.EventAdd() if __name__=='__main__': main()
  16. you are improving a lot :) but I think lighting need to be adjusted a little bit (the directions of the lights )
  17. I will try to do something when I have some free time :)
  18. if you want it to work on multiple objects , then the best way is to use the script manager , and use something like this : objects = doc.GetActiveObjects(1) then use : for a in objects : then add the code above below . this way it will work on multiple objects with the need to use a python tag , the python tag is not good for this type of things because it will lock your selection and you won't be able to deselect the points . let me see what I can do about this .... maybe you can go away with out using the weld tool ? like getting the position of point a , and position of point b then get the absolute value of each of them so it would be in math like this : |a|+|b| /2 then this will be the new position for those 2 points , then run an optimise command to weld them . now we have to interpret this to python . P.S. to get the || use math.fabs P.S. 2 : you have to apply the above to 1 axis , so you will have the shape in your image :)
  19. I was wrong , it wasn't for python tag , I have optimise it to work with it now : import c4d #Welcome to the world of Python def main(): PointList=[1,3,7] #base_select_object obj = op.GetObject() points =obj.GetPointS() for i in PointList : points.Select(i) but I think it is better to use it in the script manager (but I don't know how to get input with the script manager ) I think you can ask them on plugin cafe on how to optimise this script to get an input from the script manager .
  20. the script in the link should run on python tag . you can replace pointlist , by a user data . but creating a full selecting plugin (without python tag ) is beyond my abilities .
  21. it is possible with python , check this : https://www.cineversity.com/wiki/Python%3A_Getting_Selected_Point_Index/
  22. you are improving a lot :) the levels don't have any thing related to how the hair thins out , it quantise the image . here is what in the doc about it : so you have to stick to the thickness tab to get the result you want .
  23. Mind blowing ! really like it :D did you use c4d only for this ?!
×
×
  • Create New...