SplinesGPU and (spreading) colors

So, I’m playing with woei’s SplinesGPU, the awesome contribution that comes with this picture:

(edit: it doesn’t want to. hm. splinesgpu )

and… it’s teasing me, because: how? How do I give the splines individual colours, when they are not individually processed like in a phongdirectional, for instance and are not accepting spreaded inputs? I’m up for messing with code if that’s what it takes, but… does it?

messing with the code is what’s needed.
just didn’t have the time to implement it in a publishable way for the whole pack.
sry, might take a while since update will include some more stuff.

I implemented spreadable color and also support gradients by now - https://github.com/smakhtin/ParticlesGPU-Modular/tree/splinesGPU . Currently the code is a little bit unclear, but should work.

@woei - if you want, i can move splinesGPU to submodule and make pull request to your repo. Currently i moved all code to one repo because 1) don’t saw your repo on github, 2) Planned to modify splines for particles support, but currently using another shader for generating splines coordinates.

Woei, Thanks for the reply. And no sweat. I’m just fooling around trying to do/learn stuff. (Whereas my “up for messing with code” was a bit bold, to say the least;) But good to know that something’s coming up!

alg… I clicked through it for a bit, and while I saw that I can have spreaded colors through the Color From Texture (?), I’m losing the material. Will try it out in my patch in question anyways, but is there anything I’m missing, maybe?

Anyways, thanks guys!
(‘resolved’, for now)

Yes, you need to pass a texture to shader, where every pixel is color for line. Currently this technique is disabling the Phong shading (just check the code). If you want, i can add a option, to multiply color from texture to phong color, or make it by default.

If you’re up for it, I will not hold you back :)
(seriously, this would be supercool, also for me to study the ‘how’ of it)

in the meantime…
I hacked this together for the B-SplineCubic. There is a pin PP Color Texture which you can feed with a dynamic texture which has the desired colors in the column.

B-SplineCubicPhongDirectionalGPIColor.fx (4.5 kB)

in the meantime after your meantime…

Exactly. Perfection :) Very nice & thanks!