You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, September 8th 2010, 11:52pm

Radar mask and alpha channels

Ok dumb question time. Can someone explain radar masks to me?

I want to hide the sweep when it goes outside my map, here, but I have no idea how to do it.

I have looked at the krpano demo, and seen the radar mask .png, but I am not a Photoshop pro and don't know how to make a graphic like that. And I don't really understand - if the sweep shows through the transparent parts of the mask, what color are the opaque parts of the mask?

Obviously, I'm not that great with graphics programs.

Anyway, the point is I would really love a For Dummies tutorial.

Run

Beginner

Posts: 41

Location: maryland. USA

Occupation: Photographer

  • Send private message

2

Thursday, September 9th 2010, 1:22am

Hi,

You can set the size "size =" of the sweep in the example xml I use as below;

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<radar visible="true"
               size="200"
               alpha="0.3"
               fillcolor="0x3DD8FF"
               fillalpha="1.0"
               linecolor="0x3DD8FF"
               linealpha="0.0"
               linewidth="0.0"
               glow="true"
               glowcolor="0x3DD8FF"
               glowwidth="4"
               glowstrength="3"
               behindspots="false"
               dragable="true"
               />


The transparency of the opaque parts of the radar sweep graphic are controlled through the alpha="" , fillalpha="" and linealpha="" above. Just add those into your radar xml and set them as you would like them.

If you activate the krpano editor setting in your XML

Source code

1
<plugin name="editor" url="%SWFPATH%/plugins/editor.swf" keep="true" /></plugin>


You can use the editor at the bottom of the screen in real time almost, view the XML make any changes to it then select load this xml. It will then use the parameters you just set. Keep playing till you see what you want, then copy the xml portion that works how you like and paste it into the file used to compile your panorama.

By the way, if you want transparency in an image in Photoshop an easy way is to add a layer below the layer of whatever graphic you have. Dont paint on this layer. Then erase on your graphic layer using the eraser or even the selections tool any area where you want it to be transparent.

Radar layer -----========---------
New layer -----------------------------------

The = signs represent the radar sweep graphic, the hyphens represent the transparency. Save this off in a png format which preserves transparency info and when you load it using your xml code then everywhere that the hyphens are will be transparent. This tutorial should help you a bit more in case I wasn't very good at explaining it *unsure*

Good Luck

Rick

This post has been edited 6 times, last edit by "Run" (Sep 9th 2010, 1:57am)


floz

Trainee

Posts: 109

Location: Uppsala, Sweden

  • Send private message

3

Thursday, September 9th 2010, 2:52pm

it can be tricky . . .

To have the radar "fade out" over distance, you should use the radial gradient tool in your editor of choice: First, place the center of the radial gradient to the corresponding point on the map, then draw the gradient having it fade from 100% white to transparent. Then use masking techniques (or the eraser) to remove the portions that you don't want "light up" in the gradient.

It is a rather labour intensive work, but not sure if there's a better way.

Here's what I created a while back using this technique: http://www.pano.ie/virtual_tours/geraldine_28

4

Thursday, September 9th 2010, 7:01pm

Thank you, Run and floz! Very helpful info, exactly what I was looking for.

I will give it another try and update the thread with my success or failure.

5

Monday, September 13th 2010, 7:22pm

Success! I finally got it. Thanks to you both.

So just to explain to any Photoshop dummies like me out there, when you are creating the mask, the portion of the mask you want the sweep to show through should be white. The portion of the mask that hides the sweep should be transparent.

I think that's what tripped me up, the fact that transparency hides it and opacity lets it show through. It seems backward.

Similar threads