Jump to content

Cairyn

Regular Member
  • Content Count

    85
  • Joined

  • Last visited

  • Days Won

    3

Cairyn last won the day on November 6

Cairyn had the most liked content!

Community Reputation

37 Noble Beginner

About Cairyn

  • Rank
    Cafe Ronin

Profile Information

  • First Name
    Ronald
  • Last Name
    Klemp
  • C4D Version
    R21
  • Website URL
    https://www.patreon.com/cairyn
  • Location
    Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Sheesh! I just cannot wrap my brain around it. Obviously my first thought was not correct; all the to-be-merged points are easily close enough to each other to be merged. Final observations: The error happens ONLY if I first select almost all points. Strg-A or dragging a rect selection across the object or using live selection doesn't matter. Once all 144 points are selected, the error happens. If I deselect some points (varying numbers depending on the points), the error does no longer happen - EVEN IF the deselected points have nothing to do with the upper or lower summits!!! I can deselect the outermost points of the petals, which are not even in the polygon loop of either summit, and suddenly the merge shows the desired results. The error always happens or doesn't happen on both poles at the same time. I have not managed to provoke the optimization to treat the poles differently. Setting the maximum distance in the Optimization dialog to 0.05 removes the error altogether. 0.04 doesn't suffice. But as my last post showed, that is far, FAR away from the actual distance of the points I expect to merge. I couldn't find any invisible points that may disrupt the algorithm. Mesh checking does not reveal anything new about that mesh. So, all in all, the fault must be with the Optimize command that just misses two merges under the described circumstances. Sorry, I have neither an explanation for that, nor a solution except to select less points (so the command works) and always to test the results for an optimization with Mesh Checking. I recommend sending this model in with an error description, as I cannot find reason for this happening except a bug.
  2. Okay, I had a look at the actual values. First thing, the upper tris and quads are not connected at all with their right and left neighbors (I have moved and scaled two sides to see the connections better). The distances, however, are minimal. Two optically colocated points are no farther apart than 6.14390630018e-07 units, which is far below the value set in the Optimize dialog. After optimizing with the default values, the side points are correctly merged and form the base of the dome. The tip, which appears off-center, is still two points though. Here I have pulled out one of the two points to show the topological gap: So, the subdivision surface is not to blame; it sees two separate areas meeting in a point and its two adjacent edges. The problem is that the optimization doesn't merge all the 8 points of the tip, but obviously creates 2 result points by merging 6 points in one, and 2 points in the other. Now, why does it do that? In the image above I colored red and blue the two top triangles whose summit points have the greatest distance. But nooo! These two merge fine into the same result point! To be sure, I looked at the real point positions and the distances between each: The first list contains the 8 selected summit points (index in selection, original point index, position vector). Here, the values are identical (as far as the precision of the vector goes). The second list compares each point with each other (two selection indices plus the distance). The last value is the maximum distance of all. Obviously, all the distances, even the maximum, are very very small 6e-7 is 0.0000006 which is far smaller than the 0.01 distance default of the Optimize command... So I tried optimizing once more, and... Everything's fine. What the heck???? Still sitting and testing here...
  3. Mmmh... I tried that and got the same, and tried it again with optimization at a 0.05 distance instead, and then the point was in the center as it should be... There are many more points unconnected than just the two poles in the original model. My suspicion is that points along the sides which are optically in the same place are actually farther apart than 0.01 units, and these are not covered by the optimization, which results in leftover disconnected-but-seemingly-identical points, which then create the above shape when SSD'd. I'll check later again, but I fear that the model is not as symmetrical as it seems.
  4. The colors are saved in multiple places actually. If you changed colors manually, go to your Home directory and find under /prefs the file <schemename>.col. This file contains the overwritten color set. Deleting it (well, to be sure just rename it) will restore the colors that are stored under Home directory /library/schemes/<yourscheme>/<yourscheme>.col. If there are no local schemes, C4D will use the default ones in the installation directory, which you shouldn't change anyway.
  5. "Align Clone" checked, "Up Vector" None, "Distribution" Polygon Center - this will use the poly's surface normal to make the clone's z axis point outward. The cylinders need to be oriented in the z axis, naturally.
  6. Okay, since this issue bugged me, I have created a script that can select colocated points by pointing at the polygon in the proximity. https://www.c4dcafe.com/ipb/forums/topic/107824-script-selectbyproximity-5-tier/ This is not a tool but a command, so it works with all tools, but it requires a keyboard shortcut to be applicable.
  7. Hello; recently, the question has come up on how to cut a mesh (with the Disconnect command), and subsequently how to select certain colocated points. Cutting a mesh (among other workflows) creates duplicates of points along the cut which are on top of each other so the normal selection can't "grab" a specific one. The script PS_SelectPointByProximity allows you to point at a polygon to select one of its points (that is closest to the hit spot). This avoids the ambiguous selection issues that the standard selections create. (Keyboard shortcut needs to be assigned, point mode recommended, but it runs with all tools - no change of tool necessary.) This script is available on my Patreon on the 5$ tier: https://www.patreon.com/posts/script-select-by-31302799 More explanations here: https://www.patreon.com/posts/script-select-by-31302699 As a patron, you also have access to: Time jump scripts: https://www.patreon.com/posts/python-spoonfed-31172559 (2$ tier) Switch to Next/Prev Camera: https://www.patreon.com/posts/open-source-to-31104070 (free for all) Plugin: Collie Project Button Bar: https://www.patreon.com/posts/plugin-collie-5-30897175 (5$ tier) Also, all Python:Spoonfed tutorial posts (most are even free) Don't be shy, have a look and consider becoming a patron! https://www.patreon.com/cairyn
  8. The difficulty here is that even if you would be able to cycle through the points - would you know what point is which? I don't know thousands of point indices by heart. So there must be some graphical indication what the point belongs to, like highlighting the polygons or edges it belongs to. Which would STILL create difficulties if the polys themselves are coincident, like in a direct copy of polys. Fact is, any manager working by indices is too cumbersome to use, and any concept using viewport hints is incomplete. (Although for starters, I would take the "near select" tool I described. I wonder if I should just program it.)
  9. With R21 there is another interesting issue. Edge disconnect disconnects both end points of the edge in a way that the polygons parallel to the edge stay connected - both points are split into two points. Both. There is no way to split the edge at only one of them; you need to reconnect the other (unwanted) point after the split again. Now you could disconnect that point. But then, this point doesn't split into two but four points (in a regular quad grid), so all edges that use this point are split. This is not a bug but perfectly fine with the GUI provided. Yet... ...I cannot select a single point and disconnect only along two edges. See the image: On the top, this is a disconnected edge. On the front, there is a disconnected poly, and a disconnected point. On the right side (selected) is what I want. Note that no other points on this side are split (no two are in the same position but physically different). Of course, the GUI philosophy doesn't support that, as the disconnect depends on your selection. To define the edge that the point should split, you need to select the edge; to define the point, you need to select the point directly. You would need something like "click on the polygon, and the edge closest and the point closest are defining direction and separation". Speaking of, I could use a similar concept in selecting "one point of several that are at the same position". How did I live without that before... Sorry, now I hijacked the thread...
  10. It does in R21. I suppose it has been added after R17, although I don't remember when.
  11. I find the Measure & Construction tool quite quirky anyway. What you can do is to create a Measure & Construction object instead of using the tool's list of... well... pseudo-objects. A true object can be made invisible through the traffic light icons (or any function that influence these) - in fact, the "Show" checkbox in that object seems to be directly connected to the traffic light settings. The advantage is that you have only one measure per object (instead of a list) so it's easier to handle.
  12. Nope. The Show button is not a global setting but bound to the content of the Selection dropdown. Which again can have arbitrary entries. So, the first thing you would need to do is to identify the Selection that you wish to switch off, find where it is even stored, then toggle the Show value there. This is most likely not a small script. Sadly, I don't see a documentation manual for Measure & Construction, and if you look up the many MDATA_MEASURE_ values you don't find any pointers either. You can ask on PluginCafé; maybe the developers have a doc.
  13. If you want to write the behavior of an object over time, then you need to loop over that range and set the proper time before you write out the values. Here I have changed the script above to set the time. Note that this is very primitive, it uses a hardcoded object name "toFile" to find the proper object, and a hardcoded frame range of 0 to 20. You may want to build a dialog around this. import c4d #Welcome to the world of Python def Walker(obj): if not obj: return elif obj.GetDown(): return obj.GetDown() while obj.GetUp() and not obj.GetNext(): obj = obj.GetUp() return obj.GetNext() def main(): obj = doc.SearchObject("toFile") if obj == None : return name = obj.GetName() startFrame = 0 endFrame = 20 file = c4d.storage.SaveDialog(c4d.FILESELECTTYPE_ANYTHING, title='Save csv file as', force_suffix='csv') csv_file = open(file, 'w') for frame in range(startFrame, endFrame+1) : btNum = frame btDen = doc.GetFps() bt = c4d.BaseTime(btNum, btDen) doc.SetTime(bt) doc.ExecutePasses(None, True, True, True, c4d.BUILDFLAGS_0) obj_matrix = obj.GetMg() position = obj_matrix.off rotation_rad = c4d.utils.MatrixToHPB(obj_matrix,c4d.ROTATIONORDER_XYZGLOBAL) rotation_deg = c4d.Vector(c4d.utils.Deg(rotation_rad.x), c4d.utils.Deg(rotation_rad.y), c4d.utils.Deg(rotation_rad.z)) line = '%s, %s, %s, %s, %s, %s, %s'%(name, position.x, position.y, position.z, rotation_deg.y, rotation_deg.x, rotation_deg.z) csv_file.write(line + '\n') csv_file.close() if __name__=='__main__': main() I have only briefly tested this with a positional animation, but not with a spline path. If you are interested in Python programming, also have a look at my current tutorial series Python: Spoonfed that can be found here: https://www.patreon.com/cairyn (Although you may know more Python than the tutorial currently uses )
  14. Open Source Scripts: Switch To Next/Prev Camera Hello; I'd like to point you at the the two scripts Python: Spoonfed has been working towards during the last week. They are on Patreon, but available for free. https://www.patreon.com/posts/open-source-to-31104070 The scripts cycle forward (or backward) through all available cameras (see the post for details). Yes, you probably have seen this or similar functionality already, but Python: Spoonfed gives you not just the scripts, it also gives you all the needed lessons to program such scripts by yourself, and detailed explanations as to what works why, and why the $%&§ thing crashed again. There will be more to come, so don't miss out; with 14 spoonfed lessons in, it's still time to join, and some more patrons wouldn't hurt either. https://www.patreon.com/cairyn
×
×
  • Create New...