Using "filter.sobel" question..

Greetings,

I’m using a combination of tutorials/samples trying to get a water effect I want and I’m 90% there.

Basically I’m using the liquid fun examples to create water.  I’ve achieved this pretty well, but wanted to go the extra mile by including the “filter.sobel” effect.

I’ve managed to do it - but it makes the liquid water black/dark with the outline effect of blue.  Even though I’ve designated the actual liquid is blue color.  IF I do not use the Sobel filter effect - then all the liquid particles are blue as set in my parameters.  When I use the Sobel filter - it gets the look I want with the blend and outline of the water - but only has the edges be the blue that I designated and the ‘non-edge’ particles as darker/black.  Is there anyway to get the particles a variation of blue keeping the Sobel filter effect?

Also - sort of related , I know how to detect iPad vs iPhone… is there a way to detect older devices that would have a harder time rendering Sobel filter effect?

Thanks

Think I figured it out, can see it in attached pic- I just used alpha with sobel filter and used a bluer BG for where water is…

Now I tested on my iPhone 6 vanilla and runs fine 60 FPS no hiccups.

I tested on my iPad Mini first generation and wasn’t as smooth.

Can someone help me figure best method to detect slower devices that may have trouble rendering the Sobel filter effect- I see the “system.getinfo()” and use it in a general way to detect iPad vs iPhone. But would like to use one of the advanced properties like “gl_renderer” or something that is able to detect it’s a more modern iOS device capable of rendering advanced effects smoothly.

Any input appreciated

RHD.png

Hi @henson802,

Have you experimented with the “architectureInfo” return value for “system.getInfo()”? This returns a somewhat (well, considerably) variable value depending on the underlying system architecture, but you might be able to use string parsing to detect if a certain iOS device is older than what you want to allow for the sobel filter.

https://docs.coronalabs.com/api/library/system/getInfo.html#architectureinfo

I would encourage you to simply test this property and see what it returns on various testing devices… unfortunately, I can’t seem to locate any definitive list of what each iOS device would return for this.

Take care,

Brent

Hey @Brent Sorrentino

I did see the “architectureInfo” - only issue is that I only have access to two of Apple’s devices, iPad Mini first gen and iPhone6 first gen.  I’ll try to find out if there’s more information regarding other devices and their architectureInfo names… hopefully I can find a pattern to the naming and be able to make some sensible prediction as to other device names.

Was also thinking about using this return value:

gpuSupportsHighPrecisionFragmentShaders

… Though I’m not sure which iOS devices support this , if any… I’d assume only the more modern ones, would be nice if the iphone6 returned this as true and the ipad did not - that would be a good easy method to distinguish stronger iOS devices.

Will do some further testing.  Thanks

So I found a list of “architectureInfo” names.  My iPhone6 and iPad Mini match up to what I tested and printed so I’m assuming the rest of it matches up.  Pretty useful:

https://www.innerfence.com/howto/apple-ios-devices-dates-versions-instruction-sets

The names under “hw.model” column is what should show up when use the system info “architectureInfo” value return.

I wish there was an ios return value that would show the ‘ARM’ value instead of the “hw.model” as it’s easier to filter out via code - seems devices that have ARM value of: “armv7s” or “arm64” are more capable of rendering higher end filters/graphics.  Where as the “hw.model” is basically name of devices so alot tougher to filter through…

Think I figured it out, can see it in attached pic- I just used alpha with sobel filter and used a bluer BG for where water is…

Now I tested on my iPhone 6 vanilla and runs fine 60 FPS no hiccups.

I tested on my iPad Mini first generation and wasn’t as smooth.

Can someone help me figure best method to detect slower devices that may have trouble rendering the Sobel filter effect- I see the “system.getinfo()” and use it in a general way to detect iPad vs iPhone. But would like to use one of the advanced properties like “gl_renderer” or something that is able to detect it’s a more modern iOS device capable of rendering advanced effects smoothly.

Any input appreciated

RHD.png

Hi @henson802,

Have you experimented with the “architectureInfo” return value for “system.getInfo()”? This returns a somewhat (well, considerably) variable value depending on the underlying system architecture, but you might be able to use string parsing to detect if a certain iOS device is older than what you want to allow for the sobel filter.

https://docs.coronalabs.com/api/library/system/getInfo.html#architectureinfo

I would encourage you to simply test this property and see what it returns on various testing devices… unfortunately, I can’t seem to locate any definitive list of what each iOS device would return for this.

Take care,

Brent

Hey @Brent Sorrentino

I did see the “architectureInfo” - only issue is that I only have access to two of Apple’s devices, iPad Mini first gen and iPhone6 first gen.  I’ll try to find out if there’s more information regarding other devices and their architectureInfo names… hopefully I can find a pattern to the naming and be able to make some sensible prediction as to other device names.

Was also thinking about using this return value:

gpuSupportsHighPrecisionFragmentShaders

… Though I’m not sure which iOS devices support this , if any… I’d assume only the more modern ones, would be nice if the iphone6 returned this as true and the ipad did not - that would be a good easy method to distinguish stronger iOS devices.

Will do some further testing.  Thanks

So I found a list of “architectureInfo” names.  My iPhone6 and iPad Mini match up to what I tested and printed so I’m assuming the rest of it matches up.  Pretty useful:

https://www.innerfence.com/howto/apple-ios-devices-dates-versions-instruction-sets

The names under “hw.model” column is what should show up when use the system info “architectureInfo” value return.

I wish there was an ios return value that would show the ‘ARM’ value instead of the “hw.model” as it’s easier to filter out via code - seems devices that have ARM value of: “armv7s” or “arm64” are more capable of rendering higher end filters/graphics.  Where as the “hw.model” is basically name of devices so alot tougher to filter through…