Worklog for Braincell

Worklog 1

Return to Worklogs

Released 0.89 alpha(Posted 2006-04-21)
More info in this thread:

http://www.blitzbasic.com/Community/posts.php?topic=58882

DOWNLOAD 660kb
(Includes source, exe, media, userlibs)

_____________________________________________
Peace off

Progress report(Posted 2006-03-05)
This will be a worklog entry i will edit over time that will report how much work approximately remains to be done. (Read progress history below for updates)

-----------------

Current remaining progress to beta: 88%

To do (very approximate %):
10%-Extra work not anticipated (5%)
7%-Complete edge indexing basics(7%)
7%-Add a system of checking edge outward facing(7%)
3%-Test cavity edge exclusion(3%)
7%-Test TFP of vertex index(7%)
7%-Test triangle facing code(7%)
21%-Test current edge index creation and TFP(21%)
10%-Test POC edge extrusion(10%)
11%-Test shadow volume quad updating(11%)
10%-Optimise volume updating to not move stationary quads(10%)
7%-Test volume clipping and capping

Progress history:
-7th: (+5%) +5% on indexing basics. Having math trouble with cavity check (taking ages, here we go...)
-10th: (+4%) +3% on test cavity edge exclusion (very hard), +1% indexing basics.
-11th: (+6%) +5% on edge facing check. Its done but i wont say its complete until i can test it with updatable shadow volumes. +1% on indexing basics, indexing is complete (yay!)
-12th: (+19%) +7% on TFP vert index, +7% triangle facing code, +5% on current edge index. It's all designed fully, so i should make good progress tomorrow.
-13th: (+26%) +16% on current edge index, +10% on POC
-14th: (+5%) +2% On extra work. I just realised i forgout about a fairly small thing. All my data formats are now obsolete so i have to rewrite all the functions controlling casters, receivers, shadow planes, etc. Oops. I've been using separate tests for so long i didnt pay attention to the formats in the library itself. This includes some more redesign about how all the commands are used so i need to be creative and make it easy to use and also customisible for those who need customising. +3% on testing quad updating.
-16th: (+5%) +2% on quad updating, +3 on extra work (rewriting functions). I might skip the quad updating optimisation, im not sure it will work so well in practice.
-19th: (+18%) +6% volume quad updating, +10% optimise updating, +2% check edge outward facing. Now all that is left is to see if my trick for capping volumes will work or if i will have to do a much more time consuming entity copying to cap the volumes, or even make up a new solution. And then there is "reassembling" a few other basic functions to conform with the data format (thats the extra work) and you will have a beta.
-(a few days break because of university)
********April***********
-(work will resume on 8th April)
-12th: I've made testing to find best methods for going between ZFail and ZPass methods. However, i've grown tired of it. So i'll be sorting out the system in its current state and releasing the source code with explanations on what does what. It doesnt make shadows propperly so its going to be called Alpha.
-15th: Must...Not...Give...Upppp.... argh***
-----------------

Hopefully this will give everyone an idea of what is happening without me creating an entry every day. I'm guessing it shouldnt take longer than (yet another) week. Animated b3ds and soft shadows will be added later. Also this is verrrrrrry approximate. Some things may take much more time while others might take far less. You never know, and hence, no dates are given. You know how it is ;)

_____________________________________________
Peace off

Oh, worklogs(Posted 2006-02-27)
I havent worked on the system last few weeks but this week i spent a LOT of time on it. I have made myself work on some features which i planned to release later after some updates, instead of releasing a crude beta at first. There are numerous optimisations in there now such as:
-Finding verts in loaded 3d models which are unwelded but have same XYZ. Some formats (ie 3ds) export the same verts many times for each triangle. It would be stupid to go thru them all and update TFormed positions many times for the same vert so i made the code to ignore duplicates.
-Cavity exclusion. This is an optimisation which ignores all edges which are formed by two triangles that have angle between them <= 180. This is because any valley or cavity in a model never casts shadows and would waste shadow volume update time if it was detected as an edge. I beleive this will speed up the system 130% - 150% depending on how many cavities your 3d model has.

I need to work on this now because knowing myself if i released an unoptimised system i would be less likely to continue work on it after release (i have intrest in other things). So its better for everyone to skip beta and go straight into version 1.0 which i still hope to release in the next 7 days. I was going to do it by the end of February but that nasty month has only 28 days so it really isnt my fault... er... So by today the indexing of 3d models will be done and tested fully (my test apps have more code than the system itself), and i will move into the update loop. The update loop is also 70% done but several components of it are spread out thru my test code and the remaining 30% can be done within a few hours (plus tidying up).

Let's hope nothing goes terribly wrong, but expect it will.

_____________________________________________
Peace off

We have boned B3Ds(Posted 2006-01-06)
This news really shouldn't be here, they should be on the front page of the website but... Spacemonkey managed to get vertice positions of animated b3d files! Dont look at me like that, im NOT JOKING! THE GUY REALLY DID IT! Looks like his TFP dll really helped him a lot because of the way boned b3ds work. I've seen a demo and it really works ladies and gents. What that means for the shadow system is simple, now animated characters will be able to cast shadows as long as they are in b3d format. He tried .x but they export differently every time and are apparently not easy to parse. What more do you need anyway?!?!

In other news, i have managed to redesign the code and speed it up. Altho it is still untested i have far less overhead now than i ever did but i cannot put a number yet to how fast the system will be. I am extremely busy but now that we have what we have i'm certainly putting in extra hours to finish this as soon as i can, and i hope to have a demo in 1 or 2 days (for real this time) but no promises (hahaha).

edit: well maybe not 1 or 2 days, theres yet more things to sort out

Thanks for your attention. :)


_____________________________________________
Peace off

It's coming... soon..ish...(Posted 2005-12-30)
TFP (TFormPoint) DLL has been completed. Perhaps spacemonkey could release that on its own but i beleive we'll wait to release it all in a package. Now the lad continued looking into improving the system and beleive it or not he found that we can get vert positions from .x meshes. He knows his suff, so he already showed me a way to parse through the meshes but because i'm not quite sure how he's working out the animations i wont make any concrete statements. He, on the other hand, says that animated .x meshes casting shadows are only a matter of time. Perhaps b3d would have been possible if there was any kind of real documentation for it, but maybe even then the format isn't that suitable. Who knows.

Yes yes I know, we should just release a beta and scrap the fancy stuff for later improvements. Well the thing is no matter how much coffee i drink there's only so many hours in a day my brain will function and so far i didnt manage to get 2 whole hours straight. It's moving at a snails pace and a day doesnt go by that i dont feel crap about being unable to hurry up.


_____________________________________________
Peace off

I am a nice guy.(Posted 2005-12-14)
Well spacemonkey is reporting huge progress, maybe it's time i change the name of this to "Blitz stencil shadow system" or something. I think he just told me, if i understood correctly, that he pushed through 100 000 verts, and all TFormPoints are being done using a matrix system in a c++ dll, which totally costs 7ms. "IF" i understood him correctly. That means, nearly no overhead for the maths now, only for creating volumes. Good news in any case.

I'll be continuing my part of the work (volume building) in the next few days.

Edit: what that means for users is they can have objects with 100k verts casting shadows without major CPU slowdown, but we'll see about volume building.


_____________________________________________
Peace off

I'm not a nice guy(Posted 2005-11-24)
After looking into working with someone else on the shadow system it turned out i'm not such a nice guy and have little understanding for others. Although it would be good to use a DLL, i will first try the pure blitz method with edge detection. It seems i have a very very big problem understanding what other people's undocumented (DLL and blitz) functions do, for which i am sorry... So basically the last few days were spent looking at the mentioned DLL and trying to figure out what it does by poking stuff into it, to no avail.

And so the work continues. Slower than so far because of exam, but it continues.


_____________________________________________
Peace off

Old posts:(Posted 2005-11-24)
Here are the old posts from the previous worklog (which stopped being useful because idiots only want to use MSIE):

Friday, November 04, 2005
Converting to edge detection

The volume update function has been finalised but the results were bad. On my p4 2.9 ghz machine i could get up to 800 triangles to cast shadows without a slowdown. Very little depends on the graphics card (about 5%). 800 is too little in my opinion. For this reason i will improve it by adding edge detection. I have done tests and i am sure it will be twice as fast, on my machine it can make shadows from 1800 triangles without slowdown.

I didn't go into making an edge-detection system because i believed i could make a smaller one first. Now that i have gone so deep into making this system, making an edge detection system will be easy.

This probably means Beta is less likely to be released by Nov 10. but i will see what i can do.

posted by John_m @ 3:50 AM
1 comments
Wednesday, November 02, 2005
Movement

The volumes can finally move in relation to the light and make nice shadows. A few refinements and i hope it will be ready in a few days. I'm not spending so much time coding lately, so this is pretty fast.

Whats left: implementing the check if triangle is facing the light, updating vert

posted by John_m @ 3:26 PM
0 comments
Sunday, October 30, 2005
Work continues

The first volumes have been sighted in action. Static action nevertheless. Soon they will become dynamic and follow the light! Apart from that only documentation remains. I paid a lot of attention to the ease of use of code, so i had to rewrite many things (and in the docs). Oh and the docs should really be good.

However, making the volume update function may take more time because i want to make it slightly better. So i'll have to do many more tests to see what is fastest. I believe people will appreciate the speed once it is finished (unless i do something totally stupid and it all ends up being very slow, you never know).

It will be using a check to see which triangles are facing the light and extruding them all. Those which are not extruded will be hidden and not updated (the way to hide them is what needs speed testing). I cant figure out a fast way to check edges and create a volume each loop. Besides im not sure how much faster it would be because creation of triangles in real time is slow. I think andrey has done it with a DLL (for his commercial system) but i dont really know. If anyone has better ideas/advice on updating volumes (fredborg, come on!), or good articles, send them to me.

posted by John_m @ 6:27 AM
0 comments
Saturday, October 08, 2005
LSSS development log started

I'm starting this instead of a regular worklog, in case anyone is wondering where i am with developing the stencil shadows system, or even worse, counting on me finishing this soon.

So far i've had very little time but i managed to get most of the functions and data structures laid out (types, banks in types, etc). This proved to be more of a challenge because i've never made a library before that needs to be understandable and easy to use by OTHERS as well as have extensive options on what can be done. It took me a few hours... Also sorted all the functions and constants into includes.

I have also created an even better pseudo code for updating volumes eliminating one TFormPoint command altogether.

What i will do next is make the code which creates a volume, and after that code for updating it. But before that i think i will have to solve the problem of finding the fastest method of determining if a triangle is facing a certain point (light source). That will basically be it, and in theory i could finish it in a few days but i'm going on vacation from 13 to 24th and i have little time now as i need to plan it and prepare. All that will remain is the code for stationary (non-updatable) volumes for scenery which i think will be one of the most useful features of the system.

I still have no real workable ideas for boned meshes, although a huge number of solutions have been considered.

Finally i'll be making documentation along the way.

Planned release date of beta: between 30th October and 10th November...


_____________________________________________
Peace off