[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4505: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4507: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
RabidHaMsTeR.Org • View topic - Creating pics with transparency (JPEG, PNG, etc..)

Creating pics with transparency (JPEG, PNG, etc..)

Suggestions + Info on development of R4 visuals

Moderators: rabidhamster, Rovastar

Creating pics with transparency (JPEG, PNG, etc..)

Postby HardcoreKiller » Fri Jan 23, 2004 6:49 am

Gordon,

What program/method did you use to create the pictures and backings?? I would like to start doing that too. I have a really cool mushroom I want to display...

Example:
Smiley.png and Smiley2.png

I see it is necesarry to create the backing so the pic looks "transparent" over the visual. I would like to do this for pics of girls/promo pics. Maybe even have them fade in and out randomly at specific intervals? (another vis idea)...

-Hardcore
HardcoreKiller
 
Posts: 29
Joined: Tue Nov 11, 2003 5:25 am
Location: Arizona, USA

Postby Rovastar » Fri Jan 23, 2004 9:45 pm

Shader blend commands they are in the docs.

Look at the examples of some scenes that have transparent layers in them e.g. skins of tunnels, watermorphs, etc and you will see how it is done.
Rovastar
 
Posts: 423
Joined: Mon May 19, 2003 3:15 am
Location: Derby & London, England

Postby HardcoreKiller » Sat Jan 24, 2004 12:03 am

Rovastar,

I did do some reading and am making the pics manually...

But it seems there are 2 JPG or PNGs for each "transparent" pic. Did you use MSPaint or something to make them?

-Hardcore
HardcoreKiller
 
Posts: 29
Joined: Tue Nov 11, 2003 5:25 am
Location: Arizona, USA

Postby Chris » Sat Jan 24, 2004 11:30 am

You create the 2 pictures - one ending in an 'a' and the other a 'c'

The 'a' one is black and white - it tells which parts of the 'c' one are drawn. White parts are drawn, black parts are transparent.

When you load the picture use a ? in place of the a or c as in:
strcpy(img.filename,"snowman_?.png");

Creating the pictures in mspaint would be possible but a bit tedious. Create your colour texture first with and save with a filename ending in "c" , then blackout all the bits you want transparent, then fill in the rest with white and 'save as' "a".

Photoshop or Paint Shop Pro are much more powerfull, or if you want a free alternative try the GIMP - open source graphics program that's quite good.
Chris
 
Posts: 66
Joined: Sat Sep 27, 2003 12:41 am

Postby rabidhamster » Sat Jan 24, 2004 12:19 pm

Yep. thats basically it. I posted in another forum how i tend to do it that may help you. I assume you have an image on a black background. Here's a quick run-down (i use PSP7):

* Save your image at the right size (128,256,512,1024 or 2048 in width and height - eg. 1024x512) as image_c.png/jpg/whatever
* Convert it to greyscale
* Use 'levels' in PSP (with the input sliders) to make the image mostly black and white - with the white bits the ones you want showing.
* Use gaussien blur with a radius of about 5
* Use levels again with similar settings so you end up with virtually all white, but smooth edges
* save the image as image_a.png/jpg (the filename must be exactly the same apart from an 'a' instead of the 'c')
rabidhamster
Site Admin
 
Posts: 1100
Joined: Fri Mar 21, 2003 12:31 pm
Location: Cambridge, England

Postby HardcoreKiller » Sun Jan 25, 2004 10:58 pm

HardcoreKiller
 
Posts: 29
Joined: Tue Nov 11, 2003 5:25 am
Location: Arizona, USA

Postby rabidhamster » Sun Jan 25, 2004 11:00 pm

rabidhamster
Site Admin
 
Posts: 1100
Joined: Fri Mar 21, 2003 12:31 pm
Location: Cambridge, England

Postby Guest » Sun Jan 25, 2004 11:28 pm

Guest
 


Return to R4

Who is online

Users browsing this forum: No registered users and 5 guests

cron