Applications, Games, Tools, User libs and useful stuff coded in PureBasic
dige
Addict
Posts: 1247 Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:
Post
by dige » Sun Dec 04, 2016 9:13 am
Hi Olby,
I've tried to use a cylinder instead of a sphere for panorama images without sky and floor.
Code: Select all
CreateCylinder(0, -2, 1, 32, 32, 1)
MoveCamera(0, 0, 0, 0.25, #PB_Absolute | #PB_Local)
CameraLookAt(0, 0, 0, 0)
But I did no see anything. Only when I move the camera outside...
Do you have an idea?
Ciao dige
"Daddy, I'll run faster, then it is not so far..."
Olby
Enthusiast
Posts: 461 Joined: Mon Jan 12, 2009 10:33 am
Contact:
Post
by Olby » Tue Dec 06, 2016 7:33 pm
dige wrote: Hi Olby,
I've tried to use a cylinder instead of a sphere for panorama images without sky and floor.
Code: Select all
CreateCylinder(0, -2, 1, 32, 32, 1)
MoveCamera(0, 0, 0, 0.25, #PB_Absolute | #PB_Local)
CameraLookAt(0, 0, 0, 0)
But I did no see anything. Only when I move the camera outside...
Do you have an idea?
Ciao dige
You need to use negative values for both height and radius:
Code: Select all
CreateCylinder(0, -1, -2, 32, 32, 0)
Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64)
dige
Addict
Posts: 1247 Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:
Post
by dige » Wed Jan 04, 2017 10:17 am
yes, thats it - now it works
thank you Olby!
I've also included a Snapshot function:
Code: Select all
ElseIf KeyboardPushed(#PB_Key_F12)
If CreateRenderTexture(1, CameraID(0), w, h)
UpdateRenderTexture(1)
; savefile = GetHomeDirectory()
; savefile + "Pictures\"
; savefile + FormatDate("%YY%MM%DD_%HH%II%SS", Date()) + "_Snap.JPG"
savefile = SaveFileRequester("Snapshot speichern", FormatDate("%YY%MM%DD_%HH%II%SS", Date()) + "_Snap.JPG", "Bilddatei (*.jpg)|*.jpg;.png;.tga|Alle Dateien (*.*)|*.*", 0)
If savefile <> ""
SaveRenderTexture(1, savefile)
EndIf
If IsTexture(1)
FreeTexture(1)
EndIf
EndIf
EndIf
"Daddy, I'll run faster, then it is not so far..."
Mesa
Enthusiast
Posts: 345 Joined: Fri Feb 24, 2012 10:19 am
Post
by Mesa » Thu Jan 05, 2017 11:08 am
I've had to change the camera to
Code: Select all
If CreateRenderTexture(1, CameraID(0), w, h, #PB_Texture_CameraViewPort)
to avoid a crash
M.
Mesa
Enthusiast
Posts: 345 Joined: Fri Feb 24, 2012 10:19 am
Post
by Mesa » Fri Jan 06, 2017 11:17 am
I would like to add the letter "N" for North etc... but my code crash:
I've replaced
Code: Select all
CreateEntity(0,MeshID(0),MaterialID(0))
by
Code: Select all
CreateEntity(0,MeshID(0),MaterialID(0))
N=CreateText3D(10, "North")
Text3DColor(10, RGBA(255, 0, 0, 255))
AttachEntityObject(0, "", Text3DID(10),0,0,1,0,0,0)
An idea ?
M.
dige
Addict
Posts: 1247 Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:
Post
by dige » Tue Jan 10, 2017 10:42 am
@Mesa: Thank you very much!!
Mesa wrote: I've had to change the camera to
Code: Select all
If CreateRenderTexture(1, CameraID(0), w, h, #PB_Texture_CameraViewPort)
to avoid a crash
M.
"Daddy, I'll run faster, then it is not so far..."
koyglreg
New User
Posts: 2 Joined: Sat Jan 28, 2017 9:24 pm
Post
by koyglreg » Sat Jan 28, 2017 9:36 pm
Hey Olby! I really like your StreetView Grabber program! I want to suggest a simple feature. I'd like the option to put lat/long data in the output image name.
Instead of: q5N_oPn2gAS1ohKOVeGeIA_welded.png
We could get something like this: 35.9103923,-116.5805978_q5N_oPn2gAS1ohKOVeGeIA_welded.png
Then I could easily keep track of where the panoramas are located geographically.
Again, great work!
koyglreg
New User
Posts: 2 Joined: Sat Jan 28, 2017 9:24 pm
Post
by koyglreg » Fri Feb 03, 2017 9:32 pm
I figured out how to get any Street View panorama ID with just latitude and longitude coordinates. The following link will return a JSON file containing the panoid:
https://cbks0.google.com/cbk?cb_client= ... &radius=50
Except it returns an empty JSON anytime the coordinates are a
non-road , even though it officially has Street View, such as the Israel trail:
https://cbks0.google.com/cbk?cb_client= ... &radius=50
Why won't it work for
all Street View panoramas? What am I missing? Somebody help me?
P.S.: I can download any panorama by panoid in Olby's program (including non-roads), but I want to make a script that will grab panoids according to coordinates in a GPX file.