Jump to content

Reflective Objects and Text


Recommended Posts

this should be moved in General discussion.

You can use the gradient plugin in order to create a reflection.

Flip what you want to reflect.

Move it to the correct position.

Set colors ALPHA to: Primary: 255; Secondary: 0

Use the gradient plugin with alpha only checked.

sig6rj3.png
Link to comment
Share on other sites

  • 3 weeks later...

Here is what I want to do. I have been testing different ways to do this and none have been successful so I thought I might just come back here and ask. I have an image of a server with a white background; normally what I would do is save it as a gif and make the white background transparent. In Paint.NET, I am not sure how this is done or what would be my best option. Than I would create my banner, in this case I wanted to gradient the color from a navy blue to a black at the bottom. The white background would then become the blue to black background; the server would than reflect in the black portion of the background. Could anybody take me through the steps to accomplish this?

1000.5.1066.5295.jpg

[

Thanks,

Kevin Tunis

Link to comment
Share on other sites

Kevin Tunis:

what you could do is selc all the white (the backround) and then use the gradient tool. When you have something selected, paint.net only lets you work on that selection. I hope this helps, i didn't really understand what you want to do though.

munchkinmann, can you use the image that MadJik created and explain how you select the white background and gradient this background from navy to black?

Use the codelab for that:

http://paintdotnet.12.forumer.com/viewtopic.php?p=16284#16284

Cut the shadow first, and delete remaining blue pixels...

Tada!!!!

server.jpg

MadJik, can you tell me more about codelab and how to install/use it?

Thanks,

Kevin Tunis

Link to comment
Share on other sites

Well! CodeLab is a plug-in here:

http://paintdotnet.12.forumer.com/viewtopic.php?t=1096

I'm not the one to explain CodeLab. It uses C# programming language.

The Code for reflection is here:

http://paintdotnet.12.forumer.com/viewtopic.php?t=2520

Read the topics behind this links... This is from where I started...

Link to comment
Share on other sites

This is the code is used:

void Render(Surface dst, Surface src, Rectangle rect) 
{ 
   int depth = 100;    // maximum distance of the reflection 
   int MaxAlpha = 128; // darkest reflection (255-0, default 128) 
   int ignore = 0;     // bottom pixels of object to ignore 

   PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); 
   Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); 
   ColorBgra CurrentPixel; 
   for(int y = rect.Top; y < rect.Bottom; y++) 
   { 
       for (int x = rect.Left; x < rect.Right; x++) 
       { 
           if (selectionRegion.IsVisible(x, y)) 
           { 
               CurrentPixel = src[x,y]; // Get the current pixel 
               if (CurrentPixel.A == 0) // is it transparent? 
               { 
                   int y1=0; 
                   int yd=0; 
                   for (y1=y; y1 > 0; y1--) 
                   { 
                       if ((y1 != selection.Top) && (src[x,y1].A == 0)) 
                       { 
                           yd++; 
                       } 
                       else 
                       { 
                           break; 
                       } 
                   } 
                   if (y1+1-yd-ignore >= 0) 
                   { 
                       CurrentPixel=src[x,y1+1-yd-ignore]; 
                       if (CurrentPixel.A > 0) 
                          if (yd                           { 
                              // fade the reflection out 
                              CurrentPixel.A = (byte)((MaxAlpha/depth)*(depth-yd)*CurrentPixel.A/255); 
                          } 
                          else 
                          { 
                              CurrentPixel.A = 0; // totally faded at this point 
                          } 
                   } 
               } 
               dst[x,y] = CurrentPixel; 
           } 
       } 
   } 
}

I just changed paremeters Depth = 250 and MAxAlpha = 255 for this server!

Open CodeLab and Copy/paste this code.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...