Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Lab Assistant
#26 Old 21st Jun 2010 at 10:04 PM
I post my last test, to show that you can do with inversed grayscale image, pasted in alpha channel.

CmarNYC: thank again for your Tattooinator.
Is it possible to add a window in your program, to see how tattoo will be in Cas :
1) to verify if DDS file is correct.
2) to adjust colors of pattern more easely.
Perhaps, I'm too demanding, I'm aware this modification need a big work and it isn't essential.
Screenshots
Advertisement
Ms. Byte (Deceased)
Original Poster
#27 Old 21st Jun 2010 at 10:50 PM
Wow, that's gorgeous.

I'm afraid the programming language I use doesn't have the capability to do a CAS-like preview, and I suspect can't even display a DDS image. Someday I intend to learn C# and figure out how to do it, but that's not going to be until I retire and can put more time into this. It would be very nice if EA would come up with a CAS-preview utility like Body Shop for Sims 3.
Test Subject
#28 Old 22nd Jun 2010 at 4:44 AM
Hey CmarNYC, I am having a problem where the icon for my tattoo is surrounded in yellow, and the tattoo has a darker outline to it. I can't seem to figure out why, and I have made sure that my alpha layer is completely black and white. Any advice?
Screenshots
Test Subject
#29 Old 22nd Jun 2010 at 5:03 AM
Nevermind, I figured it out. The background of the main image was apparently a shade slightly less than black, and was borking the whole thing. Thanks a ton for the program!
Screenshots
Scholar
#30 Old 22nd Jun 2010 at 8:00 AM
Hey Cmar I tried your newest tool and I had a blast. I made two Tats. It's just like making clothes for the most part, It worked perfectly for me. Also I seconded what sliverfox said about a mini Preview of what the tattoo will look like (for example, the Colors) and to add more color presets before exporting to a package. This program makes a whole a lot of things easier.
Screenshots
Test Subject
#31 Old 22nd Jun 2010 at 8:39 AM
Has anyone found a solution for the irregular blending that each channel has? From white to grey just darkens the color, and from grey to black further darkens it while making it transparent. On top of that, edge pixels mix oddly with the skin, causing dark marks. I have explained my progress and work thus far here:
Ambitions Style Tattoos Research

Download my creations here
Instructor
#32 Old 22nd Jun 2010 at 6:31 PM
Okay, I'm used to doing this on my mac, and making a texture with a transparent background and saving it as a png, then converting to dds with another program which creates my alpha mask for me. ;/ It's a lot easier than this. I've just started using gimp on windows, and I'm completely confused by this thread, am I supposed to make my RGB mask one layer and then my black and white texture as another, and save the whole thing as one dds? And which layer do I put the alpha mask on, or do I need that if I'm not using the alpha channel in the mask?

Edit: By "this" I mean clothing, not tattoos.
Instructor
#33 Old 22nd Jun 2010 at 6:57 PM
Also, I made a package to test, and it won't show up in-game. :C Not invisible, just not an option, like the package is broken or something. Could this be because of the way I did the dds file?
Ms. Byte (Deceased)
Original Poster
#34 Old 22nd Jun 2010 at 9:55 PM Last edited by CmarNYC : 25th Jun 2010 at 7:58 PM.
emhpb: Your DDS image should be one layer with four channels: Red, Green, Blue, and Alpha. The various talk about black and white images are ways to edit the alpha channel. What we've been talking about is creating a mask which has the alpha channel image transferred to it, editing the mask, and then applying the mask to the alpha channel. The references to RGB channel are just because the R, G, and B channels work the same way and can be edited together, while the alpha channel is sort of an overlay and works differently. (I'm kind of a beginner myself in this area.)

Do you have Ambitions or just the patch? If you have Ambitions and the tattoo isn't showing up in CAS, you could pm me the package if you want and I'll take a look.

For everyone who wants a preview window - *edit* - I've started on one, look several posts further down. There's a viewer available on the nVidia site, and IrfanView works with DDS files if you install the plugins, but the tattoos don't seem to show up the same way in them as in the game. I'm not an expert on graphics though and am in a slight state of confusion - maybe someone who knows more about it can clear things up or offer suggestions.

I can try adding more presets to the packages but CAS may not display them. I'll experiment.
Instructor
#35 Old 22nd Jun 2010 at 10:00 PM
Ah, okay thank you Channels here meaning colors? xD;

Annnnd I don't have ambitions. Dx I have the patch though, I thought that was all I needed. Guess I didn't read properly. :C thanks again!
Ms. Byte (Deceased)
Original Poster
#36 Old 22nd Jun 2010 at 11:31 PM
Quote: Originally posted by emhpb
Annnnd I don't have ambitions. Dx I have the patch though, I thought that was all I needed. Guess I didn't read properly. :C thanks again!


Unfortunately it looks like the patch gives you only a limited set of in-game tattoos and doesn't support custom tattoos.
Instructor
#37 Old 23rd Jun 2010 at 12:38 AM
Ah, okay, thanks for letting me know. :<
Test Subject
#38 Old 23rd Jun 2010 at 5:18 AM
Quote: Originally posted by CmarNYC
For everyone who wants a preview window - it's not going to happen in Tattooinator, or at least not anytime soon - it would just be too time-consuming to attempt using a language that has very limited graphics and GUI abilities, plus the Sims seems to interpret the image differently from a regular viewer so I'd have to tailor it somehow. There's a viewer available on the nVidia site, and IrfanView works with DDS files if you install the plugins, but the tattoos don't seem to show up the same way in them as in the game. I'm not an expert on graphics though and am in a slight state of confusion - maybe someone who knows more about it can clear things up or offer suggestions.


Let me see if I can't clear some things up...
The DDS files allow for each pixel to hold 4 "colors" of information. These are called channels when you are using them, and displaying them the way the dds (and most image formats) designers intended. This is that the first three channels are blended values of red green and blue, and the third channel expresses how opaque the image is in that location.

For the purposes of visualization, it is probably better to think of the RGBA as layers, because this is how the sims is using them. Each pixel can hold a value of 0 (black) to 255 (Bright or white). When drawing the tattoos it draws each layer, and stacks them, values from 129-255 are the color you want, getting darker as it gets lower, and 128-0 the color continues to get darker, but the layer starts to become transparent, and blend with the layers under it.

Each of the following examples is for a single pixel in (R,G,B,A) format, with RGB being their normal colors, and A being bright purple:
(0,0,255,0) - blue
(0,255,255,255) - bright purple
(255,0,255,0) - bright blue
(255,0,129,0) - dusty darker blue
(255,0,75,0) - very dark purple-ish blue
(255,0,15,0) - little darker than bright Red, but the blue is not showing as blue


The two problems that I have with this are: there is not a true alpha mask, so you cant gracefully blend 2 tattoo colors without them getting dark and muddy, and edge pixels that are trying to blend with the skin seem to become VERY dark, as if they are actually being blended with black.

If you need some help with the math to approximate the color output I would be more than happy to help with that. Its just a bunch of multiplication and division

Download my creations here
Ms. Byte (Deceased)
Original Poster
#39 Old 23rd Jun 2010 at 3:03 PM
Thanks, TwinHerder. It would be an interesting project to look up the DDS structure and write a graphics display for it. Not going to happen overnight, though!

But how about the way the DDS tattoo images don't show up in the game the same way they do in GIMP or a viewer? Seems like black is being used as a background or transparent color for all the channels, and in the alpha what is transparent in a viewer becomes the assigned alpha color, by default black. In other words the alpha seems reversed, if that makes any sense.

The DDS viewer in S3PE shows the transparency the same way as the game, but defaults to white for the alpha color instead of black.

Is this all just the way the image information is being interpreted? And what we need is a viewer that does it the same way as in the game?

Possibly the black borders around the colors are because the color is being blended with the black background at the edges?
Screenshots
Test Subject
#40 Old 23rd Jun 2010 at 9:46 PM
You have all the right observations, but I think what is missing is:

for most image programs the background of a transparent image is black, white or a checkered white and grey. In a normal image each channel (rgb) are multiplied by the alpha channel and the background is multiplied by 255-alpha, then the two are added together. All that is, is a weighted average.

The Sims 3 uses all 4 channels as a clipping mask for a pattern. White is on, back is off, and until now anything between was darker versions of the same color. In a separate DDS image there was an image that had the alpha information.

With tattoos it seems that they are using the same basic method with two changes. The patterns can only be a single color, and the scale of 0-255 on the DDS image is both the darkness and the alpha map.

As far as the edges, it would be my assessment that they are blending the image with black, why they are not blending with skin tone, I don't know. My best guess is that they are using the standard interpretation of the channel, and then running it though a second pass where it adds the transparency effect to the output. This theory could be tested by making clothing with the same dds as tattoo, and then darken by 50% the dds and use it for the transparency/clipping mask as well.

WHY EA, WHY!?!?!

Download my creations here
Lab Assistant
#41 Old 24th Jun 2010 at 1:45 AM Last edited by WolfoftheNyght : 24th Jun 2010 at 2:22 AM.
Does anyone have a tutorial out yet? I've been meddling around with this, but just can't seem to get it to work right- the colors always end up strange or the tattoo doesn't display correctly (ie. Stuff that shouldn't be showing, like the background, is).

Edit: Ok, after much more fiddling, I finally got the background to vanish, but for some reason the Tattoo is not coloring correctly.

Here it is in game:
http://i10.photobucket.com/albums/a...xial_MS/Arg.jpg
You can't really tell by this crappy screenshot, but the edges of the black are painted the color the black should have been.

And I attached the .psd of the actual image before I converted it to a .DDS For reference, I am using DDS Converter 2.1 with the following options:
http://i10.photobucket.com/albums/a...S/Converter.jpg

Can anyone tell me where I went wrong >>;? I'm using a combination of PaintShop Pro 6 (Old, yes I know, but it get the job done and I'm a pro with it) and Adobe PS CS3.
Attached files:
File Type: zip  DragonHeadPSD.zip (254.2 KB, 20 downloads) - View custom content
Ms. Byte (Deceased)
Original Poster
#42 Old 24th Jun 2010 at 1:46 AM
TwinHerder: Well geez, now you've gone and intrigued me and I'm going to have to try writing a preview window. The language I use can set pixel RGB colors so it should be doable. Is it okay if I pm you if I have questions or run into problems?
Lab Assistant
#43 Old 24th Jun 2010 at 2:34 PM Last edited by silverfox : 25th Jun 2010 at 8:31 PM.
Quote: Originally posted by WolfoftheNyght
Does anyone have a tutorial out yet?

...

Can anyone tell me where I went wrong >>;? I'm using a combination of PaintShop Pro 6 (Old, yes I know, but it get the job done and I'm a pro with it) and Adobe PS CS3.


I'll try to resume all we have said with my bad english and my poor vocabulary.

RGB channel :
RGB channel have 3 "pure" colors : Red, Green, Blue. each color correspond to a color of pattern.
Background color need to be black (black=transparent in game) to have correct thumbnail and tattoo.

if colors aren't "pure", you have differents effects. see previous post of TwinHerder.


Alpha channel :
in game, image in alpha channel is drawed on top of image of tattoo (RGB channel). this image need be in grayscale.
with gimp or photoshop :
black = transparent
grey = semi-transparent
white = opaque

you can put alpha channel, transparent (totaly black). it won't be used.
you can put a white image to have a fourth color. warning, I repeat this image re-covers your image drawed in RGB channel.
you can put a grayscale image to create shadow. see my Dragon and koi in previous post.


to create a alpha channel, photoshop is more easy than gimp. see screenshot. (I use a old photoshop 5.5 )
by default, alpha channel is black (totally transparent). I think it's that you need for your Dragon head.
warning, your work has some pixels with no pure color. see zoom.
your tattoo will have bad edges.
you need to delete them, or use alpha channel to draw thin edges. see Marcos_Edson' stars in previous post.

i don't know if it's important : uncheked "build mimap" when you save dds file.


I hope my explanations are understandable and they help you.
Screenshots
Attached files:
File Type: rar  DragonHeadV2.rar (44.0 KB, 21 downloads) - View custom content
Lab Assistant
#44 Old 24th Jun 2010 at 3:08 PM
Perfect!! Excellent, thank you very much SilverFox! I knew it was just something silly that I hadn't looked at. So the way I did the color channels -is- correct, I just needed another blank alpha channel? I'm so used to making clothes, using a blank channel seems very foreign to me lol

And yes, I was examining your dragon and the Koi last night a trying to figure out how to do that. I'm still not 100% sure if I'm doing the color channels correctly. I will definitely try it out again tonight with all the info you've provided me Thank you SO much!

Also, just to recap- you don't make a 'real' alpha channel so to speak via a mask, you just create a new layer and name it Alpha?
Lab Assistant
#45 Old 24th Jun 2010 at 4:23 PM Last edited by silverfox : 25th Jun 2010 at 5:13 PM.
Quote: Originally posted by WolfoftheNyght
Also, just to recap- you don't make a 'real' alpha channel so to speak via a mask, you just create a new layer and name it Alpha?


I made a real alpha channel, but it's blank, indeed.
Problem with tattoo, it's the game doesn't use alpha channel as such ; but use it as an overlay (opaque, semi-transparent or totaly transparent).

This induces a lot of confusion.

Transparence of tattoo is done by color black in RGB channel.
Lab Assistant
#46 Old 24th Jun 2010 at 6:29 PM Last edited by WolfoftheNyght : 24th Jun 2010 at 7:21 PM.
Ahhh ok! I'll have to play with it more when I get home. I took a look at the PSD you uploaded, and with that as an example plus all your information, I feel 100% more prepared this time Thank you so much! Hopefully I'll be able to use this info and give back to the community that's helped me so much!

Quote: Originally posted by silverfox
Transparence of tattoo is done by color black in RGB channel.


Oooook. I think that was confusing me the most. Awesome Can't wait to try it.
Lab Assistant
#47 Old 25th Jun 2010 at 2:50 AM
This is fantastic!! Thank you so much CmarNYC for your amazing tool, and thank you SO much Silverfox for your help and patience A little more practice and I'll be ready to create a couple nice tattoo sets to submit to the site! (See screenshots!)

The fixed DragonHead:
http://i10.photobucket.com/albums/a...MS/Awesome1.jpg

New Wolf One:
http://i10.photobucket.com/albums/a...MS/Awesome2.jpg

:lovestruc
Field Researcher
#48 Old 25th Jun 2010 at 4:20 AM
Oh, nice! I start loving this tattoo business, maybe when I´m finished with my current basic collection I start messing with tattoos, too!
Ms. Byte (Deceased)
Original Poster
#49 Old 25th Jun 2010 at 5:01 PM Last edited by CmarNYC : 12th Jul 2010 at 12:59 PM.
Did I say a viewer wouldn't happen overnight? Well, here's my alpha test version. Needs work - it can only read UNCOMPRESSED DDS files (and only 512 x 512 RGBA8, suitable for tattoos) and the background is showing in a few places where it shouldn't. It's a start. Before you ask, I'm working on the ability to change colors or more likely use the preset colors, and of course to read compressed files.

Extract the executable and put in the same folder as Tattooinator.

Edit: By putting the tattoo on the full back and expanding it to full size, I can see that my viewer is accurate. (The full-back stretches the tattoo vertically; other locations seem to keep the proportions closer to the original.) Differences in appearance seem to be loss of detail caused by the game degrading the image at smaller sizes, possibly compressing it or using a smaller mipmap. I've replaced the viewer tool below with an updated version that uses the alpha to shade transparent areas, giving a little more accuracy.

** The final (for now) version of Tattooinator, including the viewer, is in the downloads section: http://www.modthesims.info/download.php?t=410592

I'm removing the download from this post.
Screenshots
Test Subject
#50 Old 25th Jun 2010 at 8:10 PM
Thank you thank you thank you all. I've tried other tutorials and they just didn't have enough information for my little brain. Now, my sim of me has the tat I have. Yay!
Page 2 of 3
Back to top