Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: Kweepa on Sat 08/08/2009 21:30:46

Title: MODULE: Panorama3d v1.3
Post by: Kweepa on Sat 08/08/2009 21:30:46
Panorama3d module
for AGS v2.72+

Creates a 3d rotatable room from a sky box texture. (http://images.google.com/images?q=sky+box+texture)

This:                                                                           From this:
(http://www.kweepa.com/step/ags/tech/Panorama3d.jpg) (http://www.kweepa.com/step/ags/tech/Heartland360.jpg)
(Image courtesy of LimpingFish)

Instructions in the script header.
Download:
http://www.kweepa.com/step/ags/tech/Panorama3d13.zip
Demo:
http://www.kweepa.com/step/ags/tech/Panorama3dDemo2.zip
Video on youtube:
http://www.youtube.com/watch?v=d1I3UDLyyrY

Version history:
1.0 Initial version
1.1 High quality rendering when not looking around
1.2 Added support for AGS 2.72
1.3 Alternate control scheme for laptops - click and drag to look around

Enjoy!
Steve
Title: Re: MODULE: Panorama3d v1.0
Post by: Ryan Timothy B on Sat 08/08/2009 21:45:56
Wow, that is super impressive!  It's relatively fast too considering what it's doing.
The big question though, is how would someone go about making a rotatable room image?

Great work anyway! Hopefully someone puts it to good use.
Title: Re: MODULE: Panorama3d v1.0
Post by: monkey0506 on Sat 08/08/2009 21:52:01
So if I understand the difference between this and the Panorama module is that this would support looking up and down as well, right?
Title: Re: MODULE: Panorama3d v1.0
Post by: LimpingFish on Sat 08/08/2009 22:15:42
Yay! This is the bees knees!

Quote from: monkey_05_06 on Sat 08/08/2009 21:52:01
So if I understand the difference between this and the Panorama module is that this would support looking up and down as well, right?

Yep. Your characters can now sport workable necks! I can picture lots of excursions into lofts and basements. Or up/down stairs!

Quote from: Ryan Timothy on Sat 08/08/2009 21:45:56
The big question though, is how would someone go about making a rotatable room image?

Any good 3D package, and the correct output settings when rendering (position your camera - with a FOV of 90 degrees and an aspect ratio of 1:1 - in the center of your room, and render a 320x320 image for each of the six required views), will do. It's then just a case of stitching the images together in Photoshop (or Gimp, etc) and importing the resulting 1280x920 image into AGS.

I've only been playing with the module for half an hour, and I can tell you it's just as simple to use as the old one.

Great work, Steve.
Title: Re: MODULE: Panorama3d v1.0
Post by: Kweepa on Sun 09/08/2009 21:25:47
Updated first post with super-exciting youtube video link!
http://www.youtube.com/watch?v=d1I3UDLyyrY
Title: Re: MODULE: Panorama3d v1.0
Post by: monkey0506 on Sun 09/08/2009 22:44:50
Does this support repositioning the camera or just panning it? I presume the latter.
Title: Re: MODULE: Panorama3d v1.0
Post by: Kweepa on Sun 09/08/2009 23:46:21
Quote from: monkey_05_06 on Sun 09/08/2009 22:44:50
Does this support repositioning the camera or just panning it? I presume the latter.
Yes, you can only turn and pitch the camera.

New version uploaded (and new demo) with high quality rendering when you stop looking around. :=
Title: Re: MODULE: Panorama3d v1.0
Post by: Brad Newsom on Mon 10/08/2009 02:50:42
Quote from: SteveMcCrea on Sun 09/08/2009 23:46:21
Quote from: monkey_05_06 on Sun 09/08/2009 22:44:50
Does this support repositioning the camera or just panning it? I presume the latter.
Yes, you can only turn and pitch the camera.

New version uploaded (and new demo) with high quality rendering when you stop looking around. :=

Sweet. I wanted to make a prototype of sorts which required a spherical Panoramic environment with the ability to reposition the camera when clicking on a hotspot (movement) then play a movement video.

All in High Resolution goodness.

Thanks again for this module. It did everything I needed it to do for my small project.
Title: Re: MODULE: Panorama3d v1.0
Post by: Dataflashsabot on Wed 12/08/2009 17:43:01
Any chance of a 2.72 version? (module is awesome, tested it in 3.whatever and it was brilliant, but I prefer 2.whatever for actually making games in.)
Title: Re: MODULE: Panorama3d v1.0
Post by: Kweepa on Thu 13/08/2009 00:25:53
Quote from: Dataflashsabot on Wed 12/08/2009 17:43:01
Any chance of a 2.72 version? (module is awesome, tested it in 3.whatever and it was brilliant, but I prefer 2.whatever for actually making games in.)
I'd rather not have to keep two versions in sync and supported.
I've used 3.x scripting extensively in this module.
If you want to use it I'm afraid you'll have to convert it yourself, or upgrade to 3.x for the project! Don't be scared, it's well worth it!
Title: Re: MODULE: Panorama3d v1.0
Post by: Kweepa on Fri 14/08/2009 19:28:12
Quote from: Dataflashsabot on Wed 12/08/2009 17:43:01
Any chance of a 2.72 version? (module is awesome, tested it in 3.whatever and it was brilliant, but I prefer 2.whatever for actually making games in.)
2.72 support added. Enjoy!
Title: Re: MODULE: Panorama3d v1.3
Post by: Kweepa on Mon 17/08/2009 01:22:26
Version 1.3 up.
Added a click and drag to turn control scheme, similar to browser based Panorama viewers. Good for touch pad control on laptops.
Title: Re: MODULE: Panorama3d v1.3
Post by: Brad Newsom on Mon 24/08/2009 11:33:05
Is it possibe for you to supply the demo in editable format?
Title: Re: MODULE: Panorama3d v1.3
Post by: Kweepa on Mon 24/08/2009 13:48:09
Quote from: Brad Newsom on Mon 24/08/2009 11:33:05
Is it possible for you to supply the demo in editable format?

Sure, try this:
http://www.kweepa.com/step/ags/tech/Panorama3dDemoSrc.zip

Can I ask why you need the source to the game? Is there something hard to follow (or missing) in the instructions?
Title: Re: MODULE: Panorama3d v1.3
Post by: Brad Newsom on Mon 24/08/2009 23:02:53
Well, I need a point of reference. The last time I programmed in AGS was back in version 1.3.

My confusion was the whole room_Load function. I have no idea where it is, and anything that came close to it gave me errors. So, i'm going to disassemble the source and see how things work.

*Facepalm* Okay. I'm stupid. I forgot to open and close at the end of the function calls. >_<

Edit: Okay, thats the least of the problems. I do as told in both  basic and empty projects. When you run the project, the game starts but you can't drag around or move. It also starts in a blank spot of the background image. I noticed a lot of code within the global variables of your example. Also I noticed how the project is set to 320x240, yet the window is much larger. Why is that?
Title: Re: MODULE: Panorama3d v1.3
Post by: Kweepa on Tue 25/08/2009 03:42:20
I'm going to assume you're using AGS 3.

Did you follow these instructions (from the header?)

// Import this script module

I assume you did this :)
But for someone else following along at home, just open a new project using the default template (not the empty template) and in the top right pane, right click on Scripts, select Import Script... and then select the Panorama3d.scm file. I recommend also double clicking on General Settings and selecting colour depth of 16 or 32 bit and resolution of 320x240 on the left hand side.


// Set the player coordinates to 0,0

This is important because the room background is larger than the screen. If the player is left at the default position, the viewport on the background is scrolled to try to center the player, whereas the code draws the 3d view at the top left of the room background. To set the player position, open the Characters section on the right and double click on cEgo. In the property section below, in the Design sub section, set StartX and StartY to 0.


// Import the cube map for the background
// Create a new background frame in the room and import the cube map again

Open the Rooms section on the right, and then the 1: sub section. Double click on Edit Room. In the panel on the left, click the "Change..." button next to the "Main background" button and select your cube map. Then press the "Main background" button and select <Import new background...>, then select the cube map again.


// Set the background animation delay to 0 (to stop animating)
// Set ShowPlayerCharacter to false

Go to the properties pane in the bottom right, and in the Settings section, set the BackgroundAnimationDelay to 0. Then double click on ShowPlayerCharacter to toggle it to False.
This is to stop the 2d player being drawn on top of the 3d view.


// From the room_Load function, call Panorama3d.CreateFromBackground and Panorama3d.Enable
// From the room_repExec function, call Panorama3d.StandardLookAround()
//                                   or Panorama3d.TurnRelativeToOrigin(Mouse.IsButtonPressed(eButtonLeft), 2060)
//                                                                                    sprite drawn at origin ^

Click the little lightning bolt underneath the "(Room; number 1)" button, and in the Events section below, click on the "Enters room before fade-in" line. Then click on the "..." button on the right. This pops up the room_Load function in the editor window on the left. Paste this code into the function:

  Panorama3d.CreateFromBackground();
  Panorama3d.Enable();

Double click on "Edit room" in the top right pane again.
Click on the "Repeatedly execute" event line in the bottom left pane, then click on the "..." button to bring up the code editor. Paste this code where the cursor is placed, in the room_RepExec function:

  Panorama3d.TurnRelativeToOrigin(Mouse.IsButtonDown(eMouseLeft),  2060);


Now press F5 to compile and test the game!

Quote from: Brad Newsom on Mon 24/08/2009 23:02:53
My confusion was the whole room_Load function. I have no idea where it is, and anything that came close to it gave me errors. So, i'm going to disassemble the source and see how things work.
This is probably where things went wrong. You need to create these functions through the editor (by pressing the "..." button in the event section) before you can use them in the room script.

Quote
Also I noticed how the project is set to 320x240, yet the window is much larger. Why is that?
This is because the image needed to create the 320x240 is much larger - it needs to include the details all around, not just in the direction you're currently facing.

Hope this helps!
Steve
Title: Re: MODULE: Panorama3d v1.0
Post by: on Tue 25/08/2009 13:41:41
Quote from: SteveMcCrea on Fri 14/08/2009 19:28:12
Quote from: Dataflashsabot on Wed 12/08/2009 17:43:01
Any chance of a 2.72 version? (module is awesome, tested it in 3.whatever and it was brilliant, but I prefer 2.whatever for actually making games in.)
2.72 support added. Enjoy!

LOL and after saying you wouldn't... Good, I'll check this out now, looks like it could be useful! :)
Title: Re: MODULE: Panorama3d v1.3
Post by: Dualnames on Tue 25/08/2009 14:45:33
Steve, the module is perfect don;t get me wrong okay? But the "refresh rate" when you turn the camera strikes a little odd, you know when the pixels get shaped up. Is there any way to "fix" this? or it's just AGS doing it? It's not bad or anything but when you stop moving the screen two lines appear and go from the left to the right like google earth.
Title: Re: MODULE: Panorama3d v1.3
Post by: Kweepa on Tue 25/08/2009 15:15:40
Quote from: Dualnames on Tue 25/08/2009 14:45:33
It's not bad or anything but when you stop moving the screen two lines appear and go from the left to the right like google earth.
Yes, that's the high quality rendering being done in stages. AGS scripting isn't quite fast enough to visit every pixel every frame, so when looking around I render 16 pixels at a time in 4x4 blocks. Then when you stop, I paint in the pixels one at a time. There's not a lot I can do about it.
Title: Re: MODULE: Panorama3d v1.3
Post by: Dualnames on Tue 25/08/2009 15:20:52
Quote from: SteveMcCrea on Tue 25/08/2009 15:15:40
Quote from: Dualnames on Tue 25/08/2009 14:45:33
It's not bad or anything but when you stop moving the screen two lines appear and go from the left to the right like google earth.
Yes, that's the high quality rendering being done in stages. AGS scripting isn't quite fast enough to visit every pixel every frame, so when looking around I render 16 pixels at a time in 4x4 blocks. Then when you stop, I paint in the pixels one at a time. There's not a lot I can do about it.

Okay, that's what I wanted to know. It's really cool, I'm not complaining. :D
Title: Re: MODULE: Panorama3d v1.3
Post by: Cpt Ezz on Tue 01/09/2009 07:19:47
Please someone kick me in the gonads if this sounds unbelievably hard or stupid but is they a possiblity that you can 'Walk' around as well so the camera moves closer to a wall.....that would be soooo awesome(finally a complete 3d ags game coming if so)

DON"T GET ME WRONG THIS MODULE IS AWESOME!!!!!!! just it would be cool
Title: Re: MODULE: Panorama3d v1.3
Post by: LimpingFish on Tue 01/09/2009 20:20:58
Short answer...no. :)
Title: Re: MODULE: Panorama3d v1.3
Post by: Brad Newsom on Tue 01/09/2009 21:20:49
Quote from: Cpt Ezz on Tue 01/09/2009 07:19:47
Please someone kick me in the gonads if this sounds unbelievably hard or stupid but is they a possiblity that you can 'Walk' around as well so the camera moves closer to a wall.....that would be soooo awesome(finally a complete 3d ags game coming if so)

DON"T GET ME WRONG THIS MODULE IS AWESOME!!!!!!! just it would be cool

Then use the other 3d modules.
Title: Re: MODULE: Panorama3d v1.3
Post by: Cpt Ezz on Thu 03/09/2009 09:49:16
Ok then.....but the thing that i have found with the other one is that it is glitchy and i just HATE the squareness of it
Title: Re: MODULE: Panorama3d v1.3
Post by: Brad Newsom on Mon 07/09/2009 21:07:07
Quote from: Cpt Ezz on Thu 03/09/2009 09:49:16
Ok then.....but the thing that i have found with the other one is that it is glitchy and i just HATE the squareness of it

Its only square if you model things square.
Title: Re: MODULE: Panorama3d v1.3
Post by: eri0o on Mon 21/03/2022 18:56:35
Does anyone have this module archived? Thanks!
Title: Re: MODULE: Panorama3d v1.3
Post by: Mehrdad on Tue 22/03/2022 05:28:43
@eri0o

Here you are
https://www.dropbox.com/s/j49gl1yl6jrhol0/Panorama3d13.rar?dl=0
Title: Re: MODULE: Panorama3d v1.3
Post by: eri0o on Tue 22/03/2022 15:49:27
Thank you Mehrdad! :D I will later also upload a copy in my module list just so I don't lose it. :)
Title: Re: MODULE: Panorama3d v1.3
Post by: keithfishbiscuit on Sat 24/02/2024 07:46:20
Hi, newbie here, stumble upon this subform, though don't think I am making any commercial game with AGS plus with this panorama3d module, but would love to know about the license information... and may I also ask if it support HD grade graphic panorama image file?? thanks in advance