tag:blogger.com,1999:blog-76557038189166078212024-03-19T08:07:49.321+00:00Year 4 Project: Voodoo codeDev-jounal for my 4th year project at Abertay CGT.Kepehttp://www.blogger.com/profile/05540414164317958450noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-7655703818916607821.post-6177116287043193562009-05-16T19:05:00.003+01:002009-05-16T19:44:40.148+01:00Final stretchLast week of project time, now focusing entirely on writing the dissertation. The main technique I had hoped to explore in my project will, unfortunately, remain unfinished.<br /><br />On reflection, it was a poor choice of investigation, and had I done in-depth research of my own, instead of relying on results gathered from previous papers, I may have re-evaluated the scale of the problem.<br /><br />I had also hoped that this project would be a platform for learning more advanced shader programming, however, since I had only a basic understanding of shader implementation at the beginning of the project, I underestimated the time needed to learn the skills required, setting me back quite substantially.<br /><br />The techniques I had hoped to explore were also much more complex than my initial research suggested. If I could revise my project with the knowledge I have now, I would focus exclusively on ONE technique instead of trying to investigate three.<br /><br />As a direct result of this, my results are poor, with many missing parts. There are results available from previous research for all of these techniques which I can use, however, these results are at least 5 years out of date now and would almost certainly be different with current generation hardware.<br /><br />In spite of poor initial planning, I hope some meaningful conclusions might finally be achieved.Kepehttp://www.blogger.com/profile/05540414164317958450noreply@blogger.com0tag:blogger.com,1999:blog-7655703818916607821.post-58976440165359041272009-04-12T10:34:00.005+01:002009-04-12T10:59:55.426+01:00AprilComing to the final few weeks of project time, progress on my current schedule in not satisfactiory. This would not normally be a problem since I planned for a few weeks slippage. I had been trying to avoid a last minute rush, unfortunately my week off for illness, on top of previous delays with my shaders, have pushed my schedule past the deadline. According to my initial schedule, I should be progressing on the shell/fin method, while I'm still stuck on particle fur.<br /><br />In order to make up this lost time, I'm cutting out as many distractions as possible and focusing 100% on coursework. So for the next 3 weeks I'll be in crunch mode, however if all goes well, I should be finished with a several days to spare.<br /><br />I've updated my chart to account for the lack of time, and my new work schedule:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5X1YXcZ5O2UkxMH9sKZsj_lzjUnbe4UHwGeZfMdJGnm-1W6YoEz27-WLQGcJCVnYrVvHiCl2WQoQDNEh8s6KIs14wyZZH2z2cnfDHh8gwMDM3glM4YbMCquiCy6Br-ChdyukoGfeHwCA/s1600-h/plan.PNG"><img style="cursor: pointer; width: 486px; height: 230px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5X1YXcZ5O2UkxMH9sKZsj_lzjUnbe4UHwGeZfMdJGnm-1W6YoEz27-WLQGcJCVnYrVvHiCl2WQoQDNEh8s6KIs14wyZZH2z2cnfDHh8gwMDM3glM4YbMCquiCy6Br-ChdyukoGfeHwCA/s400/plan.PNG" alt="" id="BLOGGER_PHOTO_ID_5323741399740262210" border="0" /></a>Kepehttp://www.blogger.com/profile/05540414164317958450noreply@blogger.com0tag:blogger.com,1999:blog-7655703818916607821.post-45606106956686279102009-04-01T16:17:00.002+01:002009-04-01T16:33:22.581+01:00Unexpected delaysI have been unable to work this past week due to illness. This has taken over a week from my schedule and means I'll need reorganize my working time to make up this lost week.Kepehttp://www.blogger.com/profile/05540414164317958450noreply@blogger.com0tag:blogger.com,1999:blog-7655703818916607821.post-78260609677592447032009-03-10T16:52:00.001+00:002009-03-10T16:56:55.913+00:00<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKKr8uKcFThLIddMhwiguffIuzVOw3SGoAhxJiEaPVh63uxQJSRTXHtZFYxyIgemvnkNajFtIg2Cn9TpLCCv9kRrO-H0yAv1KFWlFRv8DCjk7b8T_eF0A845XTQLNmWatoB3KhXe13oTo/s1600-h/project+initial+plan.png"><img style="cursor: pointer; width: 400px; height: 159px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKKr8uKcFThLIddMhwiguffIuzVOw3SGoAhxJiEaPVh63uxQJSRTXHtZFYxyIgemvnkNajFtIg2Cn9TpLCCv9kRrO-H0yAv1KFWlFRv8DCjk7b8T_eF0A845XTQLNmWatoB3KhXe13oTo/s400/project+initial+plan.png" alt="" id="BLOGGER_PHOTO_ID_5311604123441238706" border="0" /></a>Kepehttp://www.blogger.com/profile/05540414164317958450noreply@blogger.com0tag:blogger.com,1999:blog-7655703818916607821.post-19836701878702324092009-02-17T21:29:00.004+00:002009-02-17T22:09:12.143+00:00Warm, fuzzy, furry project milestones<span style="font-size:130%;">Milestone 1:</span><br /><br /><span style="font-weight: bold;">Task:</span> Impliment basic particle systems using directX 9 fixed pipeline.<br /><span style="font-weight: bold;">Goal:</span> Get back into graphics progamming, become familiar with the basics of particle systems.<br /><span style="font-weight: bold;">Time:</span> February 16 --> 23 (1 week)<br /><br /><br /><span style="font-size:130%;">Milestone 2:</span><br /><br /><span style="font-weight: bold;">Task: </span>Impliment a particle system using vertex and pixel shaders.<br /><span style="font-weight: bold;">Goal:</span> Create a workable framework to use shaders. Get a good understanding of HLSL.<br /><span style="font-weight: bold;">Time:</span> February 23 --> March 16 (2 weeks)<br /><br /><br /><span style="font-size:130%;">Milestone 3:</span><br /><br /><span style="font-weight: bold;">Task: </span>Create a particle based hair/fur renderer.<br /> <span style="font-weight: bold;">Goal:</span> To have a good understanding of how to visually approximate hair/fur.<br /> <span style="font-weight: bold;">Time: </span>March 16 --> March 30 (2 weeks)<br /><br /><br /><span style="font-size:130%;">Milestone 4:</span><br /> <br /> <span style="font-weight: bold;">Task: </span>Attempt possible optimisations, inculding implimenting the shell/fin method.<br /> <span style="font-weight: bold;">Goal:</span> Get performance results for the various optimisations.<br /> <span style="font-weight: bold;">Time: </span>March 30 --> April 20 (3 weeks)<br /><br /><br /><span style="font-size:130%;">Milestone 5:</span><br /> <br /> <span style="font-weight: bold;">Task: </span>Gather results for comparison annd write report<br /> <span style="font-weight: bold;">Goal:</span> Find if any of the methods researched are appropriate for games.<br /> <span style="font-weight: bold;">Time: </span>April 20 --> Hand-in deadline (2-3? weeks)Kepehttp://www.blogger.com/profile/05540414164317958450noreply@blogger.com0tag:blogger.com,1999:blog-7655703818916607821.post-5080705015743345042009-01-14T15:43:00.001+00:002009-01-14T15:48:27.679+00:00Final proposal<span style="font-weight: bold;">Introduction:</span><br />The overarching aim of the project is to create a fairly realistic looking model of hair and fur which can be rendered in real-time and could be used in a game environment.<br /><br />This is an area which has been somewhat neglected in game graphics, possibly due to the perceived difficulty of the subject. Most current methods of creating hair and fur depend entirely on the skill and time of the artist. More advanced techniques have already been used in games, such as Shadow of the Colossus, however they have never been widely adopted.<br /><br />By implementing a procedural method of hair generation, coupled with some very clever optimization as presented by Lengyel et al, I believe it is possible to take a massive step forward in the visual quality of hair and fur in games.<br /><br />To do this, I will investigate particle-based hair systems, then several possible alternatives and optimisations. This includes the relatively common overlapping polygonal strip approach as presented in the Black & White (Lionhead, 2001) games.<br /><br />I will examine the volumetric texture-based technique presented by Kajiya & Kay in 1989, however this method has been shown to be too computationally intensive for real-time purposes. (Sheppard 2004, p.3) Optimisations based on this technique can be used in real-time and will form the core investigation of this project. (Meyer and Neyret, 1998, p.1)<br /><br />I will investigate the shell rendering approach first presented by Meyer and Neyret. There are a number of improvements which have been made to their system, most notably by Lengyel with the introduction of fin textures. I will also look into projects which optimise these techniques for current graphics hardware using shaders. (Sheppard 2004, p.43)<br /><br /><br /><span style="font-weight: bold;">Research question:</span><br />"Can hair and fur be added into a real-time, 3D, game environment? If so, what techniques can be used, and how effective are they?"<br /><br /><br /><span style="font-weight: bold;">Project Execution:</span><br />Firstly, a basic 3D framework will be built as a testing environment. This will most likely be done on top of DirectX9 due to its more consistent shader support, although OpenGL remains a possibility at this point. The API chosen will not make any difference to the project beyond the initial framework setup and the shader language supported.<br /><br />Once the testing environment is completed, I will begin implementing and testing the various techniques I have researched. There are three techniques I am hopeful for and wish to study in detail:<br /><br />1.Particle-based hair<br />2.Overlapping polygonal strips<br />3.The shell and fins method as presented by Lengyel.<br /><br />For the sake of simplicity, a range of test models with UV mapped textures will be found. This should provide a good indicator of how the different hair and fur types might look when applied to real game assets.<br /><br />The initial creation for the hair system will be done using particles. Once the basic rendering is taken care of, the system needs to be refined and polished into a workable model of hair and fur. This involves creating adjustable parameters for the hair properties, such as:<br /><br /><ul><li>Colour</li><li>Length</li><li>Curl</li><li>Density</li><li>Stiffness</li><li>Thickness </li></ul><br />These parameters can stored in a texture (or textures) and UV mapped onto the test model. Hair directionality, or combing, needs to be stored as a vector.<br /><br />While particle hair provides the basis for the other methods, it it likely too slow to be of practical use due to the large amount of calculation needed each frame. At this stage of development we can move on to implementing the more optimised texture-based techniques.<br /><br />For each approach, time must also be taken to investigate possible optimisations for modern graphics hardware. The most obvious optimisation is to move the bulk of graphical calculation into the GPU with use of shaders. The implementation and optimisation of these three techniques will take the bulk of the project execution time.<br /><br />When the rendering is completed to a usable stage, I will begin to compare the output of the program in terms of visual quality and framerate in order to determine which, if any, of these techniques may be suitable for 3D games.<br /><br />However it is worth noting that, of the texture-based techniques, the shell and fin method seems to be the most promising for a real-time game implementation and will likely end up as the primary focus as the project moves towards completion.<br /><br /><br /><span style="font-weight: bold;">Evaluation:</span><br />In order to determine a good measurement of visual quality, I will follow the same procedure presented in Sheppard's Real-time Rendering of Fur p.53. That is, take a real image of hair or fur and attempt to faithfully reproduce its visual properties using my techniques. This should give a fairly robust test of the methods, both individually and comparatively.<br /><br />Of course, photo-realism is not always the intended goal in games. With this in mind, various effects will be created to find the visual limits and weaknesses of each technique.<br /><br />To determine performance of each method, the framerate of the program will be used. While framerate is not a perfect measure of performance, it serves as a relative guide to compare performance between the different methods.<br /><br /><br /><span style="font-weight: bold;">Issues:</span><br />There are a few potential issues which could cause problems, however these are fairly minor and unlikely to affect the final outcome of the project.<br /><br />With the exception of particle-based systems, all the techniques listed are limited to creating short to medium length hair and fur. They cannot be used for long or extremely stylised hair, or to create complex hair interactions. They also sacrifice any complex, realistic dynamics for the sake of speed. (Sheppard 2004, p.14) Fortunately this is unlikely to be a problem for a game environment.<br /><br />Another minor problem is that it is extremely difficult to measure the visual quality of hair and fur in, definite, quantitative terms. The quality must be judged by the viewer, in this case myself, and will be subject to the viewer's own bias.<br /><br /><br /><span style="font-weight: bold;">Resource Requirements:</span><br />A standard, modern PC with a C++ compiler and either the DirectX 9.0c or OpenGL SDK installed. No other special requirements.<br /><br /><br /><span style="font-weight: bold;">Conclusion:</span><br />Hopefully this project will provide some motivation for future development into this area of graphics. "A vast number of creatures in the animal kingdom exhibit some kind of fur." (Sheppard 2004) Hopefully in the future these creatures can be presented in full furry 3D.<br /><br /><br /><br /><span style="font-weight: bold;">References:</span><br /><br />J. T. Kajika, T. L. Kay (1989) Rendering Fur With Three Dimensional Textures. ACM SIGGRAPH Computer Graphics Volume 23, Issue 3<br /><br />A. Meyer & F. Neyret, (1998) Interactive Volume Textures. Eurographics Rendering workshop<br />1998, p. 157 – 168<br /><br />J. Lengyel, E. Praun, A. Finkelstein, H. Hoppe, (2000) Real-Time Fur over Arbitrary Surfaces. [online] Available from: http://research.microsoft.com/~hoppe/fur.pdf<br /><br />G. Sheppard, (2004) Real-time Rendering of Fur. [online] Available from: http://www.gamasutra.com/education/theses/20051028/sheppard_01.shtml<br /><br />SCEI. (2006) Shadow of the Colossus. Playstation 2. SCEI.<br /><br />Lionhead Studios. (2001) Black & White. PC. Electronic Arts. Feral Interactive http://www.lionhead.com/bw2 (Last visit 08/12/2008)<br /><br /><br /><span style="font-weight: bold;">Bibliography:</span><br /><br />M. Pharr, (2005) GPU Gems 2. Addison-Wesley Professional<br /><br />Hubert Nguyen (2007) GPU Gems 3. Addison-Wesley Professional<br /><br />Blender Foundation (2008) Blender [online] Available from: http://www.blender.org/development/release-logs/blender-246/hair-and-fur/Kepehttp://www.blogger.com/profile/05540414164317958450noreply@blogger.com0tag:blogger.com,1999:blog-7655703818916607821.post-53053825886473805432008-11-14T22:20:00.000+00:002008-11-14T22:21:07.522+00:00Honours Project Worksheet — #3Introduction<br />The overall aim of the project is to create a fairly realistic looking model of hair and fur which can be rendered in real-time and could be used in a game environment.<br /><br />To do this, I will investigate particle based hair systems, then several variations on the shell and fin optimization (Hoppe et al). This includes the more common overlapping polygonal strip approach.<br /><br /><br />Motivation<br />This is an area which has been somewhat neglected in game graphics, possibly due to the perceived difficulty of the subject. Most current methods of creating 'realistic' hair depend entirely on the skill and time of the artist. More advanced techniques have already been used in games, such as Shadow of the Colossus and Black&White, however they have never been widely adopted.<br /><br />By implementing a procedural method of hair generation, coupled with some very clever optimization as presented by Hoppe et al, I believe it is possible to take a massive step forward in the visual quality of hair and fur in games.<br /><br /><br />Research question<br />"Can hair and fur be added into a real-time, 3d, game environment? If so, what techniques can be used, and how effective are they?"<br /><br />Addressing the Question<br />Firstly, a basic 3D framework will be built as a testing environment. This will most likely be done on top of DirectX9, although OpenGL remains a possibility at this point.<br /><br />Once the basics are in place I will begin implementing and testing the various techniques I have researched. I will then compare the results in terms of visual quality and framerate in order to determine which, if any, of these techniques are suitable for 3d games.<br /><br />Resource Requirements<br />A standard, modern PC with either DirectX or OpenGL SDK installed. No special requirements.<br /><br />-----<br /><br />References and Bibliography<br /><br />Lengyel, J. Praun, E. Finkelstein, A. Hoppe, H. Real-Time Fur over Arbitrary Surfaces<br />http://research.microsoft.com/~hoppe/fur.pdf<br /><br />Sheppard, G. 2004 Real-time Rendering of Fur http://www.gamasutra.com/education/theses/20051028/sheppard_01.shtml<br /><br />SCEI. 2006. Shadow of the Colossus. Playstation 2. SCEI.<br /><br />Lionhead Studios. 2001. Black&White. Electronic Arts Feral InteractiveKepehttp://www.blogger.com/profile/05540414164317958450noreply@blogger.com0tag:blogger.com,1999:blog-7655703818916607821.post-210520564262507992008-10-24T20:20:00.002+01:002008-10-24T20:28:16.396+01:00Worksheet 2 with notes<span style="font-size:85%;"><span style="font-family: verdana; font-weight: bold;">At this point, I'm fairly settled on my question, and I'm moving on to researching specifics and methodology.</span><br /><br /><span style="font-family: verdana;"><span style="font-weight: bold;">1.</span> Can hair and/or fur be added into a real-time, 3d, game environment? If so, what techniques can be used, and how effective are they?</span><br /><br /><span style="font-family: verdana; font-weight: bold;">2.</span><br /><br /><span style="font-family: verdana;">a) Real-time hair and fur rendering techniques and their application in games.</span><br /><br /><span style="font-family: verdana;">b) Current technology and techniques.</span><br /><br /><span style="font-family: verdana;">c) Implement and test different techniques.</span><br /><br /><span style="font-family: verdana;"><span style="font-weight: bold;">3.</span> Compare results with regard to realism, rendering cost and overall speed.</span><br /><br /><span style="font-family: verdana;">Notes:</span><br /></span><ul><li><span style="font-size:85%;"><span style="font-family: verdana;">May be a bit broad an area, could read up on a few and pick three of four to do a comparison on.</span></span></li><li><span style="font-size:85%;"><span style="font-family: verdana;">Have you thought about what these test would be? And how you would you create a program environment to do these tests.</span></span></li><li><span style="font-size:85%;"><span style="font-family: verdana;">How would you test the speed of the algorithms’, how long it would take for the program to complete? May also have to take into account the more realistic the method then the longer rendering will take.</span></span></li></ul><span style="font-size:85%;"><br /><br /></span>Kepehttp://www.blogger.com/profile/05540414164317958450noreply@blogger.com0tag:blogger.com,1999:blog-7655703818916607821.post-24639621176016634182008-09-29T08:34:00.000+01:002008-09-29T08:37:05.275+01:00Initial research topic ideas<p style="margin-bottom: 0cm;font-family:verdana;"><span style="font-size:100%;"><b>Topic</b>: Real-time hair and fur rendering for 3D characters</span></p> <p style="margin-bottom: 0cm;font-family:verdana;"><span style="font-size:100%;"><b>Issues</b>: One of the final steps toward 'photo-realistic' characters. Very difficult to implement in real-time. Several real-time techniques currently used in games, though non give very good results. A few highly realistic techniques available, but are rarely used in games.</span></p> <p style="margin-bottom: 0cm;font-family:verdana;"><span style="font-size:100%;"><b>Practical</b>: Investigate current techniques as used in film and games. Assess each technique for cost/benefits. See if realistic techniques can be adapted/optimised for current graphics hardware. Attempt to find optimal technique for real-time game characters. </span></p> <p style="margin-bottom: 0cm;font-family:verdana;"></p><p style="margin-bottom: 0cm;font-family:verdana;"><span style="font-size:100%;"><br /></span> </p> <p style="margin-bottom: 0cm;font-family:verdana;"></p> <p style="margin-bottom: 0cm;font-family:verdana;"><span style="font-size:100%;">Particle method:</span></p> <p style="margin-bottom: 0cm;font-family:verdana;"><span style="font-size:100%;">http://en.wikipedia.org/wiki/Particle_system#Snowflakes_versus_hair</span></p><p style="margin-bottom: 0cm;font-family:verdana;"><span style="font-size:100%;">http://blenderartists.org/forum/showthread.php?t=40299</span></p> <span style="font-size:100%;"><br /></span> <p style="margin-bottom: 0cm;font-family:verdana;"><span style="font-size:100%;">Shell and fin style method:</span></p> <p face="verdana" style="margin-bottom: 0cm;"><span style="font-size:100%;">http://research.microsoft.com/~hoppe/fur.pdf</span></p> <p face="verdana" style="margin-bottom: 0cm;"><span style="font-size:100%;">http://www.gamasutra.com/education/theses/20051028/sheppard_01.shtml</span></p> <p style="margin-bottom: 0cm; font-family: verdana;"><span style="font-size:100%;">http://edusworld.org/ew/ficheros/2006/paginasWeb/making_of_sotc_files/</span></p>Kepehttp://www.blogger.com/profile/05540414164317958450noreply@blogger.com0tag:blogger.com,1999:blog-7655703818916607821.post-8654189655777334692008-09-29T08:09:00.000+01:002008-09-29T08:24:58.015+01:00Welcome to VOODOOCODE<a style="font-family: verdana; font-weight: bold;" id="voodoo-programming"><dt xmlns="" id="voodoo-programming"><span style="font-weight: normal;">Hello, welcome my 4th year blog. This is where I'll be keeping all the news, info and development journals for my honours project. I'll try to keep it easy to follow and amusing, as far as possible.</span><br /></dt></a><br /><a style="font-family: verdana;" id="voodoo-programming"><dt style="font-weight: bold;" xmlns="" id="voodoo-programming"><br /></dt><dt style="font-weight: bold;" xmlns="" id="voodoo-programming"><span style="font-size:130%;"></span></dt></a><span style="font-size:130%;"><a id="voodoo-programming"><span style="font-weight: bold;">"voodoo programming: </span><span style="font-weight: normal;" xmlns="http://www.w3.org/1999/xhtml" class="grammar">n.</span></a></span><dd><p><a style="font-weight: bold;" id="voodoo-programming"> </a><a id="voodoo-programming">1. The use by guess or cookbook of an </a><a href="http://catb.org/esr/jargon/html/O/obscure.html"><span class="glossterm">obscure</span></a> or <a href="http://catb.org/esr/jargon/html/H/hairy.html"><span class="glossterm">hairy</span></a> system, feature, or algorithm that one does not truly understand. The implication is that the technique may not work, and if it doesn't, one will never know why. Almost synonymous with <a href="http://catb.org/esr/jargon/html/B/black-magic.html"><span class="glossterm">black magic</span></a>, except that black magic typically isn't documented and <span class="emphasis"><em>nobody</em></span> understands it. Compare <a href="http://catb.org/esr/jargon/html/M/magic.html"><span class="glossterm">magic</span></a>, <a href="http://catb.org/esr/jargon/html/D/deep-magic.html"><span class="glossterm">deep magic</span></a>, <a href="http://catb.org/esr/jargon/html/H/heavy-wizardry.html"><span class="glossterm">heavy wizardry</span></a>, <a href="http://catb.org/esr/jargon/html/R/rain-dance.html"><span class="glossterm">rain dance</span></a>, <a href="http://catb.org/esr/jargon/html/C/cargo-cult-programming.html"><span class="glossterm">cargo cult programming</span></a>, <a href="http://catb.org/esr/jargon/html/W/wave-a-dead-chicken.html"><span class="glossterm">wave a dead chicken</span></a>, <a href="http://catb.org/esr/jargon/html/S/SCSI-voodoo.html"><span class="glossterm">SCSI voodoo</span></a>.</p></dd><dd style="font-style: italic; font-weight: bold;"><p> <span style="font-size:100%;">2. </span><span style="font-size:100%;">Things programmers do that they know shouldn't work but they try anyway, and which sometimes actually work, such as recompiling everything."</span></p></dd><span style="font-family: verdana; font-style: italic;"><span style="font-size:85%;">(Taken from </span></span><span style="font-style: italic;">the Jargon File - http://catb.org/esr/jargon/html/index.html) </span>Kepehttp://www.blogger.com/profile/05540414164317958450noreply@blogger.com0