Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 629 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
3D Image Gallery #319322
04/14/10 02:54
04/14/10 02:54
Joined: Sep 2009
Posts: 84
Theil Offline OP
Junior Member
Theil  Offline OP
Junior Member

Joined: Sep 2009
Posts: 84
Hi there, thanks for reading, what I want to make is a 3D image gallery, where if you put the mouse pointer to the right side of it, it will start to roll to the left so you can select an image to view, the problem is that I don't know where to start, I don't have any level loaded because it's a 2d program and I don't want to load a level because everytime I load one level, the fps decreases, what should I do?

here's an animation of what I want to do



I hope you can help me.

Last edited by Theil; 04/14/10 02:59.
Re: 3D Image Gallery [Re: Theil] #319333
04/14/10 09:01
04/14/10 09:01
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
I can't believe that level_load(NULL); decreases the fps.
With 3DGS a 3D room (level) actually is the easiest way to achieve what you want.

Although, you could create so called view entities, and move them this way, they don't need a level, as far as I know. Don't know whether you can use ent_morphskin with them. ent_morphskin would come in handy when you want to switch pictures.
The easiest way is to create a model in MED with two flat surfaces, placed in the distance of the radius of your circle of pictures to the model's origin, and load it as a view entity.

EDIT:

Found the chapter about view entities:

http://www.conitec.net/beta/aentities-intro.htm

Last edited by Pappenheimer; 04/14/10 09:34.
Re: 3D Image Gallery [Re: Pappenheimer] #319394
04/14/10 18:02
04/14/10 18:02
Joined: Sep 2009
Posts: 84
Theil Offline OP
Junior Member
Theil  Offline OP
Junior Member

Joined: Sep 2009
Posts: 84
Hey thanks, that worked pretty well for me, I wasn't using a NULL level, now it works perfect, I also made every photo as a view entity with an entity on the center to orbit around it, here's the code:

reference_point.pan += 5*time_step;

photo_1.x = reference_point.x + 25 * sin(reference_point.pan);

photo_1.y = reference_point.y - 25 * cos(reference_point.pan);

photo_2.x = reference_point.x + 25 * sin(reference_point.pan + 36);

photo_2.y = reference_point.y - 25 * cos(reference_point.pan + 36);


Now I have one last question, I'm really bad with vectors and so, and I don't know how to do this but I want it to tilt a little like the picture I posted above, right now it looks like this:


one last thing is that every photo is facing the front view, the result I would like to achieve is like the one on the picture above.

I'm really thankful for your help, I need this as fast as I can because it's a prototype for the next week, sorry if I'm a little bit annoying but I'm still learning lite-C, BTW this forum is awesome, every time I log in, there's always an answer grin.

Last edited by Theil; 04/14/10 18:04.
Re: 3D Image Gallery [Re: Theil] #319432
04/14/10 21:05
04/14/10 21:05
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
This should work:

vec_to_angle (pictureentity.pan, pictureentity.x);

If the rotation center isn't 0,0,0 you have to use the difference between the center position and your entity position. Also, you might have to invert the pan angle after doing this in case it ends up being facing the wrong direction.

Re: 3D Image Gallery [Re: Lukas] #319445
04/14/10 22:33
04/14/10 22:33
Joined: Sep 2009
Posts: 84
Theil Offline OP
Junior Member
Theil  Offline OP
Junior Member

Joined: Sep 2009
Posts: 84
Hey thank you very much, that worked like a charm, this is what I did:

VECTOR temp;

vec_set(temp, photo_1.x);
vec_sub(temp,reference_point.x);
vec_to_angle(photo_1.pan, temp);

and that's it, works perfect, now the only thing left is the tilt, I don't really know how to do it, maybe some trigonometry calculation for it? I'm not good a trigonometry, and I found a few examples on trigonometry but not applied to game development.

Again thanks, awesome community the one that A7 has.:)

Re: 3D Image Gallery [Re: rendezvo] #319474
04/15/10 08:36
04/15/10 08:36
Joined: Sep 2009
Posts: 84
Theil Offline OP
Junior Member
Theil  Offline OP
Junior Member

Joined: Sep 2009
Posts: 84
I was messing around with the tilt and could not get anything, I think it has to do with the Z axis I don't know. I'd appreciate some help, I'm asking some help here because I don't really know what to do thanks.

Last edited by Theil; 04/15/10 10:02.
Re: 3D Image Gallery [Re: Theil] #319475
04/15/10 08:42
04/15/10 08:42
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
I would simply set the camera a bit above the circle of picture, and tilt it slightly.

Re: 3D Image Gallery [Re: Pappenheimer] #319486
04/15/10 09:50
04/15/10 09:50
Joined: Sep 2009
Posts: 84
Theil Offline OP
Junior Member
Theil  Offline OP
Junior Member

Joined: Sep 2009
Posts: 84
That doesn't work for me because they're view entities defined with ENTITY* instruction, and I already tried to define them with ent_create, but the photo is not showing even if I use set(photo_1,SHOW). Thanks for the quick replay.

Re: 3D Image Gallery [Re: Theil] #319489
04/15/10 10:02
04/15/10 10:02
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline

User
TSG_Torsten  Offline

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
Are you loading JPG-Images?
Because they're very memory-consuming, may you should also take a look how much memory your application needs, since this can also lead to slowdowns.

To your question:
If you're using view entities, I think tilt won't work (but I'm not sure about that). Why you don't span them as regular entities and setting the tilt?
If you use ent_create, make sure you create them at a xyz-position which is visible in the camera. You can press the "0" button in debug mode and move around the camera to see where your entities are created.

Regards
TSGames

Last edited by TSG_Torsten; 04/15/10 10:03.
Re: 3D Image Gallery [Re: TSG_Torsten] #319492
04/15/10 10:13
04/15/10 10:13
Joined: Sep 2009
Posts: 84
Theil Offline OP
Junior Member
Theil  Offline OP
Junior Member

Joined: Sep 2009
Posts: 84
I don't get to see anything, does it has to do with layers?, anyway I don't have any jpeg and the fps now is working just fine with level_load(NULL); the photos are 3d planes with a texture in it and I can get to tilt the planes, but I'm not getting the result as the picture shown above because it just moves the tilt of the photo, I want it to look as if the camera has some tilt in it, could the background image block the view of the camera? if the answer is yes, maybe that's what happening but I still don't know how to fix this.

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1