Welcome to WSL!

New to the forum? Please read this and this.

Jellyshell  [SUBMITTED]

Moderator: SecondMan

User avatar
JiiPii
Fusioneer
Posts: 169
Joined: Tue Mar 03, 2020 8:34 am
Answers: 1
Been thanked: 9 times

Jellyshell

#1

Post by JiiPii »

This is a converted Shadertoy https://www.shadertoy.com/view/3sjSDw

A colorful Jellyshell that spits out drops and catches them again. All three axes can be animated.
I've added a lot (maybe too many) parameters. So you can change the color, shape and movement of the jelly shell very strongly.

Without image input, a white background appears as in the original. Alpha can be set for further use, then the background is switched to black. The resolution is adapted to the image input.

See also my post in WSL "/Projects and Development/We suck less Lab:
https://www.steakunderwater.com/wesuckl ... 464#p34674
A short Youtube Preview:



com.JiPi.Jellyshell.zip
You do not have the required permissions to view the files attached to this post.

User avatar
SecondMan
Site Admin
Posts: 4825
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 31
Location: Vancouver, Canada
Been thanked: 31 times
Contact:

Re: Jellyshell

#2

Post by SecondMan »

Wonderful! Submitted and available in Reactor now :cheer:

Please check if all works as intended.

Thanks!

User avatar
intelligent machine
Fusionista
Posts: 706
Joined: Fri May 13, 2016 10:01 pm
Answers: 7
Location: Austin, Texas, USA
Real name: Sam Treadway
Been thanked: 9 times
Contact:

Re: Jellyshell

#3

Post by intelligent machine »

This isn't working for me.
MacOS 11.0.1 Big Sur
Fusion 16/17

Here's the console output:

Failed to load metal library.
Metal Error Code: 3 Domain: MTLLibraryErrorDomain
Metal Error Message: Compilation failed:

program_source:1614:19: error: pointer type must have explicit address space qualifier
__DEVICE__ float3 *rotationXY( float2 angle ) { // mat3
^
program_source:1626:10: warning: address of stack memory associated with local variable 'ret' returned
return ret;
^~~
program_source:1657:19: error: pointer type must have explicit address space qualifier
__DEVICE__ float3 *calcLookAtMatrix( float3 ro, float3 ta, float roll ) // mat3
^
program_source:1670:12: warning: address of stack memory associated with local variable 'ret' returned
return ret;
^~~
program_source:1673:34: error: pointer type must have explicit address space qualifier
__DEVICE__ float3 MatMul( float3 *mat, float3 vec)
^
program_source:1726:10: error: pointer type must have explicit address space qualifier
float3 *camMat = calcLookAtMatrix( ro, ta, 0.0f); // 0.0 is the camera roll
^
program_source:1740:10: error: pointer type must have explicit address space qualifier
float3 *rot = rotationXY( ( iMouse - iResolution * 0.5f ) * to_float2( 0.01f, -0.01f ) ); //iMouse!!
^


Jellyshell1 failed at time 0

User avatar
Movalex
Sir Requestalot
Posts: 293
Joined: Fri Nov 03, 2017 5:36 am
Answers: 4
Real name: Alexey Bogomolov
Been thanked: 6 times
Contact:

Re: Jellyshell

#4

Post by Movalex »

Same here. I bet this will work only with Cuda GPU, not for Metal

User avatar
intelligent machine
Fusionista
Posts: 706
Joined: Fri May 13, 2016 10:01 pm
Answers: 7
Location: Austin, Texas, USA
Real name: Sam Treadway
Been thanked: 9 times
Contact:

Re: Jellyshell

#5

Post by intelligent machine »

Should there be a standard set at some point and then going forward for all new Reactor submissions with GPU code to be written in DCTL and tested on all platforms?

User avatar
SecondMan
Site Admin
Posts: 4825
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 31
Location: Vancouver, Canada
Been thanked: 31 times
Contact:

Re: Jellyshell

#6

Post by SecondMan »

I don't think that's sustainable. Not everyone has access to all platforms all the time (I know I don't). Also, I often seem to notice that tools don't really get tested until after they appear on Reactor, so that's a bit of a catch-22.

What would be nice is if it's discovered that a tool only works on one platform, that the package is then limited to that platform in Reactor. Bit of Atom maintenance but not too too hard.

User avatar
Shem Namo
Fusionista
Posts: 657
Joined: Sun Oct 06, 2019 9:15 pm
Answers: 1
Location: North Israel
Real name: David Kohen
Been thanked: 2 times

Re: Jellyshell

#7

Post by Shem Namo »

SecondMan wrote: Tue Dec 08, 2020 8:37 pm What would be nice is if it's discovered that a tool only works on one platform, that the package is then limited to that platform in Reactor. Bit of Atom maintenance but not too too hard.
I understand the concern @SecondMan, but I think that limiting the atom to a certain platform isn't the way to go for this.
Fixing these kind of GPU platform related errors in DCTL is relatively easy.

And most of the time you don't need to test on all three plaforms(OpenCL, CUDA and Metal).
You just need to test on OpenCL and CUDA. If a DCTL fuse runs perfectly on OpenCL, it will most likely work fine on Metal too, but not Visa-Versa.

I think a better solution is to have to pass a compatibility test in the DEV topic, whoever has the time can confirm that the tool runs on their platform.
Once a tool has been confirmed to run on all three platforms, it can be submitted.
But this is just an idea.

It's worth mentioning that the original fuse worked perfectly, it didn't even have a single error. Just paste and play. :)
But, I didn't have the time to try out the fuse after @JiiPii added more features too it.

I'll test it now and try to see what's causing this.

Thanks,
David

User avatar
JiiPii
Fusioneer
Posts: 169
Joined: Tue Mar 03, 2020 8:34 am
Answers: 1
Been thanked: 9 times

Re: Jellyshell

#8

Post by JiiPii »

Unfortunately I have no way of testing the fuse under metal. I googled after the error and obviously you have to specify a different address space for metal that is readable and writable. For OpenCL and Cuda the address identifier is __DEVICE__. For metal, "device" is provided for this. __GLOBAL__ should be used in DR. But this would have to be tested.

Many greetings

Gerald

User avatar
intelligent machine
Fusionista
Posts: 706
Joined: Fri May 13, 2016 10:01 pm
Answers: 7
Location: Austin, Texas, USA
Real name: Sam Treadway
Been thanked: 9 times
Contact:

Re: Jellyshell

#9

Post by intelligent machine »

I fiddled with it for a bit with my limited knowledge of DCTL - Anyone who has access to good documentation for this OR would like to share their knowledge after spending much time dabbling in DCTL land in the form of documentation (looking at you @Shem Namo ;) ) in a certain forum topic, that would be super awesome!

What I found while trying to troubleshoot the errors for a brief moment is that there are a number of float3 that contain nested sets of float3 (like matrices) and this seems to be incompatible. Perhaps float3x3 will work but I haven't tested.

User avatar
SecondMan
Site Admin
Posts: 4825
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 31
Location: Vancouver, Canada
Been thanked: 31 times
Contact:

Re: Jellyshell

#10

Post by SecondMan »

Shem Namo wrote: Tue Dec 08, 2020 11:13 pmOpenCL, CUDA and Metal
Ah, I misunderstood the platforms being referred to. I though we were talking Win/Mac/Linux.

But regardless, that was just my side note. What I actually said was what I have said before (remember Vibrance?), that I am not the Tool Police™. I don't feel it's my (or WSL's) responsibility to micromanage other people's developments and set a high bar regarding standards. Sure, I'll offer guidance and voice my opinion when and if I feel that's appropriate but it's not (ever going to be) a hard rule or a test you need to pass. I'm also not always right either :)

If the community takes such a thing on board, when people like yourself keep a friendly eye on various developments and volunteer testing and standards grow organically that way, that would be different. But look:
Shem Namo wrote: Tue Dec 08, 2020 11:13 pmI didn't have the time to try out the fuse
and so it begins :)

User avatar
Shem Namo
Fusionista
Posts: 657
Joined: Sun Oct 06, 2019 9:15 pm
Answers: 1
Location: North Israel
Real name: David Kohen
Been thanked: 2 times

Re: Jellyshell

#11

Post by Shem Namo »

intelligent machine wrote: Wed Dec 09, 2020 7:54 am I fiddled with it for a bit with my limited knowledge of DCTL - Anyone who has access to good documentation for this OR would like to share their knowledge after spending much time dabbling in DCTL land in the form of documentation (looking at you @Shem Namo ;) ) in a certain forum topic, that would be super awesome!
This one in a little difficult for me Sam, I don't have access to a Metal system, so I can't really run tests like I did on OpenCL.
I did have a early copy of this fuse and it did work on OpenCL and so does the version in the first post of this thread...So I guess it's one of those Metal only problems.
SecondMan wrote: Wed Dec 09, 2020 9:01 pm
Shem Namo wrote: Tue Dec 08, 2020 11:13 pmOpenCL, CUDA and Metal
But regardless, that was just my side note. What I actually said was what I have said before (remember Vibrance?), that I am not the Tool Police™. I don't feel it's my (or WSL's) responsibility to micromanage other people's developments and set a high bar regarding standards. Sure, I'll offer guidance and voice my opinion when and if I feel that's appropriate but it's not (ever going to be) a hard rule or a test you need to pass. I'm also not always right either :)

If the community takes such a thing on board, when people like yourself keep a friendly eye on various developments and volunteer testing and standards grow organically that way, that would be different. But look:
Shem Namo wrote: Tue Dec 08, 2020 11:13 pmI didn't have the time to try out the fuse
and so it begins :)
Yeah, I get it.
I always look for new DCTL projects and try to help as much as I can, but this is something I already tried and I didn't thing there would be any issue with this.
I was very impressed when Gerald gave me a copy, and it worked perfectly on OpenCL(Usually it's very hard to get something to work on OpenCL or CUDA without testing on that platform).

I tested the first fuse in this thread and it works perfectly on OpenCL just like the first version I had.
So I guess this is one of the times that something works on OpenCL, but not Metal. And this is something that I rarely experience.
It looks like Gerald is really pushing the DCTL API to it's limits.

I blame BMD for making a GPU programming API that doesn't support simple straightforward Matrix Multiplication.
Who does that!?

I hope that this gets sorted out, this is a really cool fuse and I'll help as much as I can to get it to work on all 3 platforms.

Thanks again,
David

User avatar
JiiPii
Fusioneer
Posts: 169
Joined: Tue Mar 03, 2020 8:34 am
Answers: 1
Been thanked: 9 times

Re: Jellyshell  [SUBMITTED]

#12

Post by JiiPii »

Now here is a jellyshell that also works with metal.
@nmbr73 has developed and tested the necessary bug fixes.

Have fun

com.JiPi.Jellyshell.zip
You do not have the required permissions to view the files attached to this post.

User avatar
SecondMan
Site Admin
Posts: 4825
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 31
Location: Vancouver, Canada
Been thanked: 31 times
Contact:

Re: Jellyshell

#13

Post by SecondMan »

Update available in Reactor now! Thanks :cheer: