OpenGL ES questions

Started by
5 comments, last by Palidine 13 years, 11 months ago
Hi Guys, I'm trying to learn OpenGL ES quickly (I know, I know, but these are the pressures that have been thrusted upon me) and I have been read around a fair bit, which lots of success at rendering basic models, some basic lighting and 'some' texturing success too. But this is CONSTANTLY the point at which all OpenGL ES tutorials end, they never say more of what a real life app may need. So I have a few questions that Im hoping arent too difficult. 1. How do people get 3d models from their favorite 3d modeling tool into the iPhone/iPad application? I have seen a couple of blog posts where people have written some python scripts for tools like Blender which create .h files that you can use, is this what people seem to do everytime? Or do the "big" tooling suites (3DS, Maya, etc...) have exporting features? 2. Say I have my model in a nice .h file, all the vertexes, texture points, etc.. are lined up, how to I make my model (say of a basic person) walk? Or to be more general, how do you animate "part" of a model (legs only, turn head, etc...)? Do they need to be a massive mash-up of many different tiny models, or can you pre-bake animations these days "into" models (somehow) 3. Truely great 3D games for the iPhone are (im sure) unbelievably complex, but how do people (game dev firms) seem to manage that designer/developer workflow? Surely not all the animations, textures, etc... are done programatically. I hope these are not stupid questions, and in actual fact, my app that Im trying to investigate how to make is really quite simple, just a basic 3D model that I want to be able to pan/tilt around using touch. Has anyone ever done/seen anything like this that I might be able to read up on? Thanks for any help you can give, I appreciate all types of response big or small :) Cheers, Mark
Advertisement
You need an engine. The format that you export depends on what engine you use. You could roll your own, or use something like Unity, Airplay or Shiva
all the major modeling programs have systems so that you can export your data.

as far as making a head turn, you would have a bone system, where the transformation of a vertex is a weighted sum of each bones transform. So triagles on the head are 100% based on the head transform, however those on the neck have verts based on the body some based on the head so that the head an body are stiched togethor. its actually very simple.
Quote:Original post by Ed Welch
You need an engine. The format that you export depends on what engine you use. You could roll your own, or use something like Unity, Airplay or Shiva


I see, just doing a quick Google on Unity looks amazing!, but might be an overkill for what I want to do

Quote:Original post by ibebrett
all the major modeling programs have systems so that you can export your data.

as far as making a head turn, you would have a bone system, where the transformation of a vertex is a weighted sum of each bones transform. So triagles on the head are 100% based on the head transform, however those on the neck have verts based on the body some based on the head so that the head an body are stiched togethor. its actually very simple.


Ok, I see what your saying, so would the bone structure be a logical structure that is controlled by interaction with the iPhone? I.e. tilting the iPhone would alter the transform which would in-tern alter the positioning of the vertexes?
You need to have at least a basic grasp of the mathematical concepts behind 3-D rendering before you even attempt to delve into an API such as OpenGL ES. Without a solid base you are only going to end up frustrated from just cutting a pasting code that you don't understand how it works. It seems like you are already on this path. With that said grab a few simple linear algebra /math book that have an emphasis on 3D programming as these may be more focused on what you want to achieve.

File exporting is not that really difficult, you can use someone else format or roll your own. Rolling your own usually involves writing a plugin for the particular DCC application (Max, Maya etc.)

A game assets are created by different application,it could be done programatically but that would be highly inefficient (with the exception of procedural base assets).
Quote:Original post by cgrant
You need to have at least a basic grasp of the mathematical concepts behind 3-D rendering before you even attempt to delve into an API such as OpenGL ES. Without a solid base you are only going to end up frustrated from just cutting a pasting code that you don't understand how it works. It seems like you are already on this path. With that said grab a few simple linear algebra /math book that have an emphasis on 3D programming as these may be more focused on what you want to achieve.


A solid base is what i am missing although I am not new to all the 3D math concepts, I started to teach myself directX a little while ago, and also have been using some basic 3D features of WPF, so transform matrices are not new although, like I said, Im certainly no mater at them :)

Quote:
File exporting is not that really difficult, you can use someone else format or roll your own. Rolling your own usually involves writing a plugin for the particular DCC application (Max, Maya etc.)


I think I would use someone elses at this point :)

Quote:
A game assets are created by different application,it could be done programatically but that would be highly inefficient (with the exception of procedural base assets).


I assumed so, thanks.
It's really exactly the same as it is for a standard PC game. You export to a model format, read in models, load textures, create FBOs to hold you data, and render with some custom shaders. Standard OpenGL code that runs on your PC will also run on the iPhone (I always just write a simple bridge class to C++ so I can just drop most of my code straight in).

If you're technically inclined, I really like the Oolong "Engine". It's a very straight forward set of engine-level library functions from which you can get something simple up and running pretty quickly. It even includes a 3DS loader and, I believe, a blender loader.

-me

This topic is closed to new replies.

Advertisement