Jump to content

DALII

Registered Member
  • Posts

    48
  • Joined

  • Last visited

Everything posted by DALII

  1. @Hrvoje Each segment between two points individually, but also evenly spaced, based on the 10cm example. But with evenly I mean, it should - at least - look even, even if this means it uses not the 10cm, but 11,5 cm in that specific segment. In my image above, the example on top shows, that the left-most point would be way to close to the original spline point. Now, the Node should "somehow calculate the optimal X value". (I guess my bottom exampel isn't really helpful). Using basic and probably wrong math, I'd say, 34 / 11,33333 should give me 3 points evenly spaced. for that 34 cm segment, with the defined step of 10 cm. There, the additional 1,3333 won't hurt but will keep a nice and tidy looking spline segmentation. Maybe this helps a little bit more. If not, I'm not sure if the idea alone is quite useless anyway 😄
  2. I'm using the Resample Spline node in the Object Manager, simply attaching it as a Child Object to the Spline Object. This works really great most of the time, but sometimes I'd like to have an additional function to the node. Keep the original spline points and use the step, for example 10cm, for resampling, but: Make it a little bit more flexible. The 10cm step can come really close to the original points sometimes, and then an Object Cloner based on that Spline needs some more MoGraph Selection handling to get rid of the unwanted clones. Would it be possible to create a Resample Node, where each Line between two Spline Points is handled individually. It should check, how many 10cm steps are possible, and if it doesn't work out, it should use a little, predefined, Treshold to increase or reduce the Step size a little bit to help the overall look. (in situations where the 10cm don't need to be that precise, of course 🙂 ). I'll provide some images / screenshots later to make it more clear what I'm looking for. For now it seems like it should be possible to make (at least in theory 😄 ) Edit: Now with an image. (hand-drawn, dimensions not that precise) I can't write it down in logical, mathematical terms, but it needs the Treshold value X to be automatically calculated (based on lets say a predefined range that can't be exceeded. In some cases it also could be possible that the best solution would be to remove one clone completely and move the other accordingly). Maybe now it is a little bit more clear 🙂
  3. @Smolak Ah, I see! You have an object 'Wall' where you use Selection Tags to define / assign polygons as 'Windows'. After that, the Node Magic happens. 🙂 Nice approach too. But I guess - until now - not useable with our setup, because we build up walls with a Spline, Extrude Generator for Height and Thickness Generator for, yeah, Thickness. Then, inside the Wall Boole Group, we move around our WindowGRP with built-in Stop Tag. That way we are free to place them where we want without the need of moving Polygons / Vertex inside the Wall object. It should after all keep its non-destructive way. What could be improved would be the handling of thew WindowGRP. Everything merged into one Scene Node would be really great, because then you have centralized Settings and you can even click on the Window object and move it around (instead of re-clicking on the Null object that groups everything together).
  4. Pressing CTRL while selecting a Generator places the object after your selection, on the same hierarchy level. But this doesn't work for everything ... many Nodes objects don't do as they told :). I've created (together with ChatGPT, I believe) a quick + dirty script that moves the first object in the hierarchy to my currently active selection. Maybe something like that?
  5. This looks awesome. Having that much parametric control over even the smallest details, all only with some sliders. Really great! Even though I don't understand how the moveable hole inside the wall is realized. Are these lines you're moving a direct cut into the wall mesh? Or a separate object overlaying the wall object? Really looks great!
  6. These are some great looking windows that you get from a simple plane and ... lets say a few ... nodes :). For our case it still is necessary to have that Cut Out object for the Boole Operator. Because that way we can move that window around freely along the wall mesh and we will always have the hole in the wall aligend to the window asset. Right? Even if the nodes create its own extrusion inside the wall, while rendering the wall wouldn't be opened up and I would need to create a hole in a different way (Directly cutting it out with mesh modification or using a separate Cut Out Object for the Boole) Edit: Sorry, my comment on that somehow includes information regarding my previous discussion. That is because I didn't realize that you're a differnet user. Sorry 😄
  7. If you are not yet familiar with this option, you can also use the arrow keys. Then it works like the system you mentioned for Nuke. Depending on which place between the numbers your cursor is active you can change them more or less precise. 🙂
  8. Thanks! Yes, already thought that this won't work. But I guess it won't work for now? The Stop tag could be somehow reinvented into Nodes. Until then, it will be two objects. Do you mean - for the cleaner setup - I take the cutout polygon object and use XPresso with Bounding Box to resize it accordingly? Or would that be two Node Capsules communication with each other via Capsule Magic and / or Expresso? Thanks for your help and insights! I'm already on setting up at least a window frame scene node where I can adjust the size via Inputs. :))
  9. @Hrvoje Hi! I've a scene attached with the assets that I'm using right now (but without a Scene Nodes recreation for now). Two windows in the ORG folder, one with Stop tag, one without. My desired Scene Node would be a single Object where both of these elements are combined and working with the Wall Boole operator. But I guess this really is something that isn't possible (at least for now?) But even with two Scene Node Assets in the same setup like the polygon objects, I'm way more flexible I guess - time to update the assets :). NodesTestScene_FullWindowAsset.c4d
  10. @Hrvoje Thank you for that tip! Nice that this works the same like the (green) generator that is available in the Object Manager. 🙂 But - and I dont want to be picky or something here 😄 - the problem with the separated boole operation is not solved with the Connect node, right? In my example scene you see, that with the Stop tag, only the Cut Out Object is relevant for the "Wall" Boole Operator. The Window Object simply stays inside the hole without interfering with something. This isn't that special in my test scene, but if there is some more complex window asset inside, it doesn't work out anymore. This would be something for like: Cut Out Object gets into the primary mesh output node and the window asset into some secondary mesh output that isn't that "important" and / or ignored by generators and so on. Don't know ...
  11. @Hrvoje The setup I would want to re-create with a single node would be the one, where I have a cube-like polygon (cut out object) and a window polygon (window asset, originally with a stop tag and both objects are in a boole generator). That way the cut out object makes the hole inside a wall and the window-object stays there without interfering with any boole operation. And now I tried to recreate it with both assets inside a scene node. I can Output the cut out geometry and it does indeed make a hole in the wall like it should. But if I use a second geometry output for the window frame polygon it doesn't show up. And the nodes don't look like there are more options that I can choose from? Your explanation with mindset change and the 'simply don't apply it at first place' sounds nice! And a little bit like it should work if applied correctly. 🙂 I tried to create a basic scene with my original setup and the "approach" to recreate it with Nodes. But quite at the beginning I'm already clueless 😄 NodesTestScene_FullWindow.c4d
  12. @Hrvoje This is awesome! I really don't know how I could not try out such a simple but obvious approach. Maybe the CTRL + Drag is important there? This is exactly how I want my asset to be in the future. 🙂 Only one click to select the whole thing. Really great! Thank you! I'm already on it and trying to get some basic modification of a predefined point selection going but I guess I will check that out for myself for now. Still quite at the beginning with the nodes but at least there is some progress 🙂 . Maybe only one follow up question that will be kinda hard to tackle myself - after some initial searching I'm quite sure it isn't possible right now? Some of our window assets have a bool object integrated and the window polygon object is separated with a Stop tag. Would such a setup be possible inside a scene node? Didn't find anything related with the Shift + C commander and the available Nodes.
  13. @Hrvoje Thanks for your response! We have polygon based window elements like in the screenshot below. For now we have selection tags for differnet parts to modify the size of it. It also contains a separate object for the handle and window sill. (even more stuff with more complex windows) While I know that I can modify the object with nodes applied to the window object itself (manipulating points with selection tags and / or knowing the point ID of the ones i need). But for my best case scenario I would have only a geometry scene node object that contains the window object inside. That would be one single object with a node setup that allows me to manipulate some things. Kind of our own little asset without that nodes attached as a child. I believe that is not possible, right? The next guess was that I need to re-create the window with splines and sweeps / extrudes inside the geometry scene node and that way have only the scene node as my window asset. Hope this is a little bit more clear now 🙂 Sorry!
  14. one thing that i'm not quite sure where to search for an answer would be the possibility to modify an existing asset via scene nodes, but make the scene node itself containing that mesh information. that isn't possible, right? we have models of windows as polygons and a modification on the size (or other values) does work with a scene node attached to the polygon object itself. but it would be really nice to have only one object that contains all that information and is somewhat controllable with parameters. i guess it would be possible if we create the whole model with splines inside the nodes first? with the new point nodes it looks like we could create some profiles for sweeps and extrudes direclty inside the scene node.
  15. Hi Smolak, thanks for your ongoing support! 🙂 And thanks for the update / information about watermarks. While we're using Corona, I still managed to find the watermark settings for it. But it seems like the watermarks are still limited to the pre-configured ones with no chance to add custom watermark variables (like the Rotation value of the Corona Sun for example).
  16. Ah! That is a nice way to edit the HUD. I tried to add the button into my shelfs as a button. But this way will work too - just need to find the right position for it. 🙂 Thank you! While I was trying out some things with that into-the-HUD stuff I found the button that lets me enable 'Render'. Do you know anything about that by any chance? Because if this text would be render'able like a stamp on the image, it would really help with the Look Dev if there are some parameters exposed into the image. Unfortunately I cant get it work. Not with the Standard / Physical render and of course not even with Corona render. 😞
  17. Unfortunately this doesn't work for me. The button gets toggled visually, but nothing happens on the screen. Tried it with C4D 2023 and 2024. And the alternative with dragging properties out to the HUD would also be an option for me, but I can't get anything grabbed related to the Solo View in the layers menu or with the Attributes - Modes - Layers? Maybe I'm doing something wrong with both of the suggestions or my Cinema is cursed. 😞
  18. Hi. Like the title already says, I want to create a small little script that toggles the Layer Solo view On / Off for a specific, pre-defined Layer name. I created a small script based on a tutorial from Mike Udin on YT and / or some stuff I already did in previous scripts and the script also works, at least the button gets toggled. But the viewport isn't updating. (even tried some Refresh commands at the end). Does someone already tried to create such a script? Because it should toggle our Vorlagen / Templates layer and sometimes it would be nice, if I could all the overlaying objects and only look at the template itself. Maybe I'm just missing some obvious additional line to make this work. At least I hope! 🙂 import c4d from pprint import pprint def main(): doc = c4d.documents.GetActiveDocument() layer_root = doc.GetLayerObjectRoot() vorlagen_layer = find_vorlagen_layer(layer_root) if vorlagen_layer: toggle_layer_solo(vorlagen_layer) c4d.EventAdd() def find_vorlagen_layer(root): for layer in root.GetChildren(): if "VORLAGEN" in layer.GetName(): return layer return None def toggle_layer_solo(layer): # source # https://www.youtube.com/watch?app=desktop&v=Uboqi5jQDTU # Toggle the solo state # current_solo_state = layer[c4d.ID_LAYER_SOLO] # layer[c4d.ID_LAYER_SOLO] = not current_solo_state ld = layer.GetLayerData(doc) pprint(ld) new_ld = {'solo':True} ld = layer.SetLayerData(doc, new_ld) c4d.EventAdd() c4d.CallCommand(12147) # Update Screen # Execute main() if __name__ == '__main__': main()
  19. Thanks for that input. While I didn't completely understand how to give me control over the selections, I simply made another Node Modifier with a single Transform Geometry node. That way I can use that before / after and that really gives me fine control over the splines. Great, thanks! One thing I noticed is that the rectangle in my test scene, for example, doesn't close if I choose to only show the outlined spline and not both. Sometimes I believe even the original spline isn't closed if I choose to display only one of them. I guess this isn't the way it should work - while previous tests with sweeps did work correctly, other tests where I use them for extrudes it gives me unwanted results because they aren't closed. Edit: Checked that with C4D Support and they logged a bug for that behavior. They also provided a workaround. If the spline needs to be closed, use the 'Get Positions' and the 'Assemble Spline' node afterwards. But thanks for your input for the offset on the Y-axis. Quite simple but effective. 🙂
  20. Oh. Site is back. 🙂 I'llt ry to add the file and screenshot now ... and looks like it is working again. Thanks! Outline_SceneNode_Test.c4d
  21. Hi, there is a new Outline node in the latest update (2024.5). I did create a quick test scene node where I use only that one node for my spline objects. It really works fine with outline generation on the XZ plane (seen from top). But - and because! - the Node offers a 'Plane' setting to switch between the three planes, I tried to offset my spline into the Y direction. But there it behaves a little bit different. (see the screenshot attached, with the "node system", the settings and the outcome). Is this some obvious thing I dont understand or should that setting indeed give me a spline, 500cm above the original spline? Ok. Somehow there is a problem with uploading the files right now. Lets keep it theoretical 🙂 Anyone tried to use that node to get an offset in the Y direction? The outcome is, for a simple rectangle, that two points go upwards, and two points change the direction and they move downwards. Really don't know why ...
  22. Nice example! Funny how it works even with an Instance of the object. Could it be used for more variation with Instances even further? Thinking of selection tags / materials and different colors based on world / global position.
  23. import c4d doc: c4d.documents.BaseDocument # The document the object `op` is contained in. op: c4d.BaseObject # The Python generator object holding this code. hh: "PyCapsule" # A HierarchyHelp object, only defined when main is executed. def parse_string_to_list(input_string): elements = [] for part in input_string.split(','): if '-' in part: start, end = map(int, part.split('-')) elements.extend(range(start, end + 1)) else: elements.append(int(part)) return elements def filter_multiples_of_2(input_list): return [num for num in input_list if num % 2 == 0] def main() -> c4d.BaseObject: """Called by Cinema 4D to retrieve the cache of the Python Generator object. """ source = None source = op[c4d.ID_USERDATA,2] gapstring = op[c4d.ID_USERDATA,3] gap_unfiltered = [] gap_unfiltered = parse_string_to_list(gapstring) print (gap_unfiltered) gap = [] gap = filter_multiples_of_2(gap_unfiltered) print (gap) pointcount = source.GetPointCount() newpointcount = ((pointcount - 1) * 2) print ("Length of GAP: "+str(len(gap))) #newpointcount = newpointcount - (len(gap)*2) newspline = c4d.SplineObject(newpointcount,c4d.SPLINETYPE_LINEAR) newspline.ResizeObject(newpointcount, int((newpointcount/2))) activesegment = 0 for i in range(0, newpointcount-1, 2): print (i) if i in gap: activesegment = activesegment + 1 continue if activesegment == 0: print ("doing stuff") newspline.SetPoint(i, c4d.Vector(source.GetPoint(activesegment)[0], source.GetPoint(activesegment)[1], source.GetPoint(activesegment)[2])) newspline.SetPoint(i+1, c4d.Vector(source.GetPoint(activesegment+1)[0], source.GetPoint(activesegment)[1], source.GetPoint(activesegment+1)[2])) activesegment= activesegment + 1 continue if activesegment == int((newpointcount/2)-1): print ("doing stuff") newspline.SetPoint(i, c4d.Vector(source.GetPoint(activesegment)[0], source.GetPoint(activesegment)[1], source.GetPoint(activesegment)[2])) newspline.SetPoint(i+1, c4d.Vector(source.GetPoint(activesegment+1)[0], source.GetPoint(activesegment)[1], source.GetPoint(activesegment+1)[2])) activesegment = activesegment + 1 continue else: print ("doing stuff") newspline.SetPoint(i, c4d.Vector(source.GetPoint(activesegment)[0], source.GetPoint(activesegment)[1], source.GetPoint(activesegment)[2])) newspline.SetPoint(i+1, c4d.Vector(source.GetPoint(activesegment+1)[0], source.GetPoint(activesegment)[1], source.GetPoint(activesegment+1)[2])) activesegment = activesegment + 1 continue for i in range(activesegment): print ("Create Segment #" + str(i)) newspline.SetSegment(i,2,0) print (newspline.GetSegment(i)) listofpositions = [] #trying to delete the unused points at 0,0,0 for i in range(newspline.GetPointCount()): if newspline.GetPoint(i) == c4d.Vector(0,0,0): continue else: listofpositions.append(newspline.GetPoint(i)) print (listofpositions) print ("Old Point Count: " +str(newspline.GetPointCount())) newlynewpointcount = newspline.GetPointCount()-(len(gap)*2) newspline.ResizeObject(newlynewpointcount,int(newlynewpointcount/2)) print ("New Point Count: " + str(newlynewpointcount)) for i in range(newspline.GetPointCount()): print ("Set new position for " + str(i)) newspline.SetPoint(i,listofpositions[i]) c4d.EventAdd() return newspline Hi all! My current script - updated to work with creating only one new string and splitting the segments correctly, using a Link to the source spline so I don't have the problem with the original spline interfering with other generators afterwards and a 'ok'ish system do define gaps. While I'd say it is enough for my needs and even enough'er for my skills in scripting, I have a last question regarding the Link / Source object and its state. Everything works fine when the Spline is a Spline without deformer, but with deformer applied (for example the Projection deformer), the deformation will be ignored. I've read some stuff about geometry caches and that may be the problem, but if this is so: Here ends my kowledge, my skills and my chacne to add that 😄 Any idea? I somehow hope that I'm missing some simple parameter to get the object with the final state / cache in python? Thanks and wish you all a nice start of the week!
  24. Quite a big setup for a fence 😛 No! Looks impressive and a little bit overwhelming too. I'll have a look at the node setup for learning / research purpose, because on the first glance I saw the Link List node. Didn't know you can do that! But I guess the setup is a little bit too specific for that use-case only. The plain split-my-spline-into-straight-segments part would be enough, because the fence / wall / thing I'm building aftewards changes with every project. But thanks for your input! I'm always experimenting / extending / advancing my little script and if I'll every finish it I'll keep this thread updated! For now I was able to make the splitting into segments without creating X new spline objects for each segment. But now the rendering crashes ... I guess it needs some more work 😛
  25. Hi Smolak, thanks for your approach / setup to that problem. I tried your scene and while I'm still a little bit overwhelmed with all that stuff, some things I didn't even know they exist, I'm happy about the outcome. Even tried to use the Projection object and it still works fine. One thing that probably could be done inside expresso is the extension of the source spline. If I want to separate a segment and / or extend it a little bit I have to add the nodes manually inside the XPresso tag. But if it works it's worth the time! Being able to use the Projection object really is a bonus. Thank you! Now I'm off to check out what these purple splines are and why they make some gaps between the cubes 😄
×
×
  • Create New...