Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 12 Sep 2000
Offline Last Active Jun 06 2013 04:35 PM

Topics I've Started

Patchy, layered fog?

13 November 2008 - 12:49 PM

Does anyone know of a good algorithm or technique for implementing patchy, layered fog on the current generation of hardware?

Blender vs traditional commercial solutions

05 September 2008 - 07:50 AM

I know this topic has come up before and indeed I did a search on the forums for information and opinions. However, I am interested in opinions from people who have used Blender AND Maya/Max about whether or not Blender is a serious contender for modelling and animating professionally for commercial games. Is it really a contender? I know of user interface concerns, but is there anyone who has made the effort to get beyond this and seriously compare features of the packages? For me, as a programmer I need a cheap package that I can start with and produce some simple models myself - enough to keep me rolling on my own engine (which means more complex than the donuts and spheres and other regular shapes I can generate in code - which I am now bored of). I wouldn't do much modelling beyond this, but if I go to the trouble of integrating Blender into my tools pipeline I will likely write a lot of custom plug-ins for it, including those which may potentially assist in level editing. What I don't want to do is start out doing this on something that is going to deter great artists from working with me in the future. I am artistically clueless as a programmer, hence the need to question experts in the field. BTW: Even in the event where Max/Maya is clearly where I should go in the long term (when I have more cash), if anyone has an experience of converting Blender into a level editor using custom plug-ins and using it as part of the game asset pipeline in addition to traditional use of Max/Maya...I would be interested in your thoughts.

Overridding new in C++, complications with local store

23 June 2008 - 08:00 AM

I am looking into writing C++ memory management using plain new and delete in C++. I am using this classic article as reference. Here is the code snippet defining how new is overridden. The various parts of this snippet are not necessarily in the same .cpp file.

class Heap
  virtual ~Heap();
  virtual void* allocate(size_t) = 0;
  static Heap& whatHeap(void*);

extern Heap* __global_heap;

inline void* operator new(size_t sz)
  return ::__global_heap->allocate(sz);

extern class HeapAny __THE_global_heap;
Heap* __global_heap = &__THE_global_heap;

Omitted from the snippet is the definition of the class HeapAny. This derives from Heap and the details of what it does aren't important to my query. Please also ignore the whatHeap() function in the Heap class. My query revolves around the instantiation of __THE_global_heap and assignment of it to __global_heap as in the last two lines of the program. As these are globally defined, they are created before main() is called and this invokes the overloaded new(). As the overloaded new() accesses __global_heap, yet __global_heap, or at least what it is pointing to hasn't been set up yet and is in fact the reason why the new() is being called, I can't see how this code works. I've tried this to see how it works out. Basically __global_heap appears to be NULL and the program crashes in the new statement, before main(). If I change the new to...
inline void* operator new(size_t sz)
  if( __global_heap == NULL ) return malloc( sz );
  return ::__global_heap->allocate(sz);

...then the program works as planned. However, I don't want every occurence of my overloaded new to be slowed down with 'if NULL' style checks. Does anyone have any familiarity with the article I am looking at, or perhaps some comment on how I might be able to control the problems I am looking at?

dynamic lighting

11 October 2007 - 07:52 AM

It's been a number of years since I did any sort of graphics programming and I am getting back into it. There's an awful lot to catch up and one of those areas is lighting. What I am looking for is information on up to date lighting techniques. I have been googling, but most of what I can find seems to refer back to basic shading techniques implemented in a pixel shader. What I am looking for is information on techniques that allow me (for example) to have one light, above a sphere, which is a above a floor. If I was to use the basic shading techniques suggested then the light would affect the floor, but the sphere would not occlude the light. I understand I could put a shadow down in a number of ways, but this would still happen either before or after the light is applied to the surface under the sphere. I find plenty of articles on deferred rendering and the lighting algorithms mentioned for these techniques appear to get me what I want easily enough. However...I'm not looking to implement a deferred renderer.

[.net] pages within form design

31 August 2007 - 02:40 PM

If I create a form and then use the visual studio form designers I can do many nice things like drag and drop buttons and panels from the toolbox...make them function very easily. However, say I do not wish to have the contents of the form be the same all of the time. i.e. if I want to have a page on a form where you collect some information, then the click of a 'next' button effectively switches pages and shows a bunch of other panels and buttons. How do I do that? I've been looking at trying to put things into panels and simply using the enable/disable and hide/show functions of a panel, but that doesn't work as I have to have multiple panels for each page. Not only is it messy trying to edit a bunch of panels that are overlaid, it also doesn't work due to the parenting of panels as you move them over each other. I am not looking for tabbed pages, definately.