🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Problem w/ 3D Exploration....help!!!

Started by
4 comments, last by AlanW 23 years, 11 months ago
I made a simple opengl program to see if 3d exploration worked, because i''ve been having problems with it. The program used glut to initalize the window, and i used a frustum projection with the parameters -1, 1, -1, 1, 0.1, and 500.0. I made a simple sphere, and translated it into view. Once I had the sphere in position, I made a simple box in 3D studio max that was about 5 units long on each axis (from the origin, ten in total). I then used 3D exploration to convert it into an opengl display list. When I called the function that 3d exploration generated to draw the box, it didn''t show up. I drew it at exactly the same spot the sphere was at, I just took out the sphere and put in the box in replace of it, only it didn''t show up. Has anyone ever had this problem? I can''t think of what could be wrong, I tried using the standard scale option in 3D exploration when I converted it, and I also used the "as is" or whatever. I only had it save the materials (not the white material, just materials). If you think you know whats wrong, please help me out, I would very very thankful!!! Thanks everyone!
-Alan W."Adventure, excitement, a Jedi craves not these things." - Yoda=)
Advertisement
Ya know I''m sure there is a perfectly good reason why this is happening..

But, to tell you the honest truth I''ve never really been all that impressed with the program.. I haven''t dedicated a WHOLE lot of time to it as I don''t really NEED to load 3d files at the moment.. But I''d be willing to bet it''d be more benefical to write your own routines..

Just my 2 cents..


bosco()



--
leader of the free world .. or something ..
--leader of the free world .. or something ..
what''s the camera distance to the center? is it greater than the dimensions of your box? other than that, i don''t know. you''re wise to keep it "as is." i tried changing units, and it screwed it up.

also, 3d exploration seems to be a very good program to me. i can model whatever i want in max, and pretty much be guaranteed to see the same thing in opengl (with a few exceptions, like alpha masking, but can easily be fixed). the generated code is very manageable, and clear, and easily tweaked. it actually WOULD be better to write your own routines, but maybe for my next project... for beginners, i have to say it''s damn good.

a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k
hi
i don''t know if this will help you but 3dexploration ''s beginners make often a mistake. The code of the display list generated by 3dexploration define a local variable :
GLint lid=glGenLists(1);
As the scope of a local variable is the function where it has been declared, you can''t use lid in your drawing function like this :
glCallList(lid);
Define lid as a global variable and it will be ok.
hope that help...

lunasol
actually, you can declare lid global, OR do it the way the function is set up. the display list function returns lid, so all you'd have to do is create the function definition in a header, and in the main loop, do glCallList(3Dexplorerfunction());

a2k

or, wait a sec, does that work? i mean, i know it works, but is that the way it should be done? (gosh, i'm questioning my own code. holy cow, now wait a minute, i AM doing it wrong. you have to call this 3d exploration generated function in your initialization code, and set your display list variable to the return value (which would be lid, like lunasol said) hmmm, thanks, lunasol!

sorry, if this doesn't solve yer prob though, AlanW



Edited by - a2k on August 3, 2000 12:45:00 PM
------------------General Equation, this is Private Function reporting for duty, sir!a2k
Thanks everyone...i got it working now. The object was a little too big for the projection, and i forgot to make lid a global variable.

Thanks again!
-Alan W."Adventure, excitement, a Jedi craves not these things." - Yoda=)

This topic is closed to new replies.

Advertisement