# Thread: Java 3D game: 3d space, camera positioning

1. Senior Member
Join Date
Jan 2013
Posts
124
Rep Power
0

## Java 3D game: 3d space, camera positioning

I dont have any code to show, because im still trying to figure out how to do it.

1: 3D space. How do i define the space where i will make my world? Is there a certain point that i will define as 0,0,0 or is there some other way.

2: Camera positioning. When i have the 3D space, how to i make it so that the camera will show that what i want it to show. Lets say il define its lokatios 30,50,100 and direction is NW, then how to i make it so that is see the SW direction from the point 30,50,100?

2. ▼ dafuq did I do?
Join Date
Dec 2013
Posts
204
Rep Power
0

## Re: Java 3D game: 3d space, camera positioning

Originally Posted by vastrolorde
I dont have any code to show, because im still trying to figure out how to do it.

1: 3D space. How do i define the space where i will make my world? Is there a certain point that i will define as 0,0,0 or is there some other way.

2: Camera positioning. When i have the 3D space, how to i make it so that the camera will show that what i want it to show. Lets say il define its lokatios 30,50,100 and direction is NW, then how to i make it so that is see the SW direction from the point 30,50,100?
Do you need to do this with java libraries? If not, use a different library, I just started to learn some LWJGL 3D programming.

3. Senior Member
Join Date
Jan 2013
Posts
124
Rep Power
0

## Re: Java 3D game: 3d space, camera positioning

Well id prefer to do this with java libaries, just for learning. To get a better understanding of how this works. I have the calculation to create 3D projection(only one variable needm ore research) and i have the calculation for camera rotation. Just need to know how to create the space and how to position camera so that it will show what i want i to show.

4. ▼ dafuq did I do?
Join Date
Dec 2013
Posts
204
Rep Power
0

## Re: Java 3D game: 3d space, camera positioning

Originally Posted by vastrolorde
Well id prefer to do this with java libaries, just for learning. To get a better understanding of how this works. I have the calculation to create 3D projection(only one variable needm ore research) and i have the calculation for camera rotation. Just need to know how to create the space and how to position camera so that it will show what i want i to show.

5. Senior Member
Join Date
Jan 2013
Posts
124
Rep Power
0

## Re: Java 3D game: 3d space, camera positioning

Anyone else? I would like to try and use quaternical formula and 3D projection formula... but i dont know how do i but the X Y Z coordinates in. Where to i get the space coordinates.

6. Senior Member
Join Date
Oct 2012
Posts
176
Rep Power
8

## Re: Java 3D game: 3d space, camera positioning

I am sorry to say that I dont believe java works in 3 dimensions althought if you watch this 3D Programming With Java Tutorial 3 - 2D Square to 3D Cube - YouTube it may help. I HAVE NOT WATCHED THIS VIDEO. Now althought I do not no any direct way to make 3d games, this is programming if you have the right know how anything is possible. Also you might want to try a game making software. I started on Unity that has extactly what you are asking for except you can only program in JavaScript,C#, and Python

7. Senior Member
Join Date
Jan 2013
Posts
168
Rep Power
8

## Re: Java 3D game: 3d space, camera positioning

Java does work in 3 dimensions. If you think about it, it's all about the perspective that you make. A cube is just six rectangular faces drawn at different perspectives. It is complex but 3d can be done with any language that has graphics.

8. ## Re: Java 3D game: 3d space, camera positioning

Originally Posted by vastrolorde
I dont have any code to show, because im still trying to figure out how to do it.

1: 3D space. How do i define the space where i will make my world? Is there a certain point that i will define as 0,0,0 or is there some other way.

2: Camera positioning. When i have the 3D space, how to i make it so that the camera will show that what i want it to show. Lets say il define its lokatios 30,50,100 and direction is NW, then how to i make it so that is see the SW direction from the point 30,50,100?
There are several possibilities: e.g. let your 3D model be somewhere near (0,0,0) and give your camera a location not at (0,0,0) 'aiming' towards (0,0,0); it doesn't matter where (0,0,0) is, it's an infinite 3D space and you define it anywhere you want it to be. An alternative is to position the camera at location (0,0,0) and the subject somewhere else, but I prefer the first alternative.

kind regards,

Jos

9. Just a guy
Join Date
Jun 2013
Location
Netherlands
Posts
5,114
Rep Power
12

## Re: Java 3D game: 3d space, camera positioning

Originally Posted by Daryn
I am sorry to say that I dont believe java works in 3 dimensions
Of course not, neither does your computer so why would any programming platform? This is about 3D projection, which is on a 2D surface in the form of your flat computer screen (or multiple 2D surfaces). And that's all math, it is not bound to any tool, OS, computer or programming platform - math is a universal language and tool. You could do it on your calculator if it is advanced enough to rasterize graphics. They did it on 8 mhz Amiga computers in the early 90's.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•