PDA

View Full Version : Aerial Las Vegas, Aerial University of Minnesota


edfink
03-02-2008, 07:25 PM
Hi all. My family is starting to get sick of looking at test versions of my FPP tours. (“Hurry! Come look at it again! The controls are 10% more transparent than they were twenty minutes ago, plus the onOver glow is blurrier now, and I moved the small buttons 5 pixels lower!”) :)

So I figured it’s time to post the links here.

University of Minnesota (4 aerial panos, but only one ground level pano)
http://BigEyeInTheSky.com/View.asp?CID=U_of_M

Las Vegas Larger tour than above (17 aerial and 35 ground-level panos), but with older lens and not as sharp as the U of M tour.
http://BigEyeInTheSky.com/View.asp?CID=Las_Vegas

Each aerial with all its linked ground-level panoramas and still photos are a single XML file, and each link to another aerial opens a new tour/xml file. Believe me, it would have GREATLY simplified things if I’d have kept each panorama as a separate page/xml, but I really love the Flash Fullscreen option, and opening a URL knocks it out of Fullscreen mode. This way, at least you can explore one aerial and whatever ground-level panos it links to while staying Fullscreen, and only fall out of Fullscreen mode when jumping to another aerial.

I did try loading all the Las Vegas panoramas as a single XML file, and it worked fine for me, but a couple of my beta testers had problems – maybe because the XML file alone was almost 1MB.

The biggest part of all this was the VBS scripting and DB work to generate the XML.

To me, it’s a lot faster and easier to position the hotspots in the equirectangular image in Photoshop. Plus, that’s the closest to my original workflow, which relied heavily on Photoshop layers. With some modifications I was able to reuse a fair amount of my old code, things like my “PositionaAllHelicopters” script that pulls GPS coordinates from the DB for all the linked aerials and calculates distance and bearing to each other, then positions all the helicopter icons in Photoshop.

I still have all my hotspots as uniquely numbered layers in Photoshop, where I can quickly drag them into position, but now they’re just placeholders. Instead of leaving them visible in the image, I run a script that gets the x/y for each hotspot layer, stores the position in an Access DB, and turns off the Photoshop layer before creating the QTVR. Then I run another script to read the DB and generate the XML to create (recreate?) each placeholder hotspot layer as an FPP hotspot.

I don’t know if I’m the only one with this kind of weird workflow - I just kind of “thunk it up” because I’m lazy and I’m looking for an easy way to deal with a lot of hotspots.

For now these aren’t visible from my home page, but as soon as I can get all my infrastructure in place I intend to switch my whole site over entirely to FPP.


Ed Fink
Ed@BigEyeInTheSky.com
http://BigEyeInTheSky.com

3rw1n
03-02-2008, 07:40 PM
Nice panos ed!

WideEyes
03-03-2008, 12:17 PM
Hi Ed

Thank you for taking me to Las Vegas. A place I have only seen in different movies, shows etc. It was great experiencing it :)

Have you ever considered selling your panoramas to different travel agencies in the world? I would imagine there is a great market for it. Perhaps if you combined it with Google Maps or something similar.

Best regards
Morten

discocandy
03-03-2008, 02:22 PM
I agree very cool work.:cool:
specially the Startrek one :)
Las Vegas.... my god they really lost it there :cool:

I love to see the neon graveyard (but that is job related)

http://www.vegas4visitors.com/attractions/detail/neongatt_photos.htm

Mindslave
03-03-2008, 04:01 PM
Looks very good Ed,
maby add lensflare plugin? :)

edfink
03-03-2008, 06:25 PM
Looks very good Ed,
maby add lensflare plugin? :)

I thought the lens flare would make the aerial more interesting - especially since half the picture is sky. I fooled around with the plugin, but I had problems with every lens flare appearing twice. I finally gave up until I have more time to figure out what I'm doing wrong or until there's an update that makes it work.

But - I am an optimist - I did add a lens flare placeholder layer to every one of the U of M and Las Vegas panoramas, so once I get the plugin working right I'll be able to regenerate new XML's that get the lens flare position from the placeholder.

That's also how I set the opening pan and tilt. In Photoshop I just drag the pan/tilt placeholder layer where I want it, and my script converts the x/y pixels to degrees and writes that to my DB, then when I generate the XML it gets the the pan / tilt settings from the DB.

Ed

3rw1n
03-03-2008, 08:48 PM
and my script converts the x/y pixels to degrees and writes that to my DB

Is there any open source version of your script or a similar one?

edfink
03-03-2008, 10:36 PM
Is there any open source version of your script or a similar one?

Most of the Photoshop stuff is right out of the Photoshop VBS script samples. Here's the main functions, but you'll still need code to open the document, loop through all your hotspot placeholders, calling GetLayerCenterInDegrees() for each layer, and writing the global variables gHSX and gHSY to a DB (or to your XML or wherever) for each layer.

It would probably be pretty easy to change the vbs to javascript if you'd rather work with that. And the code could be shortened by combining several functions into a single line, but then I'd be more likely to forget what did what. :)


Sub GetLayerCenterInDegrees()
Dim SourceBounds
Dim ObjectCenter
Dim RulerUnits
RulerUnits = appRef.Preferences.RulerUnits
appRef.Preferences.RulerUnits = 1 ' psPixels
'get current layer's bounds
SourceBounds = appRef.ActiveDocument.ActiveLayer.Bounds
'get the center of this layer in pixels
ObjectCenter = GetItemCenter(SourceBounds)
'convert pixels to degrees
gHSX=ObjectCenter(0)/(appRef.ActiveDocument.Width/360)
gHSY=ObjectCenter(1)/(appRef.ActiveDocument.Height/180)
'use + - degrees for FPP
If gHSY < 90 Then
gHSY = 90 - gHSY
Else
gHSY = (gHSY - 90)*-1
End If
If gHSX < 180 Then
gHSX = (180 - gHSX)*-1
Else
gHSX = gHSX - 180
End If
'don't remember why I rounded them -
'FPP must have choked on anything longer?
gHSX=Round(gHSX,2)
gHSY=Round(gHSY,2)
WScript.Echo appRef.ActiveDocument.ActiveLayer.Name & " layer center in + - degrees) is " & gHSX & ", " & gHSY
'return to original ruler units
appRef.Preferences.RulerUnits = RulerUnits
End Sub


Function GetItemCenter(ByVal SourceBounds)
' Get center of text item
Dim left
Dim top
Dim right
Dim bottom
Dim xCenter
Dim yCenter
left = SourceBounds( 0 )
top = SourceBounds( 1 )
right = SourceBounds( 2 )
bottom = SourceBounds( 3 )
xCenter = ( left + right ) / 2
yCenter = ( top + bottom ) / 2
GetItemCenter = Array( xCenter, yCenter )
End Function

3rw1n
03-04-2008, 11:27 AM
Thanks a lot Ed.

I'm not familiar with either vbs or javascript but I'll try to get something out of it.

cheathamlane
03-04-2008, 04:03 PM
Ed --

Thanks for posting your script. Cool stuff!

jschrader
03-04-2008, 07:56 PM
cool. and a very nice concept for the tour.
only thing missing is a night shot of the strip from the helicopter. ;)

cheers
juergen