Dark Bit Factory & Gravity

GENERAL => Projects => Topic started by: Stonemonkey on April 21, 2007

Title: Work on my engine so far.
Post by: Stonemonkey on April 21, 2007
Another of my strange tests, L/R mouse buttons turn left/right, both buttons together to move forward. I will eventually get round to doing something with this stuff.

EDIT: d/l in later post.
Title: Re: Work on my engine so far.
Post by: rain_storm on April 21, 2007
reminds me af saturday nights thats trippy man I love it ;D
Title: Re: Work on my engine so far.
Post by: Jim on April 21, 2007
Cool!  The controls are good fun to try to master - I know they're just for test, but try zooming round the city :)
I think something's slightly amiss with the texture filtering (probably the magnification filter setting) - there's a grey band a short way into the distance.

Psycho textures man!

Jim
Title: Re: Work on my engine so far.
Post by: benny! on April 21, 2007
Indeed. Controls are strange. Turning left / right works fine. Pressing both keys at
the same time the screen goes black !?

But it looks very strange - and I mean strange in a positive way. Weird design - I
like it. Looks like an interesting start - keep it up !
Title: Re: Work on my engine so far.
Post by: relsoft on April 21, 2007
Awesome engine. A little too slow here but considering it does z-buffering, I would consider this fast.

With octrees + octreebased z-buffers, this would fly!
Title: Re: Work on my engine so far.
Post by: Shockwave on April 21, 2007
This engine is softrendered? :)
It really burns on this laptop (centrio dual core 1.83ghz).

Mad stuff! Well done.. You should ask Sarek or Wham to make you some nice textures.
Title: Re: Work on my engine so far.
Post by: Stonemonkey on April 21, 2007
Thanks rain_storm, I'm not gonna ask what you get up to on saturday nights.

Yep Jim, all for testing atm and i'm planning on making it all a bit less gridlike too, as for the mipmapping, it's still just very basic and a bit difficult to get a balance.

Sorry Benny, I don't really know what could be causing that but I'll look into it.

Relsoft, I'll have a look into that.

Thanks Shockwave, yep it's software rendered. As usual though my textures aren't up to much so might need some help with stuff like that at some point.

Fryer.

EDIT: Think there's something up with my delta timing.
Title: Re: Work on my engine so far.
Post by: rdc on April 21, 2007
Impressive work so far.
Title: Re: Work on my engine so far.
Post by: ninogenio on April 21, 2007
great stuff fryer!

are the building hardcoded? if they are i bet it took some time.
Title: Re: Work on my engine so far.
Post by: Stonemonkey on April 21, 2007
Quote
are the building hardcoded? if they are i bet it took some time.

yep, 376 triangles and 664 vertices per floor.
Title: Re: Work on my engine so far.
Post by: ninogenio on April 21, 2007
excellent!

im going to have to give this hardcoded modelling a shot sometime.
Title: Re: Work on my engine so far.
Post by: Tetra on April 21, 2007
Sweet, really nice, man thats a lot of polys on screen :)
Title: Re: Work on my engine so far.
Post by: rain_storm on April 22, 2007
Hardcoded? does that mean that those buildings are generated by code instead of being loaded from a 3ds file.
Title: Re: Work on my engine so far.
Post by: Stonemonkey on April 22, 2007
Yes, for these buildings I have a function that can add each window panel to the model at whatever coordinates and direction it faces so i just have a couple of loops that add each window. I'm going to add a bit more variety to what can be added such as doors and things and probably have more basic stuff for higher up on the buildings.
Title: Re: Work on my engine so far.
Post by: rain_storm on April 23, 2007
Thats got my respect really cool that you chose to build the environment piece by piece
Title: Re: Work on my engine so far.
Post by: Stonemonkey on April 26, 2007
Made some improvements, as well as the buildings there's 100,000 cubes around the place and i think i've fixed the delta timing.

It takes a little longer to start up, so there's a blank window for a little while.
Title: Re: Work on my engine so far.
Post by: rain_storm on April 26, 2007
Thats heck of a lot of boxes my memory isnt able for it though so it runs a little slow when there are too many boxes visible but at the edges of the city the speed picks up again
Title: Re: Work on my engine so far.
Post by: Stonemonkey on April 26, 2007
It shouldn't really be a memory issue, it's pretty much constant at 30Mb. It's more just the amount of work it has to do with all that in view.
Title: Re: Work on my engine so far.
Post by: rain_storm on April 26, 2007
That must be it with all those blocks in the scene they look like a massive flock of birds
Title: Re: Work on my engine so far.
Post by: ninogenio on April 26, 2007
its a little slow here bat as you say with all that geomitry/pixel pushing its a quick engine!

great stuff.
Title: Re: Work on my engine so far.
Post by: Voltage on April 27, 2007
Great work stonemonkey!  I am in awe of you transparent chess pieces.  They are truly amazing.  It runs quite fast here.  Athlon 3800 dual core.

The latest proggy... project3.exe runs at approx 10-15 FPS here.  No glitches, looks sexy.

Keep the posts rolling in on this project please mate.

Are you doing frustrum culling or octrees or anything funky like that?
Title: Re: Work on my engine so far.
Post by: Stonemonkey on April 27, 2007
Thanks, nothing too funky voltage but it does some occlusion using the z buffer and bounding boxes which should be a bit more effective with more detailed objects than cubes.
Title: Re: Work on my engine so far.
Post by: Shockwave on April 27, 2007
Cripes! There's a lot of stuff being drawn in that preview. The delta timing is working really well though and although it's noticeable slightly that the framerate has dropped when there's a lot on the screen, it still works very well indeed.

The building models look really great by the way! Nice to see ledges etc. It would look even better with real textures but that will be for the future I'm sure :)
Title: Re: Work on my engine so far.
Post by: Rbz on April 28, 2007
Nice engine,  are you trying to remake debris by farbrausch (http://www.pouet.net/prod.php?which=30244)  ?  ;)
Title: Re: Work on my engine so far.
Post by: Stonemonkey on April 28, 2007
sw rendered remake of debris........ hmmm not quite what I have in mind.
Title: Re: Work on my engine so far.
Post by: Stonemonkey on August 18, 2007
Just been trying out some sort of filtering, basically reading 4 texels with some weighted average and it makes quite a difference:

(http://www.stonemonkie.pwp.blueyonder.co.uk/filtering.JPG)

Title: Re: Work on my engine so far.
Post by: Shockwave on August 18, 2007
Yes, you can see it most clearly on the road markings.
Title: Re: Work on my engine so far.
Post by: Stonemonkey on August 18, 2007
Yep, I have a few problems with mipmapping things like roads that are quite an angle to the camera. Here's an exe of it, that filtering doesn't cost too much but I've done a few other things too to try and improve the quality so it's pretty slow atm.

Takes a little while (white window) to start, mouse buttons to turn/both together move forward.
Title: Re: Work on my engine so far.
Post by: Shockwave on August 18, 2007
It looks much better in motion in fact.
People who download this, press lmb for left, Rmb for right, hold both buttons to move.
Title: Re: Work on my engine so far.
Post by: Stonemonkey on August 18, 2007
This is cool, at least to me. While sorting out the texture alignment a bit (if you look at the yellow lines on the road, they don't quite line up with the lines on the crossroads) I fixed that but now I now have the same problem I've experienced with hw rendering with the edges of textures being wrapped around slightly and is fixed by clamping the textures so I understand why that happens now although I'm not quite sure how to deal with it in this.
Title: Re: Work on my engine so far.
Post by: Stonemonkey on August 18, 2007
Heh, only run this if you have a monster of a pc. I've managed to fix the problem a little but there's still a slight visible line on the roads, just before the junctions.
This needs the textures from the zip a couple of posts up.

It's rendered at 1280*960 with each pixel reading and blending 4 texels then the final image shrunk down to 640*480, as well as the buildings there's 100,000 cubes and a dynamically cubemapped sphere. I get around 1fps.
Title: Re: Work on my engine so far.
Post by: Jim on August 19, 2007
Unfortunately that crashes immediately :(

The filtering's making an enormous difference.  Are you doing this by rendering a much larger screen and downsampling, or are you dealing with it in the triangle drawing?

N64 had this algorithm - every byte in screen memory had 9 bits.  The 9th bit would be set (or maybe xored) if the pixel drawn there was on the edge of a triangle.  The hardware doing the DAC would look at these bits for neighbouring pixels and smooth those pixels that changed from a 1 to a 0 or a 0 to a 1.  That gave edge antialiasing really cheaply.

Jim
Title: Re: Work on my engine so far.
Post by: Stonemonkey on August 19, 2007
Did you get the textures from the attatchment 2 or 3 posts back?

It's rendering to a larger buffer (2*2) at first then shrinking it down. It also looks up 4 texels for each pixel and does some weighted blending so it's really doing 16 texture lookups, 4 shading calcs and a whole lot of blending for each pixel of the final image. I think I can get it down to 1 shading calc and improve my blending method a bit.
Title: Re: Work on my engine so far.
Post by: Jim on August 19, 2007
My bad, I didn't have the textures :)

It looks great - the antialiasing looks seriously smooth!

So basically you're doing a bilinear filter on the source texture and then 2xAA on the output?  In software and it runs at that speed is really impressive.

Jim
Title: Re: Work on my engine so far.
Post by: Stonemonkey on August 19, 2007
"So basically you're doing a bilinear filter on the source texture and then 2xAA on the output?"

Yep, pretty much. Not sure how useful it's all going to be as I do want to keep the speed up but I'll see what I can do. The filtering makes a big difference to the textures and isn't particularly expensive but the AA only really makes a difference along the edges and is expensive.
Title: Re: Work on my engine so far.
Post by: taj on August 19, 2007
I am amazed it runs that quickly. Stunned...100,000 cues, cubemapped at that resolution? Wow.
Title: Re: Work on my engine so far.
Post by: Stonemonkey on August 19, 2007
Maybe come up with a solution to the AA being so costly,  :inspired: 1.5*AA instead. It works and still looks pretty smooth along the edges. So instead of rendering at 1280*960 it's only rendering at 960*720 and blending each block of 3*3 pixels down to 2*2.

It's not just as good as 2* but doesn't cost nearly as much and is definitely much better than nothing.

.exe with the textures.
Title: Re: Work on my engine so far.
Post by: Clyde on August 20, 2007
Great Job :)
Title: Re: Work on my engine so far.
Post by: Stonemonkey on August 20, 2007
Cheers clyde.

Going to give ripmapping, or at least how i think that works a go. As well as reducing the height and width of each mipmap other maps are made that only reduce either the height or the width. Done some tests with just stretching the textures atm and it looks like it'll help with the smearing and aliasing of road textures and other surfaces at angles to the camera in the distance.
Title: Re: Work on my engine so far.
Post by: Stonemonkey on August 28, 2007
Got that working fairly well, it does quite a good job of getting rid of the smearing of the road textures in the distance. Now got a little bug in the alignment of some of the textures to sort out but it's not too bad.
Title: Re: Work on my engine so far.
Post by: Jim on August 28, 2007
Looks very smart and it's still running at an acceptable rate (I'd guess about 20fps).
Jim
Title: Re: Work on my engine so far.
Post by: Shockwave on August 28, 2007
This runs nicely here too, I am getting about the same speed as Jim, if it looks this good with these textures, I am sure it would look exponentially better when you apply professional quality textures (there are thousands available on the net). And also maybe a lower resolution version?

If borders were included you might have enough to add shadows to this which would make a big difference as well. It's surely a really impressive project.
Title: Re: Work on my engine so far.
Post by: Stonemonkey on August 28, 2007
ty, as usual it's all just placeholder type stuff while i'm working on it. There are a lot of things I'm still wanting to do, shadows being one but with the detail of the building models (the smallest being almost 1900 tris and the largest is double that) that's a lot of detail for the shadow volumes too and it's a little more difficult to do the occlusion for those as the object doesn't need to be in view to be casting a shadow within the scene. I'll probably use some sort of border and maybe get rid of the fullscreen AA which would speed things up a bit and help out with the shadow problem a bit and I have some other ideas on mind too.
Title: Re: Work on my engine so far.
Post by: Stonemonkey on August 28, 2007
On another note and I've maybe said something like this before, I know that some would prefer for me to post more source but I don't really feel there is much that could be learned from it that shouldn't be learned from writing by themselves. IMO giving out code that bits can be copied from to solve particular problems doesn't give any understanding of the solution (and sometimes the problem itself, which I've found to be the case when trying to explain what some of the problems I've encountered are) which will only give more problems when trying to progress further. Saying that though, I have no problem discussing any of it with anyone interested or working on something similar and posting some example code of things that I think would be more useful.