carving sequentially?

   1556   11   2
User Avatar
Member
22 posts
Joined: Aug. 2020
Offline
Hey,

So I've built a DNA strand by using the helix node with two strands. The connecting lines were created by sorting the points of the helix by y, and then using the add node to connect them up.

Each one of those lines is a separate prim, but I'm wondering how I could carve them so that they carve on fully, one line at a time from the bottom upwards? Currently if I was to use the carve node on those connected lines, they would carve on all at the same time?

Side question: is it because I'm using the add node that I'm having these issues? Would it be better to connect them a different way, like using a line copied onto the points?

Any help would be appreciated!
Edited by sarahjenkins - Nov. 14, 2023 02:16:56
User Avatar
Member
679 posts
Joined: Feb. 2017
Offline
I think there is no out of the box solution. I recommend this carve hda as it uses the curve length and not a 0-1 range like the
default carve: https://www.orbolt.com/asset/ynkr::curvecarve
You can use an edge transport node to calculate the total distance of your curves from a selected start point. feed that distance into the ynkr carvenode and it should work quite well. Let me know if you have any troubles.

Cheers
CYTE
User Avatar
Member
238 posts
Joined: Nov. 2013
Offline
you could run vex over every prim with this neat little code snippet:
#include <groom.h>

float dist = chf("dist");

adjustPrimLength(0, @primnum, @perimeter, @perimeter*dist);

you need to calculate the perimeter before hand with a measure sop
http://www.sekowfx.com [www.sekowfx.com]
User Avatar
Member
22 posts
Joined: Aug. 2020
Offline
sekow
you could run vex over every prim with this neat little code snippet:
#include <groom.h>

float dist = chf("dist");

adjustPrimLength(0, @primnum, @perimeter, @perimeter*dist);

you need to calculate the perimeter before hand with a measure sop

Hey, thanks for this! It still "carves" them at the same time though, unless I'm doing something wrong (which is likely the case!)
User Avatar
Member
238 posts
Joined: Nov. 2013
Offline
sarahjenkins
sekow
you could run vex over every prim with this neat little code snippet:
#include <groom.h>

float dist = chf("dist");

adjustPrimLength(0, @primnum, @perimeter, @perimeter*dist);

you need to calculate the perimeter before hand with a measure sop

Hey, thanks for this! It still "carves" them at the same time though, unless I'm doing something wrong (which is likely the case!)

have a look at the hip


#include <groom.h>
float ratio = float(@primnum)/(nprimitives(0)-1);
      ratio -= 1;
float dist = clamp((chf("dist")*2)+ratio,0,1);

adjustPrimLength(0, @primnum, @perimeter, @perimeter*dist);
Edited by sekow - Nov. 14, 2023 03:55:53

Attachments:
sequential_carve.hip (165.0 KB)

http://www.sekowfx.com [www.sekowfx.com]
User Avatar
Member
22 posts
Joined: Aug. 2020
Offline
sekow
sarahjenkins
sekow
you could run vex over every prim with this neat little code snippet:
#include <groom.h>

float dist = chf("dist");

adjustPrimLength(0, @primnum, @perimeter, @perimeter*dist);

you need to calculate the perimeter before hand with a measure sop

Hey, thanks for this! It still "carves" them at the same time though, unless I'm doing something wrong (which is likely the case!)

have a look at the hip


#include <groom.h>
float ratio = float(@primnum)/(nprimitives(0)-1);
      ratio -= 1;
float dist = clamp((chf("dist")*2)+ratio,0,1);

adjustPrimLength(0, @primnum, @perimeter, @perimeter*dist);

This is amazing! Now one last question seeing as you seem about 500 levels smarter than myself - is there a way to carve them from the outside in from both ends (each respective line, that is) so that they meet in the middle per line?
User Avatar
Member
22 posts
Joined: Aug. 2020
Offline
CYTE
I think there is no out of the box solution. I recommend this carve hda as it uses the curve length and not a 0-1 range like the
default carve: https://www.orbolt.com/asset/ynkr::curvecarve
You can use an edge transport node to calculate the total distance of your curves from a selected start point. feed that distance into the ynkr carvenode and it should work quite well. Let me know if you have any troubles.

Cheers
CYTE
Cheers for this too, btw! Will give this a go later too
User Avatar
Member
679 posts
Joined: Feb. 2017
Offline
You will need the edge transport. Make sure to fuse your points first and set the edge transports mode to edge network. Otherwise, you can't decide which primitive to carve when. Even when using sekow method.
You can either use the hda I linked or the adjustPrimLength function.
User Avatar
Member
22 posts
Joined: Aug. 2020
Offline
CYTE
You will need the edge transport. Make sure to fuse your points first and set the edge transports mode to edge network. Otherwise, you can't decide which primitive to carve when. Even when using sekow method.
You can either use the hda I linked or the adjustPrimLength function.
Attaching my hip, because I'm clearly using the HDA incorrectly!

The ideal outcome is that each line carves on (from the ends of the line towards the middle), but sequentially going upwards. It doesn't necessarily have to be 'this line is done fully, now the next one starts' but that would be great if possible. My brain just isn't getting it at all

Attachments:
curve_carev.hip (158.0 KB)

User Avatar
Member
242 posts
Joined: Jan. 2008
Offline
sekow
you could run vex over every prim with this neat little code snippet:
#include <groom.h>

float dist = chf("dist");

adjustPrimLength(0, @primnum, @perimeter, @perimeter*dist);

you need to calculate the perimeter before hand with a measure sop

fyi, a hidden gem in h20.
The carve node is updated to be able to carve by attribute.
User Avatar
Member
238 posts
Joined: Nov. 2013
Offline
mawi
sekow
you could run vex over every prim with this neat little code snippet:
#include <groom.h>

float dist = chf("dist");

adjustPrimLength(0, @primnum, @perimeter, @perimeter*dist);

you need to calculate the perimeter before hand with a measure sop

fyi, a hidden gem in h20.
The carve node is updated to be able to carve by attribute.

nice.. thanks for the hint!

this makes things easier, here ya go:
Edited by sekow - Nov. 14, 2023 05:27:31

Attachments:
curve_carve_h20.hip (194.2 KB)

http://www.sekowfx.com [www.sekowfx.com]
User Avatar
Member
679 posts
Joined: Feb. 2017
Offline
I doubt that it can be done in one wrangle, so my scene ended up a little bit more complex.
I still use the https://www.orbolt.com/asset/ynkr::curvecarve node as I prefer its constant carving speed.
The new H20 carve by attribute is great, but still, the carving speed is dependent on the curve length.
So if you want to try my setup you need the linked hda.

Cheers
CYTE

Attachments:
curve_carve_v002.hip (228.3 KB)

  • Quick Links