Comparing two textures

Hello,

i am trying to compare to textures to get a spread of values telling me, how many pixels are the same to find out, if two textures are the same and toggle an action if this is true.

I use Pipet to compare an representative amount of pixels of both textures and if a given percent of pixels are the same, i assume, that the textures are the same.

This worked out quite well and took me just some minutes. My question is: would this be possible in a way using shadertechnologies (be it pixel or vertex) to achieve a better performance, as i will have to compare the textures about 10 to 60 times a second and for now don´t know if this would be possible at all.

I didn´t find any possibility to give back values to vvvv from out a shader for now (well, didn´t research too much right now…) and was wondering, if this would be doable.

See attached Patch for my now working cpu- based solution.

Cheers, Chris

TexturVergleich.v4p (14.0 kB)

This sounds like video… have you looked into the Trautner node?

That will give you an expression of how many pixels have changed in each frame.

but it is freeframe and as such works with video.

-sunep

Hey Sune (greetings to urs btw ;-) ),

it´s not Video but an Imagetexture. I want to check out if someone dropped a new Version of a texture into a given folder on my hdd and if this is right fade over to the new version.

And besides Freeframe wouldn´t be giving me the Performanceboost i hope to get via Shaders.

Thx anyway, Chris

Hey Sune (greetings to urs btw ;-) ),

it´s not Video but an Imagetexture. I want to check out if someone dropped a new Version of a texture into a given folder on my hdd and if this is right fade over to the new version.

And besides Freeframe wouldn´t be giving me the Performanceboost i hope to get via Shaders.

Thx anyway, Chris

Hey Chris

The ideal way to do this in my opinion would be to check the file info and see if windows has indicated a change in the file. You can use the ModificationDate (File) node for that… I am sure that is the most effecient way to do it…

And please say Hi to Urs from me and tell more about your project… I am getting curious :)

Sune

the best way would be to see the file changed date if we had a node for that

but see a shader approach attached

the best way would be to see the file changed date if we had a node for that

but see a shader approach attached

diff.zip (101.1 kB)

oh there IS a file mod date node, didnt know
sunep replied while i made the patch :)

An example of the changed file approach is attached.

Sune

An example of the changed file approach is attached.

Sune

changed_file.v4p (4.8 kB)

Before i forget: its about projecting materials on white (real life) boxes to make them look like e.g. Kitchen- Furniture and present the hundreds of different veneer- materials our client (yep, commercial one this time, license already bought :-) ) has to offer.
The rest tends to fall under obligations of secrecy i guess, so shhhh… you all have NOT heared or read of anything i mentioned.

Chris