Thread: Main Discussion
View Single Post
  #37  
Old 2008-12-17, 13:54
RobG's Avatar
RobG RobG is offline
HMMV
 
Join Date: Aug 2007
Location: South Africa
Posts: 213
Send a message via MSN to RobG
Quote:
Originally Posted by david38 View Post
I've just watched the vids with shadows, it's amazing ! How you do that ? How can I add shadows to my engine ?
Thanks! Its an idea I have been working on for a while now. To have shadows you need to use shaders. Which would mean that your engine would require a slightly more powerfull video card then what it requires at the moment, however the requirements arent that much really, but it is something to note.

The basic idea of 6 polygons (12 triangles) for a tile means that each tile is actually a full 3D box instead of a flat rectangle. And each box has the tile texture "smooshed" onto it. This means that the level will actually be fully 3D and depth sorting other 3D objects is automatically handled by the depth buffer (as you seem to be doing, but in a different way). Each light can then cast shadows becuase it can see the world "in 3d".

I can explain exactly how the shadows are done with the shaders if you are interested, but note that I don't know anything about OpenGL shaders, hehe, only DirectX.

Quote:
Originally Posted by david38 View Post
I think the method you exposed for depth sorting is the equivalent to display list in opengl.
Ah yes, I think you are correct.

Quote:
Originally Posted by david38 View Post
Actually that was my first method. Instead of displaying 3 polygons (or 6 for shadowing ??) for each bricks I was drawing the whole brick in one time as a simple rectangle at a certain depth, getting the texture from a unic big texture like you do.
The goal was to fill the depth buffer bricks by bricks. Display list are for static scenes only but it works great ... until a certain number of bricks. Combined with the character display I couldn't get the 60 fps or even 30 fps on every 3D cards. As I plan to display more than one character, I had to find another method, the alpha channel. Works great for complex scene with a maximum of 256 different depths. The bad point is I can't perform any shadowing...
Oh, so you WERE using the method I am using in my "non-shadowing" engine (with the rectangles per brick). It should definitely not run slowly, even on slightly older cards. What cards were you testing on? In the most complex level in LBA2 my engine was running at over 1300FPS, granted it was running on a geforce8800, (cheap these days) and no character was being rendered, but surely this method would easily hit 60FPS on slower cards.

Quote:
Originally Posted by david38 View Post
Yes I've seen the work for getting original meshes from LBA but I prefer to work with new meshes like the one made by Jasiek. It has to be animated and textured, and also it has to be compatible with blender. Jasiek didn't answered to the mail I sent to him via this forum, dont know if he actually received it.
By now my plans are to import home made meshes and not comercial ones, correcting black lines bug, adding chasing camera, add collision detection. That's a lot !
Well sounds like you have a lot to do! But I think the hardest is making a good collision system. I'm still playing with different ideas to get mine right.
__________________

Reply With Quote