Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Protecting textures with a personal 'code' of some kind. How?

Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
04-01-2009 09:05
Abu, you're awesome! I'm looking forward to playing with this.

I'm guessing it's not going to work with 64-bit CS4, though, since it was written for a 32-bit version of PS. Since it sounds like you don't have access to a 64-bit OS right now, I'll see if I can get my friend who re-flagged importprimscript for 64-bit to take a look. If he can get it to work, I'll post a link to the 64-bit version here.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Abu Nasu
Code Monkey
Join date: 17 Jun 2006
Posts: 476
04-02-2009 06:12
If there is enough interest and things go okay, I'm cool with what you do in the way of 64-bit, Chosen. If that falls through, I might be able to find somebody in the FM community willing to do a 64-bit compile. (Personally, I'm gonna resist Vista and all that for as long as I possibly can for various reasons.)

I did take this to another community. I love talking about stuff, but I don't want to step on toes, either. How much should I talk about this? Is spreading the word good? Should I be my normal self or show restrain? When talking about this, what limits should I impose? Truly an odd quandry for me.

I don't know. Talk back if you feel the need.
Abu Nasu
Code Monkey
Join date: 17 Jun 2006
Posts: 476
04-02-2009 11:41
OMG I think I found the logic bomb. I was getting a bunch of extra noise that I couldn't quite explain. I was attributing this to a logic bomb in a particular loop but didn't want to mention it as I was completely sure. I did mention the extra noise, but not that I was suspecting a logic bomb. Um, yeah.

As things go, the back burner in my brain was working on it and I'm pretty sure I found it. Hopefully later tonight I'll be sitting at Photoshop to test it out. Nothing quite like finding a logic bomb without actively looking at the code or even sitting at a computer.

Before you get crazy with batching 100+ images, give me another day or two.
DeDe Doowangle
Registered User
Join date: 21 Jan 2006
Posts: 67
Lots of info
04-03-2009 15:58
I'm an average designer and I dont use watermarks or the sort, but I was wondering if you take your texture inworld and just remove any options to Mod/Copy on it, then apply it to your avitars clothing, ie: make the shirt, lets say, and once it's made apply Mod/Copy to the shirt itself beore you sell it.

When the person goes to wear it and then edits appearance, doesn't the fabric section dissapear only giving them recolor rights to the shirt? If I'm wrong how is it that others have been able to do this with their shirts? Or better yet, if what I said does work and they buyer cannot see the fabric in edit appearance mode, then how does one steal it?

Now, I'm not about to try and steal anything by asking this question but it certainly has me curious. If you know how they do it, then can't you devise a way to stop them?
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
04-03-2009 16:31
It's not particularly easy to steal a texture off of standard SL clothing if it's nocopy/nomod, but people do unfortunately steal textures off of other surfaces by simply doing screen shots and pasting them into a graphics program. There are more sophisticated ways as well, so it's hard to protect textures of any kind once they are displayed in world. Because there is a very limited market for textures unless they are full perm, it doesn't take much ingenuity at all to grab a texture and use it without the creator's knowledge. Hence the desire to place a maker's mark somewhere in the texture to establish ownership.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
04-03-2009 17:36
From: DeDe Doowangle
If you know how they do it, then can't you devise a way to stop them?


I won't go into specific details here, but to anyone who knows their way around graphics pipeline, stealing a texture is just a matter of a couple of clicks. Every texture on every item you can see is stored in a certain place in your computer's memory. If it weren't there, the computer wouldn't be able to draw the item, so it has to be in there. If you know where "there" is, you can pretty easily go "there" and extract whatever you want.

There's absolutely no way to prevent this. Computers work the way they work, and that's that. Anything that can be stored in memory, displayed on a screen, played through a speaker, or what have you, can be captured and recorded, no exceptions.

Since there's no technical way to prevent unauthorized copying, the next best thing is to incorporate unremovable elements into works that serve to establish ownership. That's what we've been talking about here. If a copy of your stuff appears somewhere, you can demonstrate that you were the original creator by showing your knowledge of the embedded watermark.

Think of it like writing your name inside your lunchbox in kindergarten. It won't stop Tommy Rottenbully from stealing your lunch, but it will serve to show that it was yours when you tell the teacher what happened. Then Tommy gets his ass paddled, and you get to watch.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Abu Nasu
Code Monkey
Join date: 17 Jun 2006
Posts: 476
04-04-2009 07:00
Something went terribly wrong. Actually, two things went terribly wrong. Imma have to strip it down and rebuild a few things. With every mistake I make, my understanding deepens that much more and I'm only gonna come back and make it better. Well, mostly better in some regards.

---- Please DO NOT rely on the previously released Nam's Mark ----

DO NOT
Namssor Daguerre
Imitates life
Join date: 18 Feb 2004
Posts: 1,423
04-05-2009 07:35
From: Abu Nasu
Something went terribly wrong. Actually, two things went terribly wrong. Imma have to strip it down and rebuild a few things. With every mistake I make, my understanding deepens that much more and I'm only gonna come back and make it better. Well, mostly better in some regards.

---- Please DO NOT rely on the previously released Nam's Mark ----

DO NOT
Not sure where I can help because I'm not a coder, but if you have any non-coding questions about watermarks, just ask (I feel somewhat responsable with my name attached to this). For example, that noise problem could have a solution with a wrap-around histogram, if that makes sense. I can't do that with standard PS filters and transforms, but perhaps you can with a custom filter.
Abu Nasu
Code Monkey
Join date: 17 Jun 2006
Posts: 476
04-05-2009 21:27
No worries, Nam. There is this little trick to images that I thought I could diregard. Turns out I did my test all wrong and can't disregard. And, of course, one mistake let to another and now I'm back-peddling. (I even went back to your one post and it turns out that you did not disregard this one little thing about image.)

This also goes back to a conundrum that I thought I could leave behind. While I am happy with the filter, I'm not exactly happy with the technique. That is, it's not quite as strong as I originally thought. I would really like something that is damn near rock solid. But the nature of watermarking doesn't allow for elegant solutions that are rock solid. That is, I can do 'pretty good' but not 'damn hefty'.

Not sure if I like the idea of what I think is 'pretty good'. But who knows? Maybe some of y'all will think it's 'ab fab' and others will think it's 'better than nothing'.

We'll find out in the next few days.
Snickers Snook
Odd Princess - Trout 7.3
Join date: 17 Apr 2007
Posts: 746
04-06-2009 14:24
From: Namssor Daguerre
I'll explain a basic Photoshop method that should get the job done:
You've piqued my curiosity. I normally work on my source PSD's at 1024x1024 or even 2048x2048. Then I save to TGA, reopen in Photoshop and resize using bicubic sharpen to get the TGA to 512x512 for actual use in SL. Wouldn't the resize mess up the watermark? Would that mean you'd have to resize the PSD temporarily, save to TGA then undo the resize PSD?

FWIW, I have no interest in watermarking things but I am curious. ^_^
_____________________

Buh-bye forums, it's been good ta know ya.
Namssor Daguerre
Imitates life
Join date: 18 Feb 2004
Posts: 1,423
04-06-2009 16:57
From: Snickers Snook
Wouldn't the resize mess up the watermark?
Nope. The information that is the watermark scales the same way the carrier file does. It would be very difficult to read in a thumbnail size image, but some information could still be extracted.

Here's an interesting experiment:

Zoom out on a fairly large bitmap (diffusion dithered) image to 25%. Take a look at how the computer screen interprets the information. It looks remarkably like a greyscale image. I like to refer to this effect as a pseudo-greyscale. Now, convert the bitmap to true greyscale and shrink it to 25%. Notice how all those spotty black and white pixels have averaged out quite nicely, just like when you zoomed out on the bitmap. It makes sense. Bitmap is 2 bits per pixel. Greyscale is 8 bits per pixel. 2x4=8. The information averages out very nicely when 4 pixels are converted to one. In fact, I've used this method of reduction to successfully embed greyscale images as watermarks in RGB carrier files while only using 2 bits per pixel.
Tabliopa Underwood
Registered User
Join date: 6 Aug 2007
Posts: 719
04-06-2009 17:54
From: Namssor Daguerre
Nope. The information that is the watermark scales the same way the carrier file does. It would be very difficult to read in a thumbnail size image, but some information could still be extracted.

Here's an interesting experiment:

Zoom out on a fairly large bitmap (diffusion dithered) image to 25%. Take a look at how the computer screen interprets the information. It looks remarkably like a greyscale image. I like to refer to this effect as a pseudo-greyscale. Now, convert the bitmap to true greyscale and shrink it to 25%. Notice how all those spotty black and white pixels have averaged out quite nicely, just like when you zoomed out on the bitmap. It makes sense. Bitmap is 2 bits per pixel. Greyscale is 8 bits per pixel. 2x4=8. The information averages out very nicely when 4 pixels are converted to one. In fact, I've used this method of reduction to successfully embed greyscale images as watermarks in RGB carrier files while only using 2 bits per pixel.


One of the more interesting side effects of this is it enables fingerprinting images using Distance Encoding. Where the distance between a set of pixels (points) is encoded and not the colours themselves. Like real fingerprint traces (and DNA a bit) when a significant number of points can be matched then it can be a basis for further examination.

A typical application using DE fingerprinting allows the creator to enter a passphrase and a length of points. The application then generates a sequence of pseudorandom points of length using the passphrase as a seed, and returns the distance between each point in the sequence as a DE string. And the points can be non-unique in the sequence as well. When comparing two DE strings generated from complex images then it can be a basis for further investigation.

One of the advantages is that the DE string doesnt need to be stored anywhere. And any image can be checked by anyone to see if there is any significant match between any DE fingerprints that they may have for images of their own making. It doesnt have to be an exact match. Just enough to make you go hmmm! really.

The reason for randomizing the points is simply to make it more difficult for the copiers to guess what the sequence of points maybe. So its about passphrase cracking more than anything. Which can be made more difficult for them by using another random passphrase generating program.

DE codes are not infallible but they can be useful when comparing two images that have striking similarity to the naked eye and yet one has been re-processed. filtered or re-coloured in some way.

For the technically minded google for Distance Encoding and Compression.
Abu Nasu
Code Monkey
Join date: 17 Jun 2006
Posts: 476
04-07-2009 03:19
Okay, here's the deal.

I am going to completely abandon what I have done so far. I did do a strip-down and it made me a little happier - but no where near happy enough. While I am sloppy with a lot of things, I am very hardcore with certain things.

If you wish to continue in Nam's footsteps, I highly recommend getting to know Actions. Absolutely invaluable once you get to know the little quirks.

The good news is that I will be heading off in the direction that I originally started in. I have been doing a crap ton of reading and infomation assimilation. Seriously. When I finally put it all together, I should have a watermarking method that will make me damn happy. Considering my standards with regards to this, y'all folks should be very happy as well.

The very good news is that I found a paper describing exactly what I'm looking to do.

The only thing is that I don't know how long it will take me. Doing the TBN thing took me roughly 2 years, but at least that shows that I don't stop once I get an idea in my head.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
04-07-2009 12:32
Thanks for the heads up, Abu. Sorry to hear you couldn't get your first attempt to work to your satisfaction. I look forward to seeing what you come up with for round 2. No doubt it will be one rock solid piece of software. Hopefully it won't take 2 years. :)
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
04-08-2009 10:57
a copyright, that would be my advice. If you are a serious graphic artist, go apply for a business liscence, or better yet go incorporate yourself, literally, inc. And once you get on the copyright wagon it is fairly easy. You just sumbit your images to be added to your file.

Now this i used for my photography, advisably so. But that is a bit different from a 512x texture. I suppose if you feel that the value supports its worth, and you are seriously taking this on as a career, then go for it. As for watermarking, and the like, it can be done in Photoshop, but it is a very minimal way to ensure your rights.
1 2