Archive for the ‘Programming Utilities’ Category

Work Update; Final Project Idea #34807

Thursday, December 14th, 2006

Since I last posted I have been busy with my work at Bournemouth University. Until recently I didn’t have any set work to do, so I persued studies of my own and also some with my new colleagues João Montenegro and Johannes Saam. (On a side note, there are some photos further down the page.)

So far I have made a mostly-complete Maya to RenderMan converter which produces some cool output straight from Maya to RIB. Also João, Johannes and I have had many discussions on things like fast fluid systems and fast sub-surface scattering, though once I had my exporter to write I tended to only chip in my two-pence now and again. After we went over the theories they generally went off and actually did while I beavered away at the aforementioned exporter.

Some of the stuff that myself, João and Johannes have been working on:


There’s more stuff from João and Johannes.

These are some shots of the exporter’s capabilities:


Early days yet…

I know a Maya to RIB exporter doesn’t sound like much fun, but I can say that I know an awful lot more about RenderMan and Maya than I would have done if I hadn’t done it. I also know how much of a pain in the arse heirarchical subdivision meshes are. Ha.

I’ve also done a bit of Maya. I’m not great at it, and my first (and currently last) still work looks like this, but for a first attempt I don’t think it’s too bad. I’ve gone a bit nuts with the depth-of-field on it though. In addition, I’ve also had to create a very small animation. It’s not great, but please go easy on me: I’ve never done this before! )


Finally, I think I may have thought of a decent Master’s project. I was thinking about a graphical front-end to RenderMan, including an OpenGL pre-vis, shader editing, importing from both Maya and XSI, etc. OK, this isn’t groundbreaking stuff, but it does help me get a job in the following ways:

  • It demonstrates that I know RenderMan,
  • It shows that I know Maya and XSI,
  • It shows that I can make tools.

The ground-breaking rendering stuff I hope to do as part of my group project in any case. Or maybe just in my spare time. Who knows. I’m still not 100% set on the idea, but I am definitely more enthused about it than I am about any of my other ideas. Just… so much OpenGL… ugh…


Johannes (fore) and João (back).


Me (left) and João (right).


Gerard.


From left to right: Matt Osbond (right at the back), Ben, Gerard, Myself, João.


From left to right: Mya, Anil, Jed, unknown (back), Hasan (fore), unknown, Matt Osbond (back), Ben (fore).


Gollum guards our projector.

WiiAction

Wednesday, December 13th, 2006

I wanted to mention that a friend of mine, Daniel Wright, has written an API for using a Wii Remote - or Wiimote, or whatever - on the PC using a Bluetooth dongle. He has named it WiiAction, but I don’t know if there’s a website for it yet. I will hassle him for one. This library is, frankly, totally awesome. Here he is on video to tell us all about it:

Tees

Sunday, October 2nd, 2005

Here I am, back at University and with my own Internet connection. Apparently they have wireless in the library now, which is awesome and sustained me during the period where I lacked a connection of my own.

It should be an interesting year. I’m looking forward to my modules, but possibly not all of them. I will need to pull some enthusiasm from within myself somewhere, but I think the reason I am not looking forward to these modules is because I have no idea what to expect from them. I know that I’m doing a raytracer this year and I can’t wait.

I’ve also made some headway with my scripting language. I have currently got a decent lexer going now that I can - handily - plug into anything. It’s only a primitive version, but it can parse pretty much anything. You can even define your own symbols and operators and it will parse those just fine. It is based of the SCL, so I doubt many people will ever use it except me as the SCL is so far removed from traditional C++ that it puts most people off.

I will post the library and header on the downloads page and if anyone wants it they can have it. It’s useful, I swear.

Jackie Boy

Monday, August 8th, 2005

So yeah, Jack Thompson’s an idiot, but we all knew that.

Sorry about the lack of updates recently, but I’ve been busy working on getting the SCL ported to a static library. I’ve also got an offer from a guy I know called Mitchell Taylor who lives in New Zealand for a sound library that he’d like me to include in the SCL. I think I’ll have it as a separate library and release it under his name … he’s far to modest for his own good! )

All I have to do now is fix up the renderer into a static library. I started doing this because I hit a design issue (see below - I put a hack in but it’s no good really) so I’m restructuring it. Then, just maybe, I can finally start on shaders. I want to get this perfect before I deal with them, as I know from previous experience that they’re a bit of a bugger.

Asset Management

Monday, August 1st, 2005

I’ve been going mad over asset management over the last few days. Everything I write, I hate. I cannot think of a good way to efficiently and cleanly handle asset data.

The goals of the asset management system are:

  • To manage the releasing of assets at shut down time.
  • To prevent an asset being loaded twice. I thought about having this in a file loading registry instead. This would probably be more sensible.
  • To allow the asset resources to be flushed and regenerated at any time (such as textures).

I know this should be a simple task but I just can’t think straight. I know I need a reference to the asset, I need the asset data so that it can be regenerated, and I need the actual asset data. To clarify:

  • The asset reference points to the generated asset. For example, it would store a pointer to a IDirect3DTexture9 object. Many of these objects share this pointer and when the list is regenerated, their pointers are updated.
  • The asset data is the raw data that is used to generate the IDirect3DTexture9 object.
  • The asser resource is the encapsulation of the asset: it stores the IDirect3DTexture9 object, for example.

Has anyone got any ideas? I’m getting the feeling I’m just being stupid and I’m trying to think of this in a way that’s overly complex and is obfuscating the simple answer.

Scenegraph

Wednesday, July 27th, 2005

First off, sorry about the mass of “File:” posts that just appeared below. I’ve just updated my Files Section, so I had to re-post all the existing files. Please take a moment to browse around and let me know what you think.

Today has proved more fruitful than yesterday. Yesterday I did a lot, yes, but unfortunately none of what I did was very good. Today I have compensated this loss by deleting what I did yesterday and starting over. To be fair I was not feeling too good yesterday.

I was working on a scenegraph for the renderer, which I have now implemented to my satisfaction. It’s only a basic one, so at some point I will be extending it to cover culling et cetera. At the moment the program only renders two textured pyramids. Not much use for culling just yet.

Tomorrow’s job is probably cleaning up and looking into shaders.

Quick Update

Sunday, July 24th, 2005

I’ve literally taken 5 minutes to get multitexture working while at a friend’s house. My respect for Direct3D has been moved up another notch.

So far I’ve only hit one platform difficulty. This isn’t particularly amazing, but it’s just something I’ve noted. On the laptop, I have no hardware vertex processing (because the laptop has a rubbish SiS graphics chipset), but otherwise everything works like normal. When I start implementing shader support in the renderer things are going to be different; although it could be worse: I could be doing it with GLSL instead of HLSL.

I look forward to the day where I would write some shaders and they worked first time on every chipset. I look forward to that so much. In fact, I spoke to the head of the Microsoft DirectX division (I have forgotten his name, shamefully.) about this “war of the graphics card vendors” at the GDCE last year. He suggested that I take this complaint to the culprits themselves - ATi and nVidia - in order to convince them that they should meet some kind of standard lest they kill eachother. While this would be a worthy cause, I don’t feel that I’m in a position to deliver such a message.

Yet.

Tomorrow I plan to implement a few things, the most important being a scenegraph. After that, I can move on to getting a stable world up and running - I was thinking of writing a DLL system as a temporary measure. Once I’ve done that I will hopefully have a decent foundation for implementing shaders.

Direct3D vs. OpenGL

Saturday, July 23rd, 2005

The age-old argument.

Lately I’ve been working on abstracting Direct3D and OpenGL. This wasn’t actually my intended goal - my intended goal was to write a renderer in Direct3D with shader support, but it just turned out that way. I do admit that I have been concentrating on the Direct3D half of the job more than the GL half: so much so that the OpenGL half no longer works. This doesn’t bother me much. I’m sure Luke will write a version in his beloved API if he has time.

Speaking of which I have always been a firm supporter of OpenGL, but I have found myself drawn to Direct3D more and more lately. I have always thought that Direct3D was a disgusting API (particularly because of the Hungarian notation) and that it was inferior to OpenGL. I see now how disillusioned I was: Direct3D is vastly superior. OpenGL is good for prototyping small applications that require no special features, I feel. Direct3D, though much more annoying to set up, is so much better for large applications in the long run. I spoke to Jim, a tech. lead at Climax Studios Solent about this a few days ago and he agreed whole-heartedly. Having much more industry experience than I it seemed rather obvious that he’d thought this since DirectX 6.

Direct3D’s shader support is vastly superior over OpenGL’s “afterthought” version, which is the only reason I chose to use this API in the first place. However, I now see that Direct3D is superior in nearly every other way too. It is not the nicest API to look at, but then I took a new look at OpenGL and realised that it’s just as disgusting, if not more.

Despite Luke and Daniel’s push for Direct3D in our projects, they still love OpenGL. Also, at the GDCE last year Keith Ditchburn (also see Toymaker), one of my lecturers, told me that industry people prefer good Direct3D knowledge than OpenGL knowledge. Jim from Climax seemed to agree, considering he interviews people for the Solent studio this counts for a lot. Speaking of which, he also recommended PS2 vector unit code and assembly, so I should look at those in the near future.

I’ve come a fair way in my Direct3D renderer. It’s nothing special - yet - but I have got swappable render targets with render to texture happening which I have never done before. In fact, with Direct3D it’s so easy I did it while drunk - no kidding. Though I will have to look back on it soon and ensure that it’s best way that I could do it. I’m beginning to get that dirty feeling that I get when the project I’m working on seems to be held together by blubblegum in places. I think my primary concern is the private implementation of the textures. I’ve actually repeated some code (ack!), and I’ve passed my IDirect3DDevice9 pointer to sub objects like textures and targets. I’m not sure this is a good idea, but in some ways it’s necessary. I doubt the speed and efficiency of the GetDevice() function in the Direct3D objects. I’ll have to look into that a bit more.

Oh, and finally: HA! The hilarity…
LOL

  • View Peter J. B. Lewis's profile on LinkedIn
  • Journal Categories

  • Meta