Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 21 Oct 2011
Offline Last Active Mar 17 2012 03:43 PM

Topics I've Started

Textures printed in Back Face, Front Face transparent and UV maps

10 February 2012 - 06:28 PM

Hello everyone,

In a nutshell, i am using Blender 3D to export a cube with an associated UV map for texture three faces.
I have managed to bring up textures on a cube in OpenGL ES for learning how to apply textures.
However the result i get is the following:
  • front face of the cube appears transparent
  • textures are visible in the back face (inside the cube)
  • and faces which are not in the UV map they simply appear black.
Do you know how to proceed to have the textures shown in the front faces and seeing these faces which are not subject to the UV map ?

Many thanks in advance ! Posted Image
ps. attached screenshot to be more visual

Simple 3dModels displays, but more complex ones don't. Memory limit, buffer size, e...

05 February 2012 - 04:39 PM


I have recently created an importer which loads Blender 3D generated models into my under-development iphone app.

For simple objects such as cube, cone, etc... it works perfectly fine. However, as soon as the objects reach a certain degree of complexity such as a donut shape , sphere; the engine display only a part of the objects; e.g half of it; sometimes less. I have checked the vertices and indices in the data model and they are perfectly fine.

It looks like there would be a hard limit such as a number of vertices, memory allocation etc...but i can't exactly figure it out. As i am not yet quite confident in OpenGL ES there might be quite a direct answer to this problem ; but hasn't found it yet.

Any pointer, tips are more than welcome to draw the second half of this sphere ;)

PS. some screenshots to complement this post:

The model in Blender:
Attached File  Blender Initial Sphere.png   17.82KB   39 downloads

The model in the Iphone simulator; as you can see quite not the same:
Attached File  Iphone Sphere.png   91.97KB   45 downloads

OpenGL Robot Movements: combining vertical and horizontal moves into one

14 January 2012 - 06:18 PM


I have made a robot arm for an iphone app using OpenGl.

Its forearm can turn left and right by rotating around the arm; and can also go up and down by rotating around a normal vector to its main axis.

The left/right movements are going smoothly with GlRotate; the up and down as well.
The problem comes when i would like the forearm to go the right/left at the same time as going as up and left.

The final result is the right one meaning it arrives at the final position ; however it proceeds by sequence; for example it execute the 1st GLRotate to go right; and then the 2nd Glrotate to go up.

The result i would like to see is in fact a combination of both up and right; in other words that it appears as one movement.

What are your suggestions to arrive to such result ?
Note that the axises of rotations are different for the left/right move and up/down.

Many thanks in advance for any pointers, helps you can provide :)


From data model to its representation in opengl transformations

12 January 2012 - 07:10 PM


A trivial question for many of you; which i would really appreciate with this matter as i am starting to bang my head on the wall ;)

My app contains a data model consisting of my "main axises" for each 3d object shown in the opengl module. These axises are in fact a representation axises of 3d objects (like the bone of a body and the 3d objects would be then the members of the body).

Based on user interactions these changes in these main axises are calculated from the current position to the new one.
and i would like to represent these changes also on the screen via the Open GL modules through some glrotate and translate.

For example an axis with its origin in x =0/ y = 0/ z = 0 and x =2, y = 2, z = 0; would be translated in opengl as a glrotate on z wih an angle of 45 degrees; and no glrotate on x or y

At first i thought taking two glrotates on x and y or x and z ; would do the trick but i am having some challenges. Now considering to use orthographic projection on the planes x,y / z,y / x,z to then determine glrotates for respectively x , y and z.

Is that from your oppinion the way to go ? I am not fully convinced and i wanted your oppinion about it.
Or do you see another approach which would be more straightforward ?

Many thanks in advance for any insight you can provide :)


Iphone: Importing 3DS objects via OBJ file; export or import issue?

11 December 2011 - 03:48 PM


I have recently downloaded the 30-day trial version of 3DSMAX 2012; and would like to import some of my objects into an IPhone application.
My idea has been to export the file from 3DS in OBJ format and read them from my app afterward. From the App log, i can see that all vertex data are correctly read as i can see exactly the values as they are defined in the OBJ file. However, what i get on the iphone simulator is not what i have drawn on 3DS.

To simplify my investigation, i have imported a cube; with the following vertices (see the attached screenshots; one being the object drawn, second being the object shown in the iphone simulator)

-49.6109f, -37.0908f, 14.4273f,
-10.8045f, 40.7808f, 59.8638f,
76.1792f, 40.7808f, -14.4273f,
37.3728f, -37.0908f, -59.8638f,
-25.655f, -65.3948f, 42.476f,
61.3287f, -65.3948f, -31.8151f,
100.1351f, 12.4768f, 13.6214f,
13.1514f, 12.4768f, 87.9125f,

The code i use in the drawing method is the following:

glVertexPointer(3, GL_FLOAT, 0, [drawObjectTmp getVertices]);


glDrawArrays(GL_TRIANGLE_STRIP, 0, 8);

With the arrays of drawobjectmp having the exact values described in the OBJ file. Note also that the GL_TRIANGLES option has presented similar results on the screen.

My current assumption is that something has to be done on the objects in 3DS studio max to export the file with a certain vertex "order"; however i am a total beginner in 3DS so it makes my troubleshooting rather slow. I have couple of leads on teslta to transform surface into trianges but it didn't really work out on the simulator screen either. I have tried also exporting the objects with the triange option on; didn't help either.

I am sure it's a trivial issue for any experienced person in opengl and 3ds max; but i am not , yet :)
so i am open for any suggestions, pointers to good tutorials or demos on this particular topic.
Thanks :)))