3
$\begingroup$

With geometry nodes I would like to convert spline into mesh in a way, where result mesh (tube) profile resolution is based on the main spline factor. Like for example on start of the spline (factor 0) with resolution 4 and on the end (factor 1) with resolution 12. Is it possible?

I have tried to use resample curve operation to be somehow affected by the main spline factor, but it never worked for me. enter image description here enter image description here enter image description here

$\endgroup$
4
  • $\begingroup$ I don’t expect this to be able to work, but it’s still worth a try I guess. $\endgroup$
    – TheLabCat
    Jun 9, 2023 at 13:30
  • $\begingroup$ Do you want sudden changes 4→8→12, or do you want it to go 4→5→6→7→8→9→10→11→12? $\endgroup$ Jun 9, 2023 at 13:33
  • $\begingroup$ I want it to go gradually 4-5-6-+ $\endgroup$
    – skywalger
    Jun 9, 2023 at 13:44
  • $\begingroup$ Generally I want to create tree trunk and branches, which have less resolution as they grow, as the mesh needs to be optimized to run in-game. There is also second question to that, which I ll probably ask as another post (variable density of curve segments (cuts) based on it's own factor). This all is possible in SpeedTree software and I would like to achieve it here too. $\endgroup$
    – skywalger
    Jun 9, 2023 at 13:52

1 Answer 1

1
$\begingroup$

OK, I'll start:

This move vertices to one point, the earlier in curve the more vertices. Then it merges them. It changes the shape of the spline:

The next step could be a calculation by perhaps aligning euler to curve tangent (captured just like the factor is captured above), plus aligning it to curve normal - like I aligned the caps here:

Then you could sample the beveling curve.

I didn't do it however, because that's not the way to go. The way to go is to select some points, and move them towards the next point. This brings two problems:

How do you select the points? One method would be to apply a ping-pong on the beveling curve (circle) factor and see if it's above a threshold. This probably shouldn't be a ping pong, more like multidimensional ping-pongs:

010101010101010101010101010101010101
111000111000111000111000111000111000
111111111000000000111111110000000000

Summing those ping-pongs you should get a value and check if the current factor is more or less than that (normalized) value.

Second question is how to figure out where to move the point, but I guess by transforming the formula used to generate that ping-pong, to calculate the distance to a value below the threshold, and sampling that factor to get the index...

Would the effect be better than merge-by-distance, remeshing or decimate modifier? I doubt it, that's why I'm not really motivated to finish this answer 🤪

$\endgroup$
3
  • $\begingroup$ Thx for trying! Obviously I am no geometry nodes guru, but to me it looks like geometry nodes framework is not ready for this task. Yet this feature is present in all better tree procedural generators. So I kind of hoped it is gonna be doable here :/ . $\endgroup$
    – skywalger
    Jun 9, 2023 at 16:10
  • $\begingroup$ Oh it's definitely doable, but I don't really see a point. Do you know the decimate modifier? $\endgroup$ Jun 9, 2023 at 16:20
  • $\begingroup$ I added 2 new pictures that illustrates what I need. One from "Tree It" software and one that I just quickly done manually in Blender. Decimate modifier can't be used...it creates too messy topology with also kind of randomly/partially removed edge loops. Edge loops removal should be controlled separately. $\endgroup$
    – skywalger
    Jun 9, 2023 at 16:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .