NinevehGL is HERE!
Hello my friends,
After long months, just waiting for a single day, was a long wait, I know, but today the things will change a little bit. Today is THAT day.
After working through the nights, polishing every piece of code, thinking and rethinking routines… finally IT is here!
I’m very very happy to announce that NinevehGL is HERE!
Ladies and Gentlemen
With a great pleasure, let me introduce you the NinevehGL!

Keep it Simple
You know me, I’m so bored with many web sites, softwares, 3D engines and technologies that make our life a hell with their docs (or the absence of docs), poor tutorials, complex setups, complex API or even worst… they are paid! God Dammit!!!
- So, let’s try something different, something simple! Starting with the web site: nineveh.gl, just it, simple and easy.
- What about tutorials or docs? Very simple: http://nineveh.gl/docs/tutorials/, video tutorials!
- Long time to learn? Maybe… what do you think about just 30 min? 10 videos, 3 min each one. Sounds good?
Awesome features
There are many cool features in NinevehGL. But I think 3 are the “Killer Features”:
- OpenGL ES 2.0 (Programmable Pipeline): It uses the newest OpenGL ES version. More power, faster, lighter, better and shaders! With NinevehGL you can use all the power of the shaders and programmable pipeline.
- Import directly from 3D softwares! NinevehGL doesn’t need plugins or special 3D formats to import your files! Make use of Wavefront OBJ files or COLLADA files (all 3D softwares export one of them). NinevehGL is ready to import them.
- Made with pure Objective-C (Obj-C)! Yes, as an iOS developer, when I use OpenGL I expect to see Obj-C code, not C++ or C. NinevehGL is purely made with the native iOS language. Classes and routines follow all the Apple/Cocoa Touch guidelines.
Well, another great thing about NinevehGL is that it’s FREE! A 3D engine for iOS totally FREE!
This is a short post just to tell you about this great news. I hope you like it.
See you, guys!
| Print article | This entry was posted by Diney Bomfim on June 22, 2011 at 17:59, and is filed under 3D, Feature, Frameworks, General, Objective-C, OpenGL. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |











about 11 months ago
Well, congratulations!
Very well done with a lot of passion! I will dive into it as soon as i fineshed a project, which doesn´t use 3D (unfortunatly).
I guess you deserverd to sleep about one week now, and hang out in bars the week after that!
All the best, M.!
about 11 months ago
Yep…
It’s true, bro…
I really need to sleep… and beer!
Sleep and beer!!!
heheeh
about 11 months ago
hehehehe
(girls? never mind…)
about 11 months ago
Great work congratlulations !
Went through the api yesterday and will try the whole thing out today.
Enjoy your beers
Cheers h.
about 10 months ago
Congratulations! hope to try this out asap)
about 10 months ago
Hi,
just started to checkOut your engine… Pretty good!
I was wondering if there is a way to make a nglView transparent? So a 3D Object could hover seamlessly over other UIKit content.
Second: Is it somehow possible to generate your own mesh with an array of vertices? So far i found only the Model importers. This could pave the way for generic Presets like Cube and Sphere and plane…
Third: Lighting
I can hardly tell a difference when using nglGlobalLightEffect(NGLLightTypeSpot); or
NGLLight *theLight = [NGLLight defaultLight];
theLight.type = NGLLightTypePoint;
Do the materials make use of the lighting information?
Fourth:
I tryd to write a morping vertex shader like a wave with noise. But noise doesnt seam to be available in GL ES 2. Argh. I guess i am happily awaiting a new OpenGl Story about shaders on your Blog.
Greetz,
Marjan
about 10 months ago
Hello Marjan,
Thanks for your compliments.
Let’s go:
1. To make a transparent NGLView you must change the global color format. nglGlobalColorFormat(NGLColorFormatRGBA);
and change the default color to a transparent color:
nglGlobalColor(nglColorMake(0,0,0,0));
Everything else is done automatically. But an advice: Apple advises us to make the OpenGL layer always the background, as foreground it’s very expensive.
2. Yes. You must use at least 3 calls:
[nyMesh setIndices:myIndicesPointer count:indicesCount];
[nyMesh setStructures:myStructuresPointer count:structuresCount stride:structureStride]; (stride must be in elements, not in bytes, for example a stride 3 will jump 3 elements in the array of structure)
[myMesh.meshElements addFromElements:myElements];
(the elements instruct NGLMesh about your mesh structure, something like: where’s position coordinates starts? has texcoords and where it starts? has normals? etc…)
When your mesh is ready, call [myMesh compileMesh];
This method will generate Normals (if it doesn’t exist yet) and tangent space, if applicable.
3. Actually, just one kind of light is supported by the shaders for now, the point light (omni), although the NGLLight class is already prepared to the next updates.
4. Well, it’s true. In a future version of NinevehGL, we’re preparing an easy way to deal with morphs, but for now, it’s a very hard task and I suggest you don’t make it. Instead you can create a custom Vertex Shader and use your very own matrix to make changes on the vertices. Much more efficient, BTW.
And thanks again.
about 10 months ago
intersting…
Is there another place for these kinds of questions? The Blog doesn´t seam right, but the BetaTesters Page also not.
Don´t want to spam any of those places with my questions.
But since you are around right now, here are some more:
1. NGLEngineVersionES2 is the only one. Why can this be set? Do you want to support 1.1 in the future?
2. i just exported a modelGROUP from Maya. All objects appear. I suppose the materials from the mtl file are ignored? So textures need to be assigned in Objective C. But how do you do that if the OBJ file contains several Objects, how dou iterate through the group or find an object by name?
Vertex shaders, yeah, so much to learn…
about 10 months ago
Hey buddy,
First off, thanks for your last comment. I found a little bug with that: The NGLView can’t be transparent right now, even with the instruction above. But I already fix this bug and I will commit it on the next update in few days, with more news.
Now about your questions:
0. The official web site is growing up. Probably it’s time to create a forum/group for discussions.
1. The NinevehGL purposes is to be OpenGL version independent. So the OpenGL ES 2.1 is coming and a new variable (NGLEngineVersionES21) will appear. All that you need to take advantage of that new OpenGL version is change this variable, with no refactoring of your code. So when we have an OpenGL ES 3.0, a NGLEngineVersionES3 will comes up… and so on.
Besides I plan to port NinevehGL to other languages, like JavaScript to work with WebGL. So there will have a variable like NGLEngineVersionW1.
2. Good point. I thought in this some time ago. The problem is that Maya, Max and Modo export COLLADA with the same group’s name and mesh’s name. But another programs like Blender, Cheetah, Google SketchUp and LightWave change the names.
Besides when you export to OBJ from ZBrush, it export no groups.
So is very hard to define a pattern for that.
The best solution is:
Export each object from the same group to an individual file. Like the floor to a file, the wall to another one, the houses to another file, and so on…
At this way you can easily define a material to each NGLMesh in your code, by using myMesh.material property. This approach is better to control the animations as well.
However, NinevehGL is prepared to work with thousands materials from a single 3D file. When u export from 3D softwares, it will probably export the materials together.
I’ve already preparing the GLSL series, I think even in this month I post the first one.
about 10 months ago
Nice to hear about the new Series. As i said, i tryed to experiment with vertex shaders, and even got a Model in one of your lessons to pulse. That was not the effect i wanted to create, should have been more a wave thing or water surface. Anyways. I just found this ressource from apple : http://developer.apple.com/library/mac/#samplecode/GLSLShowpiece/Introduction/Intro.html.
Its a XCode project for Mac os, demonstrating a lot of different shaders. The cool thing is: Those shaders are explained in the Orange Book, Open GL Shading Language, which i happen to have. But the Book only shows the shaders, not how you actually put everything together. Now, this XCode project fills that gap.
I guess some of these shaders won´t work on GL ES. Namely the vertexNoise one which uses the build in noise3 function which is not available in GL ES so far.
I think it would be a great idea to show how some things from the orangebook apply to open gl es or in your case to ninevehgl. You don´t have to write all those shaders as they are there and some people like me owning that book but still being lost have something to solve the mistery.
Just an idea. I will try now to get an example of that to work with nineveh now, which me luck. I can use it as i don´t really know what i am doing in the moment. Its so dark in here.
about 10 months ago
OOOOKKK, i give up. Thats above my head. I tryed wooble, but that uses NSBitmapImageRep and i don´t know how that can be converted to Iphone SDK.
Furthermore i cannot see how the often used uniform vec3 LightPosition; is applied and wheter one needs to use the common attributes defined in the nineveh shaders or uses own ones.
Bummer.
about 10 months ago
Wow, buddy,
What happend? Why are u pissed off?
I don’t know if I understand your problem exactly. I’ll try to answer what I got:
1. NinevehGL works with UIImage only. You can converts CGImageRef to an UIImage. But again you brought me a good point! NinevehGL should offer an easy way to make textures directly from a CGImage. I’ll work on that.
2. Are u trying to implement custom light with your own shader? Well, this is an advanced topic and involves a bunch of knowledge about the shader’s world.
On the NinevehGL side, what u need is to create a custom Vertex and/or Fragment Shader setting the shader property on your NGLMesh instance using the NGLShaders. NGLShaders can load your shader code from a file or even directly in your code.
Then use the NGLMesh property “meshElements” to define the attributes and/or uniforms to your custom shader.
Finally call the “compileMesh” method on your NGLMesh instance.
These two videos can help u to know how this process works:
http://vimeo.com/24974083
http://vimeo.com/24979808
about 10 months ago
would you tell how i can make the framework if i have a simple 3d engine?i hope you can tell me,very thank you
about 10 months ago
Hi buddy,
Sorry, I didn’t get your point. What are u trying to do?
about 10 months ago
Sorry, you got me wrong here. I am not “pissed”, just have very limited time and always tend to jump into the coldest water.
Of course Nineveh gl is in no way related to me being unable to write complex shaders. Thats just something i am interested in right now. But if i cannot even come up with a conversion of some shaders described in Books AND in a version for mac os X, then i need to decide to cut the efforts down and go back to work.
Once again, no nineveh gl thing, my fault.
about 10 months ago
OK, now I understand.
Well, buddy, I’ll start the new series about Shaders, with focus on GLSL ES.
Shaders for MacOS always need some modification to become a GLSL ES. But the inverse path is not truth, any GLSL ES can be used in GLSL without modifications.
NinevehGL uses GLSL ES and you can make any custom shader, if you want.
I hope u like my new series.
about 10 months ago
Hi Diney,
I’ve a have question about using NGLView in a navigation controller: how could i stop rendering the view when it is “gone away”? I’ve tried the stopAnimation method, but when I view again the NGLView also sending startAnimation I can’t see anything anymore.
What I’m doing wrong :S?
Thanks in advance and congratulations for this awesome framework
about 10 months ago
Hi buddy,
Sorry for long delay,
To start and stop rendering just call the “startAnimation” and “stopAnimation” methods of your NGLView instance.
As the UIViewController by default stores just a UIView, when you set and get a NGLView you must use (NGLView *) notation before. At this way the compiler can understand what you are doing.
Thanks dude,
about 10 months ago
Hi Diney,
Will there be NinevehGL sources on the “http://code.google.com/p/nineveh-gl/source”?
about 10 months ago
Yes,
You will be able to download the source code here or with your version control client.
about 10 months ago
When are you going to be posting it? I’d love to look under the hood since I’m just starting to move from app development to game development in iOS.
about 9 months ago
The code will be available to download at the major release (1.0). This can take months… I hope it comes out even in this year (2011).
about 9 months ago
Hey there.
This is fantastic. Very easy to learn and use.
I’m not sure the World Space bit is working as expected though. No matter what combination of rotation settings I use (Tutorial 6) The cube seems to always, always rotate on it’s own axes.
I’m looking for an arcball/trackball like behavior in which when I touch and pull down, the model should always tip toward the viewer no matter it’s previous orientation.
Does this make sense and can you help?
Really looking forward to developing with this. Thank you.
about 9 months ago
Ah crap. Never mind. Went to church, came back. Figured it out. Cheers.
about 9 months ago
Hi Steve,
Good to know you found it.
Just a tip: some times you can achieve the same result by making different combinations with the three settings (Absolute VS Relative, World VS Local, Rotation Order).
about 9 months ago
Will NinevehGL be open source? What license?
Can it be, legally, used in commercial projects right now?
Thanks.
about 9 months ago
Hi,
Yes, you can use it on any project you want, even in commercials.
However, we recommend do not use it on very important projects to you while it is in Beta Phase, because we don’t know all kind of bugs/issues in Beta.
about 9 months ago
Hey,
I am subviewing NGLView onto my UIViewController.. when I navigated to my UIViewController for the 1st time.. the model gets displayed.. but when I go back and forth and the model is not shown… though Mesh is getting initialized n camera is set..
Can you plz help me out… thanks a lot
about 9 months ago
Hi buddy,
Although NGLView is a subview of UIView, you should not use it like a conventional UIView.
Everytime you enter and out a UIViewController, the Cocoa releases the UIView, this is not good for NGLView, because every time you remove ALL NGLViews from your application, NinevehGL destroy all the OpenGL Buffers to save the memory.
Then, when you go back to your UIViewController, NinevehGL will recreate and initialize OpenGL again. This is not good, after many times entering and leaving the UIViewController, your APP probably will crash for memory.
With NinevehGL you must think in a different approach. Initialize one NGLView once and reuse it in your entire application. Just call another NGLView if you really need to separate your render (each NGLView produces an independent render cycle).
You can call “start” and “stop” animation methods to save the memory when the NGLView is not visible on the screen.
I hope it helps.
about 9 months ago
thanks a lot… that helped a lot… my problem is solved now…
btw gr8 work… I saw searching a good OpenGL library for loading the OBJ file… i think… this is it
about 8 months ago
Hey… everything works gr8 with this library… But I ran into one small problem.. when i am using this line of code
self.antialiasSamples = 4;
i am unable to take the glView snapshot… the snapshot is empty..
I am using http://developer.apple.com/library/ios/#qa/qa1704/_index.htmlfor capturing the snapshot.. it works gr8 without antialias
about 8 months ago
Hello buddy,
Well… with NinevehGL 0.9.2 you don’t need implement a snpashot anymore…
The NGLView has methods to do that:
drawToImage
drawToTexture
drawToData:
Take a look at this:
http://nineveh.gl/docs/Classes/NGLView.html#//api/name/drawToImage
about 7 months ago
When you get around to bone animation, be sure to invest in using vertex shaders to accelerate the skin deforming, as well as the normal/tangent calculations.it’ll give the engine a massive performance boost.
about 7 months ago
Hey, also, it doesn’t appear that you can create scene hierarchies (correct me if I’m wrong). This is essential!
Best of luck with the project.
about 7 months ago
Hey Alexander,
Thank you for your compliments.
NinevehGL is growing fast. Every day, every week a new feature is being fully implemented. We are already working on the update 0.9.3, you can check out its features here: http://nineveh.gl/docs/changelog/
Probably will include bones.
Remember that NinevehGL was made to be the fastest 3D engine.
About the Mac OS X… well, we are receiving a lot of request about WebGL, much more than any other platform (including Java to Android). So probably the first new platform to NinevehGL will be JavaScript to WebGL. But we can consider in future a version to Mac OS X.
And about the scenes: the NGLView is the iOS scene, you can organize everything inside it. The NGLCamera can hold your objects. Both classes give you a powerful way to maintain and organize your 3D objects.
Thank you again, buddy.
about 7 months ago
Hey, I’m not sure if my last post actually got through, so I’ll just write it up again just incase.
Basically what I said was that you should implement a scene hierarchy. What this means is that you can attach NGLObject3Ds to other NGLObject3Ds, and they will move around with the parent. Its super simple to implement, and its a powerful feature for anyone writing a 3D game/application.
about 7 months ago
hehehe…
I got your point buddy… you are talking about groups!
Don’t worry, we’re working things like this. Including group importing and multiple parsings.
However, nothing is “super simple”… or any other will construct a 3D engine in few days and should have thousands of 3D engines for iOS. But it’s not truth, because it’s not “super simple”…
It’s very expensive, exhaustive, requires much more attention that any other kind of product.
Anyway… if all that you want is “groups”, you can do this right now with NinevehGL by using “surfaces”. That’s what they are for.
A surface can separate a entire mesh, with its own materials and custom shaders. However the behavior in 3D space (translations, rotations, scales, pivots, targets, etc) will be the same.
about 7 months ago
Actually, not really groups.
A group is a bunch of objects stuck together, basically, but I’m referring to is… a little difficult to explain.
Imagine a person. The arms and legs are attached to the body, and can move around with it, as well as having their own independent movement. The reason I said it was super simple was because it is, in contrast to the super hard work required to make the rest of the 3d engine. Don’t worry, I know what you’re going through.
Anyway, I can explain it further if Im not making sense, but I promise you that it’s not too difficult to implement once you understand exactly what I’m talking about. I just think its an important and useful feature.
Oh, and I’d like to help develop the source code, if that’s at all possible.
. Don’t worry, I have lots of experience.
Anyway, I hope there hasn’t been too much misunderstanding.
Good luck with it..
about 7 months ago
Hi buddy,
Thanks for your suggestion.
Now seems you are talking about Bones, Kinematics and Riggings…
I suggest you to consult our Roadmap: http://nineveh.gl/docs/changelog/
It could be clarify to you. We’re using the same “nomenclatures/pronouns” as 3Ds Max and Maya.
Thanks again.
about 7 months ago
Close, but rather than a single mesh, they completely separate objects that are attached like a rig.
For example, you may have a 3d object representing an elevator, which you can move up/down. Inside this, you have a box, that you would like to move with the elevators motion. But you can’t include In the elevators mesh, because it needs to be able to move around the elevator. So what you do is attach the box to the elevator, so that when it is drawn, it is transformed by the elevators orientation, as well as its own.
I apologies for not explaining correctly the first time.
Oh, and I also believe that rotations/transformation can be a very difficult thing to grasp and execute effectively, and I have some ideas on how to make you’re orientation system more versatile (but still the fastest of course!)
Anyway, I’m glad to help In any way, and I appreciate the time you’ve taken to hear my suggestions.
about 7 months ago
Hi again,
Now you are talking about the attachment tools. I suggest you to study a little bit more about 3D world and 3D softwares. Learn about the concepts and sintaxes.
The attachment concept is about to bound meshes against points. Those points can be inside a path, inside another mesh or even a variable point. In NinevehGL we’re implementing this feature with the name of “follow”, with options to rotations, translations and scales.
The NinevehGL rotation system is based on quaternions, the fastest way. When the version 1.0 come out, we’ll open the code for everyone, so you can make the changes you have in mind.
Thanks for your interest buddy.
about 7 months ago
No problem.
Different Apis use different terminology, and so I was just going with the OGRE concept of scene nodes. At the heart of it, it basically just giving the programmer the ability to specify an objects orientation relative to another Object, rather than the world. The effect is achieved simply by multiplying together an objects orientation with that of it’s parent, and voila! Obviously the Parent may have it own parent, and so you have a chain.
about 7 months ago
Yep, this follow feature seems to be what I’m looking for, and more apparently.
I can’t wait to try it. Good work.
Oh, and I’m not suggesting that I can more the rotations faster, but more flexible. It’s difficult to explain, so I’ll talk more tomorrow.
about 7 months ago
I see.
OGRE is a good engine. As you are experienced with it, you should keep using it.
Thanks again.
about 7 months ago
No, I’m not. It is far too complex, and it isn’t compatible with objectivec (I think)
about 6 months ago
I have 2 cubes on the x-axis at -2 and 2. I am trying to make the cubes at -2 and +2 rotate around the y-axis but I cannot get it to work. I have tried numerous experiments with the pivot property to no avail. Is there a way to make this work using the rotation properties of the objects?
about 6 months ago
Hi buddy,
I’m not sure if I got your point… are you trying something like this:

In affirmative case, the “pivot” is your answer. Just set it with the opposite value you want. For example, to let an object at +2.0 X set its pivot to -2.0 X.
You don’t need to move the object, just set its pivot.
cube1.pivot = (NGLvec3){2.0,0.0,0.0};
cube2.pivot = (NGLvec3){-2.0,0.0,0.0};
Regards.
about 6 months ago
Thanks for the quick response. I got my example working but I don’t fully understand the concept of the pivot. I was expecting there to be a way to have an object that is not at the origin of world space rotate around an axis (cardinal or some other object’s axis). I am basically trying to simulate a Rubik’s Cube using 27 separate cubes and they are not at the origin. The central one is but the others are arranged to make a cube. If I want to rotate a side of the cube, I have to rotate 9 separate cubes around a central axis.
about 5 months ago
Hey there, Im really excited about the engine. Everything is looking fantastic so far, I just had a few questions:
1. Is it possible to hide a mesh (essentially tell Nineveh not to bother rendering it) but still keep the mesh stored internally inside of Nineveh? From what i understand the current process to do something similar to this is to remove the mesh from the current camera, however the issue here is in doing this all of the mesh’s data is lost and must be reloaded (if Im correct). If this isnt possible, I think you should consider adding some sort of methodology for this, as hiding and showing objects without completely deleting them from memory is very useful for most 3D applications.
2. Is it possible to clone a mesh? What i mean by this is, lets say I wanted to load two meshs of the exact same model data, from the exact same file, but I wanted them to have different global positions / rotations (and possibly even textures). Internally, they would share the same vertexdata, cutting down on wasted memory, but physically in the world they would be able to appear in different orientations from each other. This would be useful for games that require massive amounts of the same 3D model.
about 5 months ago
Hi budy,
Thanks, the answer for both of your questions is: YES.
1 – There is a “visible” property in NGLMesh: http://nineveh.gl/docs/Classes/NGLMesh.html#//api/name/visible
2 – Many objects (NGLMesh, NGLCamera, NGLMaterial, etc…) implement the NGLCopying protocol. Just call “copy” to clone all the memory or even “copyInstance” to clone the object and still sharing the essential mememory: http://nineveh.gl/docs/Protocols/NGLCopying.html
Cheers,
about 4 months ago
Ah thats perfect, just a follow up question then:
If I do remove a given mesh from a camera, it sounds like doing this removes the mesh from NGL altogether. Is this correct? Im essentially trying to figure out the proper way to delete a mesh from NGL once Im done with it. How is this done?
about 1 month ago
Well, Diney Bomfim post HELP me alot in discovering the NinevehGL. Just use it for 2 days, and start to fall in love with it. Im not too good in 3D programming, however, i kinda lost. My problem is:
1- How to select a single face of a mesh.
2- How to retrieve the information of the face of the selected mesh like its color and coordinate.
Please please please please lead me to something
…thx in advance.
about 1 month ago
Sorry for the bad english
..
1- How to select a single face of a mesh.
2- How to retrieve the information of the selected face like its color and coordinate.
about 1 month ago
Hello buddy,
Thanks,
Unfortunately the NinevehGL doesn’t have touch API yet. So there is no way to select or identify the touch on a face/mesh.
But this is a feature that is already under development.
Best,
about 1 month ago
Thx for the info, so sad..
…. your ninevehgl make me feel that 3D programming in iOS is so easy. Might have to think about it again for other framework…
about 1 month ago
Yeah,
It’s very very far from a good engine. Search for another one, there are many other better choices. This is the best for you now.