nGene

The nGENE
Here’s the source code and compiled binaries for my little OpenGL engine, which I have named the “nGene” after a suggestion by a coworker.

It’s a little odd as engines go in that it loads Lightwave 6.x (or greater) scene and model files and renders them, and then lets you fly a camera around and look at them. It lights the scene according to whatever lights you put in the scene, but all lights are translated as point lights. I never got spotlights or area lights working. It does respect global ambience settings in the scene, though, as well as maintain the hierarchical relationship between all the scene elements (i.e., parenting of scene elements is preserved at runtime.

To clarify the copyright status of the nGene, it’s open source and licensed under the LGPL, meaning you can use this code for your commercial projects if you wish, without having to worry about having to release the code for it or your own project along with the compiled form. By all means, steal the parts you like and toss them into your project if you think it’ll help. It’s why I wrote it in the first place. Note that I’m not responsible for the results, i.e, if it breaks, you get to keep all the pieces.
If you do download it, note that you’ll be in good company – the nGene has been downloaded over a quarter million times since I originally posted it.

Special thanks to gifted artist and animator Eric Estrada, currently a lighter at Dreamworks, for the 3D scan of his head.

It texture maps, but only UV textures, and there are a few ways to apply the textures in Lightwave that don’t actually work. The best approach seems to be to convert whatever conventional texture mapping you might have on your models into UV maps using the “Make UVs” tool in the “Map” toolset in modeler. Since the loader doesn’t handle DMAP chunks, models using cylindrical or spherical mapping need to have the vertices split at the seam, or you’ll get mapping errors. Also, I never got around to writing the polygon smoothing algorithm, so for now it’s flat shaded only.
The source code will compile under either Windows, using Microsoft Visual C++ 6.x or greater, or under Linux using GCC. Yup, it’s cross-platform code!
Download the source code, binaries and sample data here. It’s about 3 megs because of all the model files and textures and whatnot that you get with it. I wouldn’t get too excited if I were you – once I got the object and scene loaders working, the rest of the engine was done in about five days. It does give some good example code for reading objects in native Lightwave LWO2 format, though. By the way, in the ‘credit where credit is due’ department, I started with the example ‘C’ loader code written by Yoshiaki Tazaki at D-Storm.

UPDATE: I’ve only just now gotten around to fixing a problem with the project files that kept you from using KDevelop 2.1. I know 3.0 is out, that’s next, but at least this version works in Linux now. It’s a tarred, gzipped archive.
Once you’ve gotten it to compile (it shouldn’t be difficult if you know how to use the compiler at all), run it by giving a parameter of either a model file or a scene file. If you give it a scene file as a parameter, it’ll assume all the assets are right there in the same directory with you, even if the scene file says otherwise. If you give it a model file as a parameter, it’ll just load the model file and let you spin it around and look at it from different angles. If you can’t compile the project or don’t want to bother, binary executables are included for both Linux and Windows.
Interestingly, the Linux version runs significantly faster than the Windows version does, even though it’s exactly the same code. I think Linux just works better from the standpoint of interfacing the OpenGL API with the hardware. I know I could do a lot more about optimizing the rendering pipeline, though. Right now the only thing I do is sort the polygons by material; this cuts down on having to use the GL material commands for every single darned polygon, and it sped things up a lot. It’s still not a really quick engine as engines go, but it’s quicker than it first was.
I wrote this engine as an exercise, and I stopped before I finished it. There are leftovers and leavings of various ideas in it that I never implemented. The object and scene loading classes themselves are fairly clean, however, and I did my best to keep that functionality as encapsulated as possible so they could be reused by somebody else if needed. So don’t cringe when you read the code. You’ve been warned.


It was used by the UCLA Laboratory of Neuro-Imaging – here is the testimonial letter I received from Craig Schwartz:

E-MAIL: craig@nospamplease.loni.ucla.edu
X-Mailer: ELM [version 2.5 PL2]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: ELM [version 2.5 PL2]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Dear Gene, a few weeks ago you helped me with nGene – which I’ve been using to debug a small java library which creates LWO files as output. Although the contributed ModelViewer module did not have everything I wanted, and was unable to display the largest of my test data sets, it did enough (supported by nGene) that I was able to use it to keep my coding, thereby contributing significantly to my successful project.
Many thanks!
Craig Schwartz
UCLA Laboratory of Neuro-Imaging

loss versus san francisco 49ers shocks football worldIt’s a little like your grandma hearing you’re good with computers, so she suckers you into running all her antivirus scans. Only with way, way more pressure: “My favorite worker who wore many hats was at my second rural job. Our IT guy was a 19 year old computer technology major who was taking classes at the university 30 miles north of town. He was also an EMT and ran EMS in our county, bringing me fallen grandmas, heart attacks, car wrecks, etc. via ambulance. Knockoff Oakleys When he was working IT and a code was called, as an EMT, he would run down to the ED and help with running the codes, starting IVs, doing chest compressions, bagging the patient, getting EKGs.”9. He spent a night in the hospital after being taken from the stadium via ambulance when he suffered extreme fatigue.Special teams coach Joe DeCamillis was named interim head coach during Kubiak’s absence and was in charge when the Broncos (4 2) lost 21 13 at San Diego on Thursday night.Kubiak also had a health scare in 2013 when he suffered a mini stroke at halftime of a game against the Colts when he was head coach of the Houston Texans. Baratas Replicas Ray Ban “After consulting with his family over the weekend, Michael Vick asks that I announce today that he has reached an agreement with federal prosecutors regarding the charges pending against him. Mr. Vick has agreed to enter a plea of guilty to those charges and to accept full responsibility for his actions and the mistakes he has made. “Mr. Vick wishes to apologize to everyone who has been hurt by this matter. The legal team and Mr. Vick will appear in court in Richmond on August 27.” Vick’s guilty plea follows similar actions by wholesale Jerseys his three co defendants. Two of them pleaded guilty last Friday and said Vick financed gambling on dogfights at Vick’s property in rural Virginia. One of them said Vick helped hang, drown and electrocute dogs that didn’t perform well.And the longer you’re separated (or Cheap Air Jordan 4 segregated, if you will) from a group of people, the more it becomes “us against them.” Brienne clarifies that her elders “don’t scream ‘DEATH TO WHITEY’ wholesale jerseys china or anything like that. It’s just a simmering tension. I don’t condone any of it, but I do understand it, because these people have gone through some horrible and very recent shit.”That’s why Faith Night performances are scheduled before or after the official game, held off to the side or on stadium concourses. Bible giveaways are handled through a redeemable coupon system at the gate. And if you don’t want a Moses bobble head doll, just say no. Nashville Sounds General Manager Glen Yaeger says it’s a balancing act.

But sound and transcription are both very subjective things, so for every blockbuster classic like “bonk,” there are 10 more words you use every day that you had no idea were onomatopoeias, because, well, they’re kind of dumb. Kind of dumb Replica Air Jordans like these!. Watt was a unanimous pick at defensive end for this season’s team, as was Minnesota running back Adrian Peterson.”I do whatever I can to help the team win. I’m ray bans sale a team guy,” wholesale nfl jerseys said Mack, who had 15 1/2 sacks (five in one game), behind only Watt in the league. You may also choose to provide a spreadsheet with the written statement that breaks down the budget numerically. List anticipated revenues for the upcoming year in one section, list each department or program that is receiving budgeted money in another, and finally total everything up so that you can see the net surplus or budget deficit.. Setting up a volleyball court, you’re going to need a flat surface, you’re going to need a big flat surface. The dimensions of the court are 30 by 60. A Schematic of the embryonic eye. Boxed region is shown in wholesale football jerseys (b) and (c). Jell O Man was Kraft Foods’ effort to make Jell O exciting by offering such riveting tales as “The Secret of Jell O Man’s Origin,” which we assume involved plastic molds from Food Lion and a child with bronchitis. In addition to sporting a Brylcreem Buddy Ebsen pompadour, Jell O Man could rip his own head off at will and lob it at foes while his talking Jell O dog sidekick, Wobbly, terrified them into submission with his inexplicably human face.. Of course, just practice in through two fingers, catch, and going up in the beginning, then you can add the body movements to make it look like it’s much more extreme. Through the first two fingers, catch. It comes as no surprise that the match between these two would begin by essaying their respective themes. Goldberg is a monster, an all powerful locomotive that tosses and tackles Page with ease; almost with a sense of boredom that this will be another cake walk in a long line of cake walks (this is incredibly apparent when Goldberg avoids a sweep takedown by doing a pretty impressive back flip). As you can see from the graph below, wireless revenue growth has been slowing for the past three years. That’s a result of price competition. So you might decide to instead go on ebay or shop around for say like a McFarlane action figure. If you can present http://www.cheapjerseys2013.com the action figure in a clear brand new looking plastic bubble it will dramatically add to the wow factor.

Leave a Reply

Your email address will not be published. Required fields are marked *

This blog is kept spam free by WP-SpamFree.