Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

Connect arbitrary points with tube in vertex shader

General discussion about anything TouchDesigner

Connect arbitrary points with tube in vertex shader

Postby sm87 » Fri Jul 12, 2019 6:38 am

Hi All!
I'm trying to use a vertex shader to connect 2 arbitrary points.. i know it's very simple but i can't get it working! :(
Any suggestion?
Thank you very much!!!!
Attachments
Tube.7.toe
(7.36 KiB) Downloaded 38 times
sm87
 
Posts: 7
Joined: Mon Jul 24, 2017 4:21 am

Re: Connect arbitrary points with tube in vertex shader

Postby barakooda » Fri Jul 12, 2019 1:33 pm

partial solution.
seem like the full one will have to involve geometry shader.
Hope it helps.
Attachments
two_points_example.toe
(8.49 KiB) Downloaded 37 times
User avatar
barakooda
 
Posts: 651
Joined: Fri Nov 27, 2009 5:08 pm

Re: Connect arbitrary points with tube in vertex shader

Postby jacqueshoepffner » Sat Jul 13, 2019 4:32 am

Hello,
I propose another solution, using Add SOP, and forming polygone, you obtain lines.
Concerning Geometry shader I think its not the easiest solution, because you need points on the same polygon as to be able to make a line in geometry shader, but you have yet the line, or you can enter the coordinates separately though uniform and use static instanced points. Thats work well but I dont know if its what you want. I can prepare a little example showing hom to do. But you will be limited to very simple lines, no reflections, no shadows.
Attachments
lignesPoints.toe
(5.42 KiB) Downloaded 34 times
Jacques Hoepffner
visual artist, programmer
Isadora, Processing, Unity 3D, TouchDesigner
jacqueshoepffner
 
Posts: 132
Joined: Fri Dec 23, 2016 4:59 pm
Location: Paris (France)

Re: Connect arbitrary points with tube in vertex shader

Postby jacqueshoepffner » Sat Jul 13, 2019 6:09 am

A quick test with geometry shader.
A made two propositions, one using transform as to do a 3D drawing, another with direst position obtaining a 2D drawing. You can see the difference moving the camera.
No tube with this technic, I use glsl mat Wire Frame to obtain a thick line but no lightning.
I hope the description is clear, there is comments in the glsl.
Jacques
Attachments
lignesPointsGeometry.toe
(4.85 KiB) Downloaded 47 times
Jacques Hoepffner
visual artist, programmer
Isadora, Processing, Unity 3D, TouchDesigner
jacqueshoepffner
 
Posts: 132
Joined: Fri Dec 23, 2016 4:59 pm
Location: Paris (France)

Re: Connect arbitrary points with tube in vertex shader

Postby sm87 » Sat Jul 13, 2019 12:28 pm

Thank you very much to all for the answers!!!! Very helpful, i learned a lot!!! Thanks!!!
sm87
 
Posts: 7
Joined: Mon Jul 24, 2017 4:21 am


Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: No registered users and 13 guests