• Lucid Dreaming - Dream Views




    Results 1 to 16 of 16
    1. #1
      Ex Tech Admin Achievements:
      Created Dream Journal Tagger First Class Veteran First Class 10000 Hall Points Populated Wall Referrer Gold Made lots of Friends on DV
      slash112's Avatar
      Join Date
      Nov 2008
      Gender
      Location
      Sunny Scotland
      Posts
      5,113
      Likes
      1567
      DJ Entries
      29

      is there a way to do this on C++?

      ive got 3d modelling software. ive modelled a car.

      is there a way to get that 3d model into a game?

      like using the .c4d file and call it into the program?

      or would you have to render it in a special way, or would you have to get the model file into a different format? (.obj?)


      p.s. im not saying i could program a game, i just want to know if it is possible, and how to do it.
      its just i might learn C++ at some point in my life and it would be great if i could use my own models and put them in games when the time comes

    2. #2
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      Yes, it's possible

      What you would need to do is write a library to render 2D images from the 3D model, depending on the camera position
      (\_ _/)
      (='.'=)
      (")_(")

    3. #3
      Ex Tech Admin Achievements:
      Created Dream Journal Tagger First Class Veteran First Class 10000 Hall Points Populated Wall Referrer Gold Made lots of Friends on DV
      slash112's Avatar
      Join Date
      Nov 2008
      Gender
      Location
      Sunny Scotland
      Posts
      5,113
      Likes
      1567
      DJ Entries
      29
      oh right. so i couldnt just call up the .c4d file?

      although, i saw this thing one time, and its like rendering every possible angle or something. cause you can open it up in realplayer or something and you can move it about and look at it from what ever angle you want. i though maybe that would have something to do with it.

      so what you are saying is i would render images of the angles i may need in the game, like the back of the car, and slightly angled to the side for turning etc?

    4. #4
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      What I'm saying, is you'll need to write (or use something already written) to load in the model files and manipulate the information programatically

      Code:
      class 3d_model
      {
      public:
          3d_model();
          ~3d_model();
      
          void open(const char *file);
          void close();
      
          2d_image *render(int camera_x, int camera_y, int camera_z);
      
      }
      Ninja's probably the best person to speak to
      I hardly ever deal with graphics
      (\_ _/)
      (='.'=)
      (")_(")

    5. #5
      Ex Tech Admin Achievements:
      Created Dream Journal Tagger First Class Veteran First Class 10000 Hall Points Populated Wall Referrer Gold Made lots of Friends on DV
      slash112's Avatar
      Join Date
      Nov 2008
      Gender
      Location
      Sunny Scotland
      Posts
      5,113
      Likes
      1567
      DJ Entries
      29
      oh right ok. so you would use the model file.

    6. #6
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      Quote Originally Posted by Ynot View Post
      Ninja's probably the best person to speak to
      I hardly ever deal with graphics
      Yay, my first plug.

      Yes, however you don't want to do the rendering in C++, you want to let the graphics card do it for you. The number of vertices on screen at any given time in most renders is in the thousands and all of those calculations would take ages to do in software.

      The best way to talk to your graphics card is OpenGL. Unfortunately, OpenGL has no standard file format and has no file loaders. They were supposed to in 3.0, but it didn't happen, so for a beginner, DirectX might be better.

      I'll stick with OpenGL because that's what I know. You need to load your file in, the obj file is easiest, but they're all pretty similar, and put in in a Vertex Array. This is what OpenGL uses to render things.

      Google NeHe, those guys have a lot of great OpenGL tutorials.
      The steps that are required for your situation is this:

      Set up your OpenGL canvas (GLUT is the standard, but 12 years old.)
      Turn on texturing, lighting, and other effects that you want
      Load your data
      Set up your camera (glProjection is the mode that you want)
      Position your camera
      Render


    7. #7
      Ex Tech Admin Achievements:
      Created Dream Journal Tagger First Class Veteran First Class 10000 Hall Points Populated Wall Referrer Gold Made lots of Friends on DV
      slash112's Avatar
      Join Date
      Nov 2008
      Gender
      Location
      Sunny Scotland
      Posts
      5,113
      Likes
      1567
      DJ Entries
      29
      cool thanks a lot.

      ill see if i can get openGL, ive heard so much about it

    8. #8
      Ex Tech Admin Achievements:
      Created Dream Journal Tagger First Class Veteran First Class 10000 Hall Points Populated Wall Referrer Gold Made lots of Friends on DV
      slash112's Avatar
      Join Date
      Nov 2008
      Gender
      Location
      Sunny Scotland
      Posts
      5,113
      Likes
      1567
      DJ Entries
      29
      im having trouble finding openGL. where could i find it?

    9. #9
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      http://www.opengl.org/wiki/Getting_started

      The Windows version is not kept up to date so MESA3D is probably the distribution that you want. The OpenGL community releases versions for the high priority platforms first, and Windows is not high priority.

    10. #10
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      Quote Originally Posted by ninja9578 View Post
      The OpenGL community releases versions for the high priority platforms first, and Windows is not high priority.
      Btw, before anyone dismisses this ^^^ as twaddle, remember that 3D graphics are used in far more than just games

      OpenGL is used in medical imaging equipment, CAD and modeling software, etc. etc.

      Games (or any leisure activity) are fairly low down on the list of importance, when up against serious professional use-cases in the same area

      and no-one runs medical equipment under Windows, hence the bias toward Unix systems

      just thought I'd clarify that....
      (\_ _/)
      (='.'=)
      (")_(")

    11. #11
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      Games are fairly high up on the list, however most people often forget that Windows isn't even close to being the dominate platform for gaming, the Wii is, followed by the PS2, then the PS3. You don't see any Microsoft gaming platforms until way way down the list.

      There priority list looks something like this:
      Sun and Apple products (These are the two major developers of OpenGL)
      Medical and critical hardware (These are the major financial backers of OpenGL)
      Linux (Biggest target, almost every phone in the world runs Linux and embedded OpenGL)
      High priority game platforms
      Windows

      Actually, starting with 3.0, Glu has officially dropped Windows from their list of supported platforms, so also download MESA
      Last edited by ninja9578; 08-11-2009 at 10:22 PM.

    12. #12
      Ex Tech Admin Achievements:
      Created Dream Journal Tagger First Class Veteran First Class 10000 Hall Points Populated Wall Referrer Gold Made lots of Friends on DV
      slash112's Avatar
      Join Date
      Nov 2008
      Gender
      Location
      Sunny Scotland
      Posts
      5,113
      Likes
      1567
      DJ Entries
      29
      thanks for the help guys.

      and woh, i didnt think the list would be like that!

      and i think im going to start learning C++ before i get into all that openGL stuff.

    13. #13
      Banned
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,864
      Likes
      386

    14. #14
      Ex Tech Admin Achievements:
      Created Dream Journal Tagger First Class Veteran First Class 10000 Hall Points Populated Wall Referrer Gold Made lots of Friends on DV
      slash112's Avatar
      Join Date
      Nov 2008
      Gender
      Location
      Sunny Scotland
      Posts
      5,113
      Likes
      1567
      DJ Entries
      29
      Quote Originally Posted by A Roxxor View Post
      thanks, that seems a good site

    15. #15
      Banned
      Join Date
      May 2007
      LD Count
      Loads
      Gender
      Location
      Digital Forest.
      Posts
      6,864
      Likes
      386
      www.daniweb.com also has lots of in-depth tutorials on STL objects and functions, among other IT-related things.

    16. #16
      Ex Tech Admin Achievements:
      Created Dream Journal Tagger First Class Veteran First Class 10000 Hall Points Populated Wall Referrer Gold Made lots of Friends on DV
      slash112's Avatar
      Join Date
      Nov 2008
      Gender
      Location
      Sunny Scotland
      Posts
      5,113
      Likes
      1567
      DJ Entries
      29
      nice, ive got a fair wee selection of tutorial websites now. although ive lost the bookmark from my original one, so i cant find that one, so im glad you guys helped me out there.

      thanks

    Bookmarks

    Posting Permissions

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