Converting from Direct3D to OpenGL

Started by
7 comments, last by JimboC 20 years, 8 months ago
Question #1: I''m using Linux more and more on my home PC and I was starting to think about switching from DirectX to OpenGL. I''m not an expert with DirectX by any stretch of the imagination, but I''ve been playing around with it a since version 5 and I would say I have a good working knowledge of it. Would I be looking at a large learning curve to switch to OpenGL and other ''Open'' APIs? Question #2: I''ve been using .X files for my models, mostly because DirectX has some fairly straight forward ways to use them. I''ve got 3D Studio Max 3.1 (haven''t been able to keep up with the updates), which had a few .X exporters. Is there something similar I can use with OpenGL that provides for character animation and the like? Question #3: Is there a program similar to 3D Studio Max that works under Linux? Come springtime I''ll have money to either upgrade 3D Studio Max or get a different package that works under Linux or X-Windows. Anyone have a package they user for this?
Advertisement
If you are using OpenGL its very easy to switch to Direct 3D. I''m not so sure that the opposite is true; it really depends what features you use. You may find that if you move from DirectX to OpenGL you are losing a lot of functionality that you may have come to depend on (like the X files, mesh support, texture loading, the SIMD math library, Direct Input, Direct Play, Direct Sound, etc.), but if your programs don''t use any of these features, you should be able to port them very easily (you may have to use some OpenGL extensions to match some direct X features).

If you save your X files in text format it should be pretty straight forward to load them, but you have to code it yourself.

I don''t know of anything close to 3dsmax for linux. The only other programs i can think of are Maya and Lightwave, and they are both Windows/Mac only.
you could try http://www.tb-software.com/ (3dwin) it''s an exporte-importer for different formats, including x, opengl .c files, etc. may be milkshape helps, too, it has lots of converters.
i just did opengl, so i''m not sure about the difficulty going from direct3d to opengl.
1: No. OGL is regarded by many as easier than D3D. D3D does have built-in file loaders, animation controllers, mesh objects and such to ease the actual development, though.

2: Define your own format. It''s not really that hard, just store/load the vertices, indices, material defs and stuff using your own convention. OR you can write x loader for use with OGL, but IMHO it''s too much of work.

3: Blender, a very good free modeler, works in Linux (and in almost all java-capable desktop os:s).
Also, a while ago i heard Maya was going to get ported to Linux.

Niko Suni

I''m fairly sure you can get 3dMax for linux, so you can probably upgrade Max to the linux version or something.
I got a question regarding D3D, what does these funtions do?

D3DXQuaternionRotationAxis(vector1, vector2, float);

and

D3DXQuaternionSlerp(D3DXQUATERNION1, D3DXQUATERNION2, D3DXQUATERNIO, float);
"I got a question regarding D3D, what does these funtions do?

D3DXQuaternionRotationAxis(vector1, vector2, float);

and

D3DXQuaternionSlerp(D3DXQUATERNION1, D3DXQUATERNION2, D3DXQUATERNIO, float);"

They appear to be Quaternion manipulation functions.
quote:Original post by JimboC
Would I be looking at a large learning curve to switch to OpenGL and other ''Open'' APIs?

It should go relatively quickly.

quote:Original post by JimboC
I''ve been using .X files for my models, mostly because DirectX has some fairly straight forward ways to use them. I''ve got 3D Studio Max 3.1 (haven''t been able to keep up with the updates), which had a few .X exporters. Is there something similar I can use with OpenGL that provides for character animation and the like?

Use an existing library for loading models from some format (e.g., lib3ds) or write your own format and/or your own loading library. OpenGL doesn''t do file related things for you since it''s out of its scope (clean design and all), as you apparently already realize.

quote:Original post by JimboC
Is there a program similar to 3D Studio Max that works under Linux? Come springtime I''ll have money to either upgrade 3D Studio Max or get a different package that works under Linux or X-Windows. Anyone have a package they user for this?

Maya (commercial) and Blender (free) are the two most popular *nix modeling programs. (Replied primarly to fix misleading answers to this question.)

Thanks guys! Definitely think I''ll be looking into this. I''ve been toying with writing my own mesh format. I''m been most worried about making the exporter for 3DS Max, but like anything else, it will only take some time and patience to learn how to do it. Maybe I''ll also look into Maya Complete, which seems to be exactly what I''m looking for.

This topic is closed to new replies.

Advertisement