The Line (EX9.Geometry) kind of line in a shader?

hello dear vvvvorum

for the project im working on, i really like the Line (EX9.Geometry) node. mostly because the (fixed) width of the line i get is camera and perspective independent. also, when i zoom out, the line never gets fuzzy. i suppose its the same kind of line that is drawn when i switch the fillmode of a geometry to wireframe.

so my idea is to draw an extensive amount of lines with a method @woei does it with SplinesGPU (basically writing the positions into a texture). The latter is an amazing package, but exactly for the reasons i mentioned above, it doesnt exactly suit my needs.
so…
I thought of the of changing the mesh via the vertexbuffer and set the fillmode to WireFrame, but then, what do i do with the indicies for the triangulation? If I got that right, the line in this mode is not a mesh itself, right?
and also i guess there will be quite a tradeoff since WireFrame is very expensive.

so is there a way to address this kind of line in a shader?^

best and many thanks.
aivenhoe

I’m no shader man, but have a look at ParticlesGPU_Spline3D_ScreenSize from Dottore’s Particle Library.

I think that is exactly what you are after.

very true. looks promising.
thanks a million.

one of the big issues for this in vvvv is that you can’t specify between the full set of draw styles in VVVV, e.g.

  • Points (supported)
  • Line
  • Line loop
  • Triangles (supported as both filled and wireframe)
  • Triangle strip
  • Quads

in particular i’d really like to see lines implemented.
this is of course possible inside a custom node, but it’d be good if the mesh itself can define its own connection style (or other way of working wit conventional shader model in vvvv, e.g. FillStyle)

hello again.
@everyoneishappy: thank you. ParticlesGPU_Spline3D_ScreenSize works pretty well for my purposes and it has the advantage that i can change the width of the line, even for each segment. but i’m still curious.

@elliotwoods. if we would have the draw style “Line” would this be just the “line”-like connection between a set of points?

so would it be possible to implement this referred kind of line (I don’t know how to call it, sorry. I’ve read its the “ID3DXLine”, but i’m not sure about this either) in a shader?
or is this a limitation of vvvv (e.g. that i can’t work with this ID3DXLine in a shader)?
I hope for some enlightenment…

elliot is talking about primitive types that can not be chosen on effect nodes but one can use them of course when writing their own plugin using slimdx.

Line (EX9.Geometry) is based on the ID3DXLine (with all its problems) which has nothing to do with a primitive type or a shader.

hu? say this, one can replace the shader editor with a plugin containing a shader editor? perhaps that’ll broaden our horizon.

and you wouldn’t even the first one to go this route…basically it is all there…

hm, you talk about elliots opengl nodes? or are there other things around?

perhaps these roadmap things will be a good topic for the next irc-monday…

@ sebl
Have you seen that demoscene-youtube-video feat. @unc?
I thought they´ve somehow “modded” the editor (see 8:05 min).

Maybe even with autocompile?

@bjoern
Good catch. @unc really inspirational documentation/work.

Came here on the search for howto do lines on the gpu, now I have the urge to play around with pixelshaders ;)