Well, last week was a lot of fun, the second half especially (the first half of the week was rubbish, as explained in my last post). However, it's over now and I've gotta concentrate on writing up my dissertation.
This task is unfortunatly being hampered by my body. Yes, that's right, I've got a throat infection and since I went to the doc's on Monday to get some antibiotics I've been feeling rubbish. Constant headache kinda thing, not sleeping well and generally not being able to concentrate. Nor does it help that there's no one in my house but me, or that it's suddenly turned really sunny outside and I don't have a laptop. I've just gotta not let it get to me ![]()
However, some really good news:
The Project WORKS!!
After discovering my rather mickey-mouse error of giving a 16-bit IndexBuffer a 32-bit integer stream everything suddenly started working. Clipping works very well too and I appear to have gotten Clip3 to work too (Clip3 is a clipping case where all of the vertices of a triangle are considered to have been clipped by different polygons but there is infact still data inside the volume).
Here's a picture to show you:
This model is the 4000+ polygon model "tiny" supplied with the DirectX SDK. Some things of note. Currently, not all polygons are correctly wound. I need to get it to look at which way the original triangle's normal is facing and then wind it in the correct direction. Also, the mesh does not retain any texture data. This is quite simply because I'm not giving it any. For polygons totally inside a volume this would be easy to implement, however, for clipped polygons this would just be another thing to work out and it's quite tricky. This process also occurs in noticable time i.e. about half a second. With larger models this would be more noticable, with models of around 1000 polygons it may not be noticable.
To improve the performance of this method, I plan to multi-thread it to make use of my dual-core processor. Am I cheating? Not really. Basically I want it to have the initial intersection in the main thread and then each call to clip is in another thread. To avoid any indexing screwups the main thread will have to wait for the clip to join before it calls another clip or adds to the vertices itself. I'll have to run that past my tutor though, just to make sure it's not going to ruin everything or that there isn't a better way.
One final thing. It should be noted that I'm not cut out for 3D modelling. Since the generator didn't work and I'm having to manually make each crack pattern, then manually edit the .X file so that each polygon is double-sided and that it is indexed in such a way that each volume goes from one series of indices to another before describing any other part of the model. When you've just finished making a 200 polygon model, you know that's when it's going to get tedious and in my current mental state I'm just not feeling the love. As this entry title says, don't let it get to you.
![]()
Steve
Currently Listening To: M83, Pure Reason Revolution, The Infadels, The Raconteurs. 4 bands that I've only just started to listen to but all of them are utterly amazing.
Currently Eating: Amoxicillin
Currently Drinking: Masses of tea
Currently Watching: Deal or No Deal (UK version, infinitly better than any other)
Words in dissertation: 9,200

