3D Complex object draw

Hi guys,

I am trying to implement something which is drawing a 3D object from object file and then it let the user to render it in real time. My problem is start to even show up complex objects…

The object is a 3D human body the object file is contains the points, Im reading this out and strong them in a LinkedList which is obviously stupid as I need to use them 3 times not just once…

The question is how Im able to draw an object like this easily avoiding hips of repeating code( so just use loops:P)

And sry if I post this to the wrong place it might be really easy for everybody who is advanced in openGL:P

Thanks a lot
Daniel

oh yeah and Im using squares:P

Is it that stupid question or just no one knows the answer?:smiley:

I think it’s just that your problem description is kind of confusing, and it’s not clear what your real problem is: (use them 3 times, even show up complex, avoiding hips, etc.).

  • Are you able to draw the human figure?
  • Does it look right? If not, what’s wrong with it?
  • Is the performance the only problem? What is that performance? How are you measuring it?
  • Tell us something about how you are drawing the object (what calls you’re making, how many vertices per batch you are using, what state changes you are doing, etc.)
  • Are you writing your own GL calls, or using someone else’s engine?

In the future this kind of “GL development” question is probably best posted to the Beginners forum.

Your probably right it should be at the beginners forum I just thought any one could answer for my question here at gaming stuff as I would like to use a model.

I did not start to really write/code anything as I just trying out how will the user will be able to render in real time how long these changed will take and so on.

3 times I was wrong it could be 4 or 2. I meant with that to use the coordinates for the squares.

So what Im basically doing is draw a body in Blender then export it like an object. (Im using java (JOGL) so it will be running on MAC as well) After that I read in the data which are just coordinates x,y,z.

The question of mine is: How can I draw out the body from this coordinates without writing lots of lines.

I mean I would like to avoid that:
gl.glVertex3f(getCo(), getCo(), getCo());
gl.glVertex3f(getCo(), getCo(), getCo());
gl.glVertex3f(getCo(), getCo(), getCo());…

And ofc here I need to think quite a lot which coordinate is connected with which one so its not even that easy just to read them out and thats all…

(getCo() returns a float from the Linked list where I store them just now)

Sorry it might be a stupid question as I mentioned before. If its still unclear pls let me know, thanks.

Well, how many lines (or triangles, etc.) is going to depend on how detailed your model is. You can probably do some detail reduction in Blender if it’s too much.

It’s also going to depend on how you send this geometry down the GPU pipeline. To get best performance (get the most rendered per unit time), you’ll want to use something besides immediate mode (e.g. glVertex3f) unless you put it inside of a display list. In fact, if you’re new at GL development, I’d suggest doing exactly that (putting it in a display list), since it’s simple and easy to try. Then you can flip to more current methods of rendering such as VBOs. You can also consider using a scene graph such as OpenSceneGraph to help you out with the rendering (culling and drawing). Depending on the complexity of your model you may not be able to just “brute force it” and might need to implement LOD (level of detail) and/or culling techniques so you don’t throw irrelevant geometry down the GPU’s pipeline, and a scene graph will help with that.

Thank you, my model is will be very detailed yes, as the user should be able to “build” a kind of replica from her/him self.

Thanks again