Basic 3D
How exactly are 3d objects put into games, are they read from a file like a .3ds file or are the coordinates defined within the code? with that in mind how can I add a simple sphere to my program?
Yes your correct, they are usually loaded from a file, unless the people are crazy, or they are simple shapes. Most common formats are 3ds, asc, ase, obj probably. As for loading a sphere into your scene, unless you use glut, i believe you must pull out an old math book and find some formulas. Youd probably be better off with some simplier shapes to start with.
~ Chris
~ Chris
ok, well i can do really simple shapes like a cube or a pyrimid, but a sphere seems kinda hard.
Actually, you don''t need to use glut, you can use glu. Infact, you probably include this anyway, for your perspective set up. You use GLUquadric to make up the texture mapping, and a single glu call to draw the sphere, cone, disc or partial disc. Otherwise, you can actually just draw a sphere in a modeller, then export it and load in the vertices.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement