I asked GPT to write some VEX and OpenCL code

   3995   13   2
User Avatar
Member
4642 posts
Joined: 2月 2012
Offline
No excuse not to learn VEX now





Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
136 posts
Joined: 3月 2016
Offline
Very interesting - So as a grand master of VEX etc... how does it look? Sorry you'll have to excuse my ignorance on the GPT-3 deep/machine learning stuff, but did it give you fully working code with comments out the box?
Edited by Hatchery - 2022年12月5日 07:17:14
Love Houdini
User Avatar
Member
4642 posts
Joined: 2月 2012
Offline
Hatchery
Very interesting - So as a grand master of VEX etc... how does it look? Sorry you'll have to excuse my ignorance on the GPT-3 deep/machine learning stuff, but did it give you fully working code with comments out the box?

Depending on what you ask, it ranges from gibberish to realistic code with some missing functions, syntax errors and bugs. If you confront the AI about these specifically, you can get something better incrementally that could be used as a base for some code. But that requires expertise in said languages and algorithms to be able to reach better results.

Still pretty impressive stuff.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
275 posts
Joined: 9月 2012
Offline
Have seen amazing GPT3 example and this one is not failing to impress me!

How does GPT3 know the houdini PcOpen() func? And was it learn to code in VEX?
Im confused.. i don't see you define the target and description anywhere in your request...
I have tryed with Python code generation, but i didn't thought we are already to a smaller granularity, so it could code in VEX too..?
Edited by vinyvince - 2022年12月5日 13:45:06
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
4642 posts
Joined: 2月 2012
Offline
vinyvince
Have seen amazing GPT3 example and this one is not failing to impress me!

How does GPT3 know the houdini PcOpen() func? And was it learn to code in VEX?
Im confused.. i don't see you define the target and description anywhere in your request...
I have tryed with Python code generation, but i didn't thought we are already to a smaller granularity, so it could code in VEX too..?

I assume from github and other source code websites. It even knows the HDK. It's probably a better combined Houdini coder than most people

Here is a more complete pcopen implementation in OCL:
https://paste.ofcode.org/383TVkZas4zcQ5QXeqEMYCM [paste.ofcode.org]

I didn't compile it.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
275 posts
Joined: 9月 2012
Offline
It's very curious to see that if i ask the same request, word for word, i get a totally different answer from him! Lol

Attachments:
GPT.PNG (49.9 KB)

Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
4642 posts
Joined: 2月 2012
Offline
Yes it's never the same just like txt to image AI generators.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
275 posts
Joined: 9月 2012
Offline
Still very strange way to find the intersection of 2 vectors.. Maybe that's just my maths who are too obsolete to understand, i don't know
but vector r/dot(r,r) looks a but curious to me. Maybe it has changed , everything is possible with IA afterall , even changing rules of math, bu division by zero was not a recommended pratice
Edited by vinyvince - 2022年12月6日 06:26:15

Attachments:
GPT.PNG (37.6 KB)

Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
166 posts
Joined: 3月 2014
Offline
I asked it for a simple VEX script yesterday that looked fine but had a strange and incorrect way of passing parameters into the rotate function that threw an error.

Still, it's quite impressive that it can do VEX at all. It's much better with more popular languages.

It's also great for research purposes. I asked it, given two 3d positions on a sphere, how to calculate their distance when moving from one point to the other along the sphere's surface. It gave me a very in-depth explanation of the required equations, all neatly formatted and arranged.
User Avatar
Member
4642 posts
Joined: 2月 2012
Offline
Digipiction
I asked it for a simple VEX script yesterday that looked fine but had a strange and incorrect way of passing parameters into the rotate function that threw an error.

Still, it's quite impressive that it can do VEX at all. It's much better with more popular languages.

It's also great for research purposes. I asked it, given two 3d positions on a sphere, how to calculate their distance when moving from one point to the other along the sphere's surface. It gave me a very in-depth explanation of the required equations, all neatly formatted and arranged.

Agreed. It can be used for research purposes as a starting point. Imagine in the future it could even make an OTL for you, though that's very specific to Houdini, I wouldn't be surprised if that happens.

The companies that own these tech will make so much money per query and possibly it will show how much a particular query will cost beforehand.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
166 posts
Joined: 3月 2014
Offline
vinyvince
but vector r/dot(r,r) looks a but curious to me. Maybe it has changed , everything is possible with IA afterall , even changing rules of math, bu division by zero was not a recommended pratice
r/dot(r,r) is not a division by zero though?
User Avatar
Member
166 posts
Joined: 3月 2014
Offline
animatrix_
Imagine in the future it could even make an OTL for you, though that's very specific to Houdini, I wouldn't be surprised if that happens.
Seeing how quickly these things are evolving it's not hard to imagine for this to happen at some point in the not-too-distant future. Clearly, the big goal is to make a generalized AI that can be taught all kinds of things.

The way you can already interact with this new GPT (you can ask it to make corrections and changes and refer to things that previously came up in the "conversation") feels quite insane and is way beyond anything I thought possible two years ago.
User Avatar
Member
313 posts
Joined: 10月 2016
Offline
Not so convinced about this for a couple of reasons.

1. GPT read whatever the owners feed it, and there has to be a lot of material for the AI to make generalisations and ”predictions”. That leads to problems:
1.1. Is that code valid at all in the first place?
1.2. In a specialized field like VFX languages there are probably not that many experts who share their code
1.3. For those who do share code examples there will be a risk of plagiarism or copyright issues. I’d bet that the original authors could recognize their own ideas here and there.

On the contrary, where there are a lot of shared code for the AI to excel there will not be such a need for it anyway, right?

Just another opinion.

Edit: I've not digged deep into GPT, just read about it briefly. If GPT or any other AI can mimic human style problem solving of challenges that are not already solved, then it is a scary thing. Computer systems are already far superior to human ability when measuring in terms of speed, quantity of data, and exactness.
Edited by SWest - 2022年12月6日 15:40:21
Interested in character concepts, modeling, rigging, and animation. Related tool dev with Py and VEX.
User Avatar
Member
275 posts
Joined: 9月 2012
Offline
Digipiction
vinyvince
but vector r/dot(r,r) looks a but curious to me. Maybe it has changed , everything is possible with IA afterall , even changing rules of math, bu division by zero was not a recommended pratice
r/dot(r,r) is not a division by zero though?

You offcourse totally right, don't even know where my head was at this moment, shame on me! :P
GPT 3 at the moment is probably better to write functions library, doesn't seem to understand point wrangle is already a loop per point.

IA wil certainely help to convert cube of logics between different language system, like converting shader toy or processing code with already some base to start on. IT's very easy to loose your mind in all the possibility and totally forget your first goal

Im wondering until when the service will be available for free...
Edited by vinyvince - 2022年12月6日 15:41:29
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
  • Quick Links