Something like Rope in DX11

hey there,

is there anything compararble to the Rope (DX9) in Dx11? Or did anybody build some module that does create a similar mesh/geometry?

thanks for any hint.

Easiest way is to send lines to a shader (LineStrip / GeometryBuffer with line topology / Null Geometry + DynamicBuffer).

From there you can pass trough in VS, then in GS you can extrude your line to a quad.

Alternatively you can check the Line module/shader in girlpower that uses grid/texture combination.

Should have some example for GS way, will post if I find it.

i’m not really firm yet in dx11 shader coding, so those example would be great help.

okay, i now wrote a little plugin that creates vertices for a triangle strip (no shader code, just a plugin to create coordinates for a triangle strip).

everything works good so far, only one issue remains: how to apply texture coordinates to these vertices?

any help is appreciated!
thanks

triangleRope.01.7z (8.1 kB)

well, i’m getting there.

the plugin now creates generic coordinates for a triangle strip that can be used very similarly like the tube2d(mesh).

can be used with DX11 (via IndexedGeometryBuffer) and EX9 (via Mesh). Texture coordinates are there as well.

Please test and give feedback. If you approve I’ll add it as a contribution or to the addonpack.

rope2d.7z (19.4 kB)

@motzi would be good to have it in the core dx11 repo. I think you should make a pull request.

wouldn’t it make more sense to add the plugin (rope(2d)) to the addonpack and a module containing the plugin and the dx11 related stuff to the dx11 core repo?

@motzi: yes, good thinking. and also an ex9 module for the addonpack