getting DAZ files into c++

csandhmechcsandhmech Posts: 8
edited December 1969 in New Users

I couldnt find this topic listed in the forums anywhere so hopefully I am not repeating a topic. How do I go about loading a DAZ file into my c++ programs? I have seen other forums around the web that say about using the .obj file. I know DAZ will export things into .obj files but c++ can not open them. I havent found any libraries that can open them either. There must be a way to do it, I just have no idea what that way is. I want to make a scene, building, person, etc... in DAZ and get it into c++ program I make with Visual Studio 2013. What is the better way to do such a thing? Thanks.

Comments

  • JimmyC_2009JimmyC_2009 Posts: 8,891
    edited December 1969

    I don't think that Visual Studio will import 3D Scenes. If it did, what would you do with them there?

    I think you are maybe confused about the OBJ format? There are files called 'OBJ' used in programming languages, that are binary files usually called object modules. They can be linked together to form an executable file (program)

    What DAZ Studio exports, is 'Wavefront OBJ' which is a simple text file which describes a 3D mesh object, a figure or a prop or building etc.

    Can visual studio open Wavefront OBJ?

    Some idea of what you are trying to achieve would help?

  • csandhmechcsandhmech Posts: 8
    edited December 1969

    Thanks for the response. No, VS cant seem to open the exported .obj files. I tried but got an error that it had no idea what an .obj file was. I had found some .obj loaders that were for the wavefront type but were for Blender, which I do not have. I was hoping for a nice straight forward way to make something, say a building for example, in DAZ as it does a wonderful job for creating things, and loading it into a c++ program. Maybe make a town to run around in with DAZ and load the map into c++. I found a program that creates 3D objects, people, buildings, what have you, and exports them as an .iwf file which will work but the software is horrible. DAZ is just so much easier to use, does a nicer job, and looks a million times better. Other then just making nice stuff to look at and do nothing with, I havent found a reason to do anything with DAZ unfortunately. I cant do anything with anything I create. Sure I can export a render as a jpeg and get that into a program but thats not what I want to do. I am by no means a master of c++ or DAZ so I was just hoping I was missing something.

  • JimmyC_2009JimmyC_2009 Posts: 8,891
    edited December 1969

    DAZ Studio can export to a number of other formats, like Collada (.DAE) and FBX, and these kind of files can be used in other 3D programs, like 3DS Max or Maya or Lightwave, but how you would use them in a program that you wrote yourself I really don't know.

    To write a program that loaded 3D models, and allowed the user to move around in a 3D scene would be quite an undertaking I think. It would be similar to some of the Game engines that are around, and they are highly complex.

    I think you would be best to ask on a VC forum about any code libraries that are available to do what you want, OBJ is the industry standard, but it only describes the mesh itself (a static mesh) , and would not allow characters to move or pose. FBX and Collada allow for rigging to be exported as well, and they may be of more use.

  • Cross22Cross22 Posts: 66
    edited December 1969

    I couldnt find this topic listed in the forums anywhere so hopefully I am not repeating a topic. How do I go about loading a DAZ file into my c++ programs? I have seen other forums around the web that say about using the .obj file. I know DAZ will export things into .obj files but c++ can not open them. I havent found any libraries that can open them either. There must be a way to do it, I just have no idea what that way is. I want to make a scene, building, person, etc... in DAZ and get it into c++ program I make with Visual Studio 2013. What is the better way to do such a thing? Thanks.

    C++ has no notion of graphics. You would need to write your own graphics engine in C++ (using OpenGL or DirectX) or use higher level graphics libraries (e.g. Ogre3D). Once you have those things in place you need to figure out how your library of choice imports 3D objects/meshes. DAE (Collada) and FBX are the current standards. OBJ is a simpler/older format that is also widely supported.

    Aside from the technical issues there are also legal restrictions. DAZ3D does not allow you to use their models in (public) games. There's an extra fee for that: http://www.daz3d.com/indie-game-developer-license

  • csandhmechcsandhmech Posts: 8
    edited December 1969

    I am neither smart enough nor have enough time to do this for a living, so no chance of me making games using DAZ stuff that I would sell. If I live to 1000, I might be able to make one good enough for myself just to say I did it. Im simply learning C++ and game creation because its extremely interesting and I want to. Hats off to anyone who can do this, I enjoy playing video games and usually spend more time searching around the game world checking out the images then playing the game itself. The saying "if it were easy, anyone would do it" certainly can be applied to making a game it seems. Thanks for the answers everyone who responded. I had tried both openGL and DirectX as solutions but didnt get too far. That is just due to my lack of knowledge on the subject, I am sure. I am learning this all in my spare time and have found some very good places on the web to learn, but I am not a patient person. I will check out the libraries as suggested and fool around a bit more with DirectX and openGL and do more research. Thanks again!

  • Cross22Cross22 Posts: 66
    edited December 1969

    I really like your attitude :coolsmile:

    For OpenGL I highly recommend working through NeHe's tutorials. They are outdated (OpenGL 2) but the basic principles still apply and the knowledge carries over if you switch to a full-fledged graphics engine :
    http://nehe.gamedev.net/tutorial/lessons_01__05/22004/

    Keep in mind that getting an initial 3D scene on screen is the hardest part. Once that is done everything else is incremental improvements that are more enjoyable.

  • kaotkblisskaotkbliss Posts: 2,914
    edited December 1969

    Since you want to learn, but don't have the time to create a game engine from scratch (who does really? it take big game companies with teams of people years to build a game engine) I would suggest finding an already established game engine and playing with that.

    I'm currently using gamemaker studio for small simple 2D games (isometric 2D made to look 3D) But I know Unreal has one of their game engines available for free for personal use and might be a good place to learn without the wasted years of trying to build your own engine.

  • Herald of FireHerald of Fire Posts: 3,504
    edited December 1969

    If you use DirectX there are functions included which will load an OBJ file into memory. If you use OpenGL, you will need to create your own loader or use an existing one. There are countless examples on SourceForge.net. Just be aware that an OBJ is a static model without rigging information. It would be a lot harder to use pure code to set up rigging on a figure than it is to simply load in a pre-rigged figure.

    If you're looking to learn how to code in 3D, I'd suggest starting small though. The OpenGL Utility Toolkit (or GLUT) has some good tools for beginners, including easy ways to set up the necessary matrices for cameras and scene objects. It's how I started coding in 3D before I moved into DirectX.

  • deloquenciadeloquencia Posts: 46
    edited December 1969

    I am neither smart enough nor have enough time to do this for a living, so no chance of me making games using DAZ stuff that I would sell. If I live to 1000, I might be able to make one good enough for myself just to say I did it. Im simply learning C++ and game creation because its extremely interesting and I want to...


    To start game development, csandhmech take a look at Unity3D, It's a framework and studio for game development with a 3D editor and programming capabilities. Among others you can code in C# (Microsofts dialect of C) and also import 3d objects either in OBJ or Collada from DAZ Studio and a like. The community version is free of any charge.

    Good luck and see your game soon (:

Sign In or Register to comment.