Results 1 to 9 of 9
  1. #1
    vastrolorde is offline Senior Member
    Join Date
    Jan 2013
    Posts
    124
    Rep Power
    0

    Default 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. #2
    zFollette is offline ▼ dafuq did I do?
    Join Date
    Dec 2013
    Posts
    203
    Rep Power
    0

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

    Quote Originally Posted by vastrolorde View Post
    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. #3
    vastrolorde is offline Senior Member
    Join Date
    Jan 2013
    Posts
    124
    Rep Power
    0

    Default 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. #4
    zFollette is offline ▼ dafuq did I do?
    Join Date
    Dec 2013
    Posts
    203
    Rep Power
    0

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

    Quote Originally Posted by vastrolorde View Post
    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.
    I can't help you on that one. Sorry.

  5. #5
    vastrolorde is offline Senior Member
    Join Date
    Jan 2013
    Posts
    124
    Rep Power
    0

    Default 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. #6
    Daryn is offline Senior Member
    Join Date
    Oct 2012
    Posts
    176
    Rep Power
    2

    Default 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. #7
    pj6444 is offline Senior Member
    Join Date
    Jan 2013
    Posts
    164
    Rep Power
    2

    Default 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. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,431
    Blog Entries
    7
    Rep Power
    20

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

    Quote Originally Posted by vastrolorde View Post
    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
    cenosillicaphobia: the fear for an empty beer glass

  9. #9
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,843
    Rep Power
    5

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

    Quote Originally Posted by Daryn View Post
    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.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. need help with space invader game
    By ChaosProjects in forum New To Java
    Replies: 6
    Last Post: 05-14-2013, 04:25 AM
  2. Replies: 7
    Last Post: 12-03-2012, 09:31 PM
  3. positioning on java applet
    By The original stinger in forum Java Applets
    Replies: 9
    Last Post: 01-07-2012, 10:21 AM
  4. Replies: 0
    Last Post: 11-04-2011, 01:36 PM
  5. Problem with Space Invaders Game
    By andyman99008 in forum New To Java
    Replies: 8
    Last Post: 12-19-2010, 09:20 PM

Posting Permissions

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