Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

GLSL: Vertex shaders/vertexshaderart.com port

Still a little green? Ask your beginner's questions here

GLSL: Vertex shaders/vertexshaderart.com port

Postby cubanb95@gmail.com » Wed Jun 27, 2018 11:46 pm

Has anyone tried to port shaders over from vertexshaderart.com? I have been attempting to port any of the shaders found there with no luck. Im thinking its because these shaders are built mainly to run as vertex shaders and not pixel shaders like I am used to. I have gotten things working from shadertoy and glsl_sandbox in TD but Im still having some trouble with these guys.

I was trying to port this shader over:https://www.vertexshaderart.com/art/T3o69kd5wMtWNCj5k


any help would be appreciated
cubanb95@gmail.com
 
Posts: 34
Joined: Mon Jun 06, 2016 9:27 pm

Re: GLSL: Vertex shaders/vertexshaderart.com port

Postby timgerritsen » Thu Jun 28, 2018 7:45 am

Hi there,

yeah it looks like those are only a vertex shader and generating a 'v_color' that is used to render a 'particle'.
To make this work in touchdesigner, you need to create some vertices (f.e. line SOP -> convert SOP to particles). Then create a new material (f.e. phong MAT -> export) and supply the code to the vertex shader. Though there are some stuff you need to update.
Thinks like 'resolution', 'time', 'vertexId' and 'vertexCount' are variables that are predefined on vertexshaderart.com, so you will need to create some uniforms to be able to access them.

Perhaps it sounds a bit complicated, so I added a quick version, so you can take that as an example. Hope it helps.

Cheers,
tim
Attachments
VertexArtShader.tox
(2.72 KiB) Downloaded 91 times
timgerritsen
 
Posts: 59
Joined: Sun Jan 24, 2016 6:57 am

Re: GLSL: Vertex shaders/vertexshaderart.com port

Postby cubanb95@gmail.com » Thu Jun 28, 2018 12:13 pm

Tim,

Thanks for your reply that helps alot actually! Based on your TOX I was able to get another shader working. Next I will try out getting the sound going but this was a huge help!
cubanb95@gmail.com
 
Posts: 34
Joined: Mon Jun 06, 2016 9:27 pm

Re: GLSL: Vertex shaders/vertexshaderart.com port

Postby cubanb95@gmail.com » Thu Jun 28, 2018 1:03 pm

I did have one question though @Tim, how would I know what the correct vertex shader syntax for TD? I see you added

out Vertex
{
vec4 color;
} oVert;


to the beginning and changed v_color to oVert.color at the end.
cubanb95@gmail.com
 
Posts: 34
Joined: Mon Jun 06, 2016 9:27 pm

Re: GLSL: Vertex shaders/vertexshaderart.com port

Postby timgerritsen » Thu Jun 28, 2018 4:45 pm

we talked about it on slack, but will post it here as well in case somebody else is reading this :)

I exported a normal phong mat and took that as basis. Since the vertexshaderart shaders only render vertices as pointsprites using their vertex color, I stripped away all unnecessary attributes ending up with only the color.
timgerritsen
 
Posts: 59
Joined: Sun Jan 24, 2016 6:57 am

Re: GLSL: Vertex shaders/vertexshaderart.com port

Postby atu » Sat Jan 12, 2019 5:14 am

Excuse me
How to handle soundcloud data used by vertexshaderart.com with touchdesigner?
Please tell me only hints.
atu
 
Posts: 2
Joined: Sun Apr 24, 2016 11:46 am

Re: GLSL: Vertex shaders/vertexshaderart.com port

Postby bwanajh » Sun Jan 13, 2019 2:18 pm

https://help.soundcloud.com/hc/en-us/ar ... ed-players

From the examples I've seen, these visuals are not audio reactive, there is just audio embedded behind them. You would embed tracks in a simliar way in your own website using Soundcloud's method's linked above.

If you wanted to get isolated Soundcloud audio into your TouchDesigner project you would have to use something like Dante Via to isolate audio from seperate software, or less preferably, use the stereo mix option in an audiodevicein and ensure no other sound sources are being played.

It also would be possible to use the WebBrowser Comp, make sure you use the setting page to include audio, but this method would only give you sound, not chopAudio ie no access to convert Audio into data.
bwanajh
 
Posts: 147
Joined: Sun Apr 12, 2015 9:40 pm
Location: Manitoulin

Re: GLSL: Vertex shaders/vertexshaderart.com port

Postby atu » Tue Jan 15, 2019 9:34 am

Excuse me.
I do not want to use soundcloud.

I want to handle sound data.
Can I get data from Arrays of GLSL MAT?

I do not know whether to obtain sound data from samplers.

I'm sorry but could you teach me?
atu
 
Posts: 2
Joined: Sun Apr 24, 2016 11:46 am


Return to Beginners

Who is online

Users browsing this forum: silvitdokl and 5 guests