tag:blogger.com,1999:blog-59172430667689462222014-10-07T00:53:58.146-04:00WIDGG'S RESEARCHI use this blog to share (presentable) results from my research as a PhD student in computer science.widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.comBlogger37125tag:blogger.com,1999:blog-5917243066768946222.post-48488638015422878912012-04-23T20:33:00.000-04:002012-04-23T20:39:46.354-04:00New results<span style="font-family: inherit;">We submitted a paper to EGSR (<span style="background-color: white; color: #222222; line-height: 16px;"><i>Eurographics Symposium on Rendering</i>), and still waiting to see if the paper is accepted or not.</span></span><br /><span style="font-family: inherit;"><span style="background-color: white; color: #222222; line-height: 16px;"><br /></span></span><br /><span style="font-family: inherit;"><span style="background-color: white; color: #222222; line-height: 16px;">In the mean time, here's a little result. We used a Perlin sum, to sum up the first four images, to create the last one. The output is very interesting.</span></span><br /><span style="font-family: inherit;"><span style="background-color: white; color: #222222; line-height: 16px;"><br /></span></span><br /><span style="font-family: inherit;"><span style="background-color: white; color: #222222; line-height: 16px;">Here's the octaves:</span></span><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-7f4Mm27mmE0/T5X0T61tp7I/AAAAAAAADQQ/5cYxARCeu-U/s1600/perlin_1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-7f4Mm27mmE0/T5X0T61tp7I/AAAAAAAADQQ/5cYxARCeu-U/s320/perlin_1.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-oj3rKG3E8KM/T5X0U4J745I/AAAAAAAADQY/DnrQ1a8TuNw/s1600/perlin_2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-oj3rKG3E8KM/T5X0U4J745I/AAAAAAAADQY/DnrQ1a8TuNw/s320/perlin_2.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-rix9JrCfxTQ/T5X0VwWcrhI/AAAAAAAADQg/e_6ruD4Tsig/s1600/perlin_3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-rix9JrCfxTQ/T5X0VwWcrhI/AAAAAAAADQg/e_6ruD4Tsig/s320/perlin_3.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-prWv3f8gfFA/T5X0XeeJGdI/AAAAAAAADQo/1FziyNHuiCE/s1600/perlin_4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-prWv3f8gfFA/T5X0XeeJGdI/AAAAAAAADQo/1FziyNHuiCE/s320/perlin_4.jpg" width="320" /></a></div><span style="font-family: inherit;"><span style="background-color: white; color: #222222; line-height: 16px;"><br /></span></span><br /><span style="font-family: inherit;"><span style="background-color: white; color: #222222; line-height: 16px;">Here's the output (<i>also used as the new backgroud for this blog</i>):</span></span><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-DuJPjHc67Uo/T5X0dLkmrQI/AAAAAAAADQw/ps2chw2AWbA/s1600/perlin_sum.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-DuJPjHc67Uo/T5X0dLkmrQI/AAAAAAAADQw/ps2chw2AWbA/s320/perlin_sum.jpg" width="320" /></a></div><span style="font-family: inherit;"><span style="background-color: white; color: #222222; line-height: 16px;"><br /></span></span><br /><span style="color: #222222;"><span style="line-height: 16px;">Note that each octave is different, which is different to Perlin noises. But if we wanted, we could have used the exact approach described by Perlin.</span></span><br /><span style="color: #222222;"><span style="line-height: 16px;"><br /></span></span><br /><span style="color: #222222;"><span style="line-height: 16px;">In future post, I'll give more detail about the method used to create these textures. All images are tileable. Eventually, a GPU version of this framework should be implemented. Either as a fragment shader or on CUDA/OpenCL.</span></span><img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/1W8ICWJnWUU" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2012/04/new-results.htmltag:blogger.com,1999:blog-5917243066768946222.post-55629456434586740042012-04-18T16:46:00.001-04:002012-04-18T16:46:08.869-04:00Shader Toy<span style="font-family: inherit;">I know it's been a while since I posted something, and I will post some new results soon.</span><br /><span style="font-family: inherit;"><br /></span><br /><span style="font-family: inherit;">If you're interested to play with the fragment shader in WebGL, here's a wonderful link:&nbsp;<a href="http://www.iquilezles.org/apps/shadertoy/">Shader Toy</a>.</span><br /><span style="font-family: inherit;"><br /></span><br /><span style="font-family: inherit;">Plus, the Khronos Group is working on&nbsp;<span style="background-color: white; color: #222222; line-height: 19px; text-align: left;">to define a JavaScript binding to the Khronos OpenCL with&nbsp;</span><a href="http://www.khronos.org/webcl/">WebCL</a>, which is a very good thing.</span><img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/83WwrHiVyVE" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2012/04/shader-toy.htmltag:blogger.com,1999:blog-5917243066768946222.post-50984688064162751732011-11-08T20:07:00.000-05:002011-11-08T20:07:30.359-05:00Rocks, Marbles, Stones, ...Still working on Hierarchy, and the outputs a getting better and better. Our next step is to create a mini-GUI, nothing fancy, but with enough functionality, to do some points placement by hand to see if we can reproduce some interesting patterns.<br /><br />In the mean time, the other part of our research is about algorithms to place these points (<i>and other related information</i>) to create automatically some interesting textures. We are now looking to do some rocky textures, like marble. Mostly the marble tiles. We are particularly interested in the veins that you can observe on those tile that create such complex textures.<br /><br />And we have a big challenge with those veins because our tool is mostly about cellular textures and veins are rarely in the form of cells. Our approach is to actually play with veins that are completely traverse the texture, this way, we can create cells and division on the plane.<br /><br />But still, we managed to produce some interesting outputs:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-5M-xM5BtazM/TrnR-dEwXWI/AAAAAAAABvg/vm5XLQwGNPs/s1600/rock_16.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-5M-xM5BtazM/TrnR-dEwXWI/AAAAAAAABvg/vm5XLQwGNPs/s320/rock_16.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-n35EwzhTC3U/TrnR-2fGVmI/AAAAAAAABvo/mtoNUyCECqM/s1600/rock_17.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-n35EwzhTC3U/TrnR-2fGVmI/AAAAAAAABvo/mtoNUyCECqM/s320/rock_17.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-ickAHHDO_0A/TrnR_D7qDaI/AAAAAAAABvw/yAm3ntblAgs/s1600/rock_18.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-ickAHHDO_0A/TrnR_D7qDaI/AAAAAAAABvw/yAm3ntblAgs/s320/rock_18.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-hKtlRXYuNGk/TrnR_tQxuVI/AAAAAAAABv4/utRJF4Ll8x0/s1600/rock_19.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-hKtlRXYuNGk/TrnR_tQxuVI/AAAAAAAABv4/utRJF4Ll8x0/s320/rock_19.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-SVMh1rSHez4/TrnSAAOU-2I/AAAAAAAABwA/o2gH82AhA5E/s1600/rock_20.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-SVMh1rSHez4/TrnSAAOU-2I/AAAAAAAABwA/o2gH82AhA5E/s320/rock_20.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-SAzaYnerYWA/TrnSAbUCJFI/AAAAAAAABwI/snlagDhQz-A/s1600/rock_21.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-SAzaYnerYWA/TrnSAbUCJFI/AAAAAAAABwI/snlagDhQz-A/s320/rock_21.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/--5bgXhDZlTA/TrnSA9jzmUI/AAAAAAAABwQ/Xr2Pn9xq2bI/s1600/rock_23.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/--5bgXhDZlTA/TrnSA9jzmUI/AAAAAAAABwQ/Xr2Pn9xq2bI/s320/rock_23.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-hMlDcDLK1lM/TrnSBcg2J8I/AAAAAAAABwY/J1KESwpuyFA/s1600/rock_24.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-hMlDcDLK1lM/TrnSBcg2J8I/AAAAAAAABwY/J1KESwpuyFA/s320/rock_24.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-NzHc9Av4J9A/TrnSBvFcfCI/AAAAAAAABwg/VAXdgtfMyFk/s1600/rock_25.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-NzHc9Av4J9A/TrnSBvFcfCI/AAAAAAAABwg/VAXdgtfMyFk/s320/rock_25.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-geXbgpmlbho/TrnSCA4j9_I/AAAAAAAABwo/_1fnPT8uiS8/s1600/rock_26.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-geXbgpmlbho/TrnSCA4j9_I/AAAAAAAABwo/_1fnPT8uiS8/s320/rock_26.jpg" width="320" /></a></div>Let me know what you think about those images!<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/juKjUG5yddk" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com1http://widgg-research.blogspot.com/2011/11/rocks-marbles-stones.htmltag:blogger.com,1999:blog-5917243066768946222.post-24103754273026435212011-11-07T12:58:00.000-05:002011-11-07T12:58:51.404-05:00Twitter accountHere's my twitter account:&nbsp;<a href="http://twitter.com/#!/widgg">@widgg</a>.<br /><br />I usually tweet about funny stuffs like jokes and just thoughts that I have and want to share. Not necessary related to my research. But naturally, when there's a new post on this blog, I share the link.<br /><br />It's actually the best way to contact me if you have any question or suggestion... or just want to talk about geek, research or any funny stuff.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/Ii7h2LgMJus" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/11/twitter-account.htmltag:blogger.com,1999:blog-5917243066768946222.post-36440861606318903852011-11-06T21:23:00.001-05:002011-11-06T21:23:59.797-05:00CausticsHere's another result. Here, we are trying to create some caustics, those reflection that you can see at the bottom of a pool caused by the sunlight and the surface of the water. We already have very nice outputs that can be achieved simply by distributing points and orientations. We used a poisson-disk sampling for the points.<br /><br />Here's some of the outputs:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-TjHsSWcjlBA/Trc-LRbVg2I/AAAAAAAABtA/L3rN5GioPAY/s1600/caustic_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-TjHsSWcjlBA/Trc-LRbVg2I/AAAAAAAABtA/L3rN5GioPAY/s320/caustic_00.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-60wNzEG1Z14/Trc-NEtYMMI/AAAAAAAABtI/-jV1tTtRq-8/s1600/caustic_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-60wNzEG1Z14/Trc-NEtYMMI/AAAAAAAABtI/-jV1tTtRq-8/s320/caustic_01.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-slVfzmSheBg/Trc-OPXKduI/AAAAAAAABtQ/tjn9QracdFk/s1600/caustic_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-slVfzmSheBg/Trc-OPXKduI/AAAAAAAABtQ/tjn9QracdFk/s320/caustic_03.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-h_g2LMmvKeQ/Trc-PMdlAkI/AAAAAAAABtY/CSOnDP7cLCA/s1600/caustic_04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-h_g2LMmvKeQ/Trc-PMdlAkI/AAAAAAAABtY/CSOnDP7cLCA/s320/caustic_04.png" width="320" /></a></div><br />Like this, it doesn't seam very useful or look like caustics. But these kind of images can be used to add information on a surface. One trick is to use an image like this and a texture, for example the bottom of the pool, and when it's time to draw them, for each pixel, you compare the color on the caustic image and on the texture and you take the highest value for the red, green and blue. This way, you can alter a simple texture with and image like this.<br /><br />Plus, the method that we use can be converted into an animation very easily. All you need to do is to move around the points and their orientations a little bit at each frame. This way, you have a fluid animation that will never loop on itself.<br /><br />Actually, there's already something that you can use to see a caustic effect. My live-wallpaper,&nbsp;<a href="http://widgg-research.blogspot.com/2011/07/weird-voronoi-pro.html">Weird Voronoi Pro</a>, that I presented here a few months ago can produce an animation like this that won't loop. My favorite configuration (that I show <a href="http://widgg-research.blogspot.com/2011/07/weird-voronoi-pro-news-and-possible.html">here</a>) creates a simple caustics with a little variation of intensity.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/GB4wSqrlpdg" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/11/caustics.htmltag:blogger.com,1999:blog-5917243066768946222.post-19795891267689121302011-11-04T18:34:00.000-04:002011-11-04T18:34:53.582-04:00My clouds are so fluffy, you're gonna die!Today I'm showing some cloud textures that I managed to create with a simple algorithm using a Poisson-disk sampling process to distribute some points. What is nice with this process to distribute point is that it's very portable and efficient. It can even be done in parallel on the GPU (<i>with CUDA or OpenCL</i>), this paper actually shows one way to do it: <a href="http://www.google.ca/url?sa=t&amp;rct=j&amp;q=efficient%20maximal%20poisson-disk%20sampling&amp;source=web&amp;cd=1&amp;ved=0CCEQFjAA&amp;url=http%3A%2F%2Fwww.idav.ucdavis.edu%2Ffunc%2Freturn_pdf%3Fpub_id%3D1057&amp;ei=52a0TrrwOoGC2AXR6djMDQ&amp;usg=AFQjCNH1vjeAQP-K9B3iseaTWzrOieiXpw&amp;sig2=PSl5xtwtw_pcjUZST6Qg_Q">Efficient Maximal Poisson-disk Sampling</a>.<br /><br />The rendering process for now is done completely on the CPU because we are still in a phase where we need to be able to add, change or remove some part quite fast to adjust the renderer to our needs. It's a bit harder to do that on the GPU. But when we will be completely sure of the product that we want, we will adapt it to the GPU, probably with OpenCL for portability reasons.<br /><br />So here some of these outputs:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-wj9i4jrn_l8/TrRnuVUyL_I/AAAAAAAABi0/rh9zX9HHO_E/s1600/cloud_12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-wj9i4jrn_l8/TrRnuVUyL_I/AAAAAAAABi0/rh9zX9HHO_E/s320/cloud_12.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-8SKmIKW2R80/TrRnvmwfNVI/AAAAAAAABi8/Zb8D8zcIJJk/s1600/cloud_13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-8SKmIKW2R80/TrRnvmwfNVI/AAAAAAAABi8/Zb8D8zcIJJk/s320/cloud_13.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-UHlvfvps7JE/TrRnxO3cO8I/AAAAAAAABjE/0Zn_xrAmBng/s1600/cloud_14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-UHlvfvps7JE/TrRnxO3cO8I/AAAAAAAABjE/0Zn_xrAmBng/s320/cloud_14.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-KEE7YalC0tQ/TrRnyVGTOQI/AAAAAAAABjM/i7GD8nGUU9k/s1600/cloud_15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-KEE7YalC0tQ/TrRnyVGTOQI/AAAAAAAABjM/i7GD8nGUU9k/s320/cloud_15.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-Ks4waUYrZ0E/TrRnzqRXUYI/AAAAAAAABjU/Dwxow5WdD9Y/s1600/cloud_19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-Ks4waUYrZ0E/TrRnzqRXUYI/AAAAAAAABjU/Dwxow5WdD9Y/s320/cloud_19.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-rnO2zv5JD6M/TrRn02uKcsI/AAAAAAAABjc/YCgvsPHm_mU/s1600/cloud_20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-rnO2zv5JD6M/TrRn02uKcsI/AAAAAAAABjc/YCgvsPHm_mU/s320/cloud_20.png" width="320" /></a></div><br />There's still a little bit of work to do to remove some isolated points that we can see in some images. I might have some idea to solve this, just need to implement it. So, let me know what you think about those images.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/RreuilT4p4c" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/11/my-clouds-are-so-fluffy-youre-gonna-die.htmltag:blogger.com,1999:blog-5917243066768946222.post-37180026392500440092011-10-30T22:43:00.000-04:002011-10-30T22:43:22.965-04:00Point DistributionNews from my research. Right now, we have a very good tool to create textures. But because we are not artists, we have to develop algorithms that use that tool to create textures automatically. To create textures with our tool, we have to place points and orientations on the plane, therefore, the main purpose of our algorithms is to place these points.<div><br /></div><div>To create interesting textures, we have to find methods to place the points. One of the most popular method consists of selecting a minimal distance <i>d</i> and then, for each new potential point, test with the previous point if the minimal distance is at least <i>d</i>. If it is, the point is added to the set, otherwise, it's rejected. To determine how this process terminates, you can either put a maximal number of points or a maximal number of&nbsp;consecutive&nbsp;failure. For more information, you can take a look at&nbsp;<a href="http://devmag.org.za/2009/05/03/poisson-disk-sampling/">Poisson Disk Sampling</a>&nbsp;for more information and for the description of a more efficient algorithm to produce the point set.</div><div><br /></div><div>But, while investigating those process, we noticed that our tool, with the points and orientations, can be used to determined the distance between two points. We use the orientation to create different distance functions and the minimal distance is considered according to these functions. So, we end up sometimes with pair of points closer than the minimal distance, but not according to the distance function.</div><div><br /></div><div>Here's some point distribution with the orientation parallel to the z-axis. In this case, it creates a point distribution similar to the Poisson Disk Sampling described above.</div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-uPjmMa077v8/Tq4HP-U4mjI/AAAAAAAABUs/U8IWr7NWg08/s1600/dist_up_173.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-uPjmMa077v8/Tq4HP-U4mjI/AAAAAAAABUs/U8IWr7NWg08/s320/dist_up_173.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-0JGzfTScK5M/Tq4HQPuiGVI/AAAAAAAABU0/M9bSfsVGsaI/s1600/dist_up_186.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-0JGzfTScK5M/Tq4HQPuiGVI/AAAAAAAABU0/M9bSfsVGsaI/s320/dist_up_186.png" width="320" /></a></div><div><br /></div><div>But, if we start changing the orientations randomly, we have point distributions that are much less regular:</div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-iCpB8Gg7vHY/Tq4HzV6cGvI/AAAAAAAABU8/xAbwK4Slgg0/s1600/dist_rd_115.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-iCpB8Gg7vHY/Tq4HzV6cGvI/AAAAAAAABU8/xAbwK4Slgg0/s320/dist_rd_115.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-BBywEj60Rxo/Tq4Hzo2tY-I/AAAAAAAABVE/WDIj2it8FOM/s1600/dist_rd_124.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-BBywEj60Rxo/Tq4Hzo2tY-I/AAAAAAAABVE/WDIj2it8FOM/s320/dist_rd_124.png" width="320" /></a></div><div><br /></div><div>With this method, we can see that creating a random night sky is not that difficult.</div><div><br /></div><div>It's also possible to manage point distribution with clusters. A basic method to do clusters is first to place clusters centers, just like distributing points (<i>by choosing an orientation and a distance function</i>), but without any minimal distance (<i>but it's possible to have one</i>). Then, for each point that you want to add to the point set, you first look for the closest center. Just like before, you test that new point with all the previous points already in the point set. If the point can be added, you assign a minimal distance to that point using the distance between that point and its center. The minimal distance can be the distance itself, but for better result, you can use the square or the square root of that distance.</div><div><br /></div><div>Here's some result of cluster point distribution:</div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-6kHycS1iK4A/Tq4J472PCaI/AAAAAAAABVM/7h27GbZsJd0/s1600/cluster_12ct_511pt_0.5_rand_ctp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-6kHycS1iK4A/Tq4J472PCaI/AAAAAAAABVM/7h27GbZsJd0/s320/cluster_12ct_511pt_0.5_rand_ctp.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-B4ttf3n091g/Tq4J5OZNEwI/AAAAAAAABVU/G2eHEiZWLiU/s1600/cluster_12ct_1125pt_0.5_rand_ctp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-B4ttf3n091g/Tq4J5OZNEwI/AAAAAAAABVU/G2eHEiZWLiU/s320/cluster_12ct_1125pt_0.5_rand_ctp.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-9oBaocJ4yCI/Tq4J5s9Uc4I/AAAAAAAABVc/4EpeVH6_eR4/s1600/cluster_d1_d2_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-9oBaocJ4yCI/Tq4J5s9Uc4I/AAAAAAAABVc/4EpeVH6_eR4/s320/cluster_d1_d2_01.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-iZeHndqJrHc/Tq4J5wgUD3I/AAAAAAAABVk/7OBPO2ff0kE/s1600/cluster_to_center_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-iZeHndqJrHc/Tq4J5wgUD3I/AAAAAAAABVk/7OBPO2ff0kE/s320/cluster_to_center_03.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-hjrCthK3et0/Tq4J6FNVFZI/AAAAAAAABVs/qRlTL8oHyas/s1600/cluster_to_center_05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-hjrCthK3et0/Tq4J6FNVFZI/AAAAAAAABVs/qRlTL8oHyas/s320/cluster_to_center_05.png" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">So now that we have methods to distribute points that also use our tool, we are now able to generate textures. We plan to first use these point distribution to create textures such as caustics, clouds and random abstract images.</div><img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/TavsXx7maVc" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/10/point-distribution.htmltag:blogger.com,1999:blog-5917243066768946222.post-28112816275033477492011-10-29T13:19:00.000-04:002011-10-29T13:19:31.068-04:00Learn to code | CodecademyToday's post is about a website I planned to talk about, bu totally forgot! It's called&nbsp;<a href="http://www.codecademy.com/">Codecademy</a>&nbsp;and it's actually a very nice tutorial to teach kids, from 7 to 77, how to handle basic principles in source code.<br /><br />It shows how to code in Javascript. And in the last years, mostly with HTML5, Javascript is getting even more important. And there's a rule on the Internet about Javascript: If something can be done in Javascript, eventually, someone will do it. And it's actually true. Just take a look at Google Docs. Also, by choosing Javascript, you don't have to think about compilers or on which OS you are. You can jump directly in the fun part.<br /><br />The tutorial starts by asking your name and you just have to write it as a string like <i>"Widgg"</i>. Then, gradually, you are introduce to various concepts like variables, conditions, loops and so on. The only problem that I had with the tutorial is that the syntax in Javascript requires semicolons at the end of each statement, but that was not explicitly mentioned in the tutorial. Or I just did not find it.<br /><br />I did that tutorial a while ago, so maybe they corrected it. But even with that small problem, it's actually a really good starts for anyone who want to start programming or are just curious.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/3c7MAnoowxY" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/10/learn-to-code-codecademy.htmltag:blogger.com,1999:blog-5917243066768946222.post-51413779371649104962011-10-13T22:40:00.000-04:002011-10-13T22:40:03.754-04:00Paper Review: Alan Turing and the Origins of ComplexityIt's the first time I'm doing a post like this one. I don't really know how to approach this paper review or even if it should be considered a paper review. So, first here's the basic information about that paper.<br /><br />Abstract:<br /><blockquote><span class="Apple-style-span" style="background-color: white; font-family: 'Lucida Grande', helvetica, arial, verdana, sans-serif; font-size: 14px; line-height: 19px;">The 75th anniversary of Turing's seminal paper and his centennial year anniversary occur in 2011 and 2012, respectively. It is natural to review and assess Turing's contributions in diverse fields in the light of new developments that his thoughts has triggered in many scientific communities. Here, the main idea is to discuss how the work of Turing allows us to change our views on the foundations of Mathematics, much like quantum mechanics changed our conception of the world of Physics. Basic notions like computability and universality are discussed in a broad context, making special emphasis on how the notion of complexity can be given a precise meaning after Turing, i.e., not just qualitative but also quantitative. Turing's work is given some historical perspective with respect to some of his precursors, contemporaries and mathematicians who took up his ideas farther.</span></blockquote>Author:<br /><blockquote><a href="http://www.ucm.es/info/giccucm/PersonalMAMD/index.htm">Dr. Miguel Angel Martín-Delgado</a></blockquote>Link:<br /><blockquote><a href="http://arxiv.org/abs/1110.0271">Alan Turing and the Origins of Complexity</a></blockquote>I decided to talk about that paper because it's about the work of a great man, Alan Turing, without whom, the world would be so different, at so many levels that it's hard to understand the impact he had. As mention in the abstract, he gave us a better understanding of complicated Mathematical concepts. In WWII, he helped breaking the naval Enigma&nbsp;machine used by Nazis to communicate.<br /><br />But the main reason that I decided to write a post about this paper is that it covers subjects that most computer scientists should be aware of. It doesn't matter if the proofs are not understood, but it's very important to get the foundation of computer science and to know what are the limitations of computers. Even if you already know this material, it's always good to read it again. Particularly if it's been a while.<br /><br />First, Alan Turing introduce what he called the "a-machine" for automatic machine. That machine is now called a Turing machine. To know what a Turing machine is, take a look at this video:<br /><iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/E3keLeMwfHY" width="560"></iframe><br />It might be hard to understand, but a machine like this can reproduce everything a computer can do. Here, we're not talking about speed, but the capacity to compute the same result. The most important Turing machine is a Universal Turing machine, i.e. a machine that can simulate any other Turing machine. Such a machine requires two inputs: a program and input data. Then the machine follow the instruction of the program, according to the input data, and produce an output.<br /><br />This is exactly like a computer. You have the hardware (<i>the machine</i>), when it starts, it loads an operating system (<i>the program</i>) and you start typing on your keyboard, moving the mouse, receiving data from an internet connection (<i>the input data</i>). And in exchange, you get outputs in the form of images shown on your screen, data sent to a server or a document printed (<i>an output</i>).<br /><br />Turing also showed the limitation of his machine. For example, that machine would not be able to compute the square root of two because the computation would never stop. If the machine cannot stop, it's considered non-computable. But, if we put a limit to the computation such as a maximum number of decimals, then it's computable because the machine will know when it's done.<br /><br />Then, if something can be computed, how hard is it to compute it ? How much time and how much space ? Time, so given an input of size N, how much steps a Turing machine will need to solve it. Space, how much place on the tape (<i>see the video above</i>) is needed. On a Turing machine, the tape is considered as "infinite" but in practice, computers don't have infinite space and it takes time to do any operations. The paper covers the common complexity classes and problems related to these, specially the well know <b>P vs. NP</b>.<br /><br />The paper also talk about the famous <b>Halting Problem</b>, i.e. there's no way to find whether a computer will eventually halt. A proof of the Halting Problem is given in the paper by using Cantor's diagonal method. That method can be used to show that even if there's an infinite number of natural numbers <b>N</b>, the cardinality (<i>the size</i>) of the set of real numbers <b>R</b>&nbsp;is greater than the cardinality of <b>N</b>. A concept that is weird the first time you read about it (<i>I remember how surprised I was when I saw a proof for that</i>) but very important to understand the foundation of Mathematics.<br /><br />Have fun reading this paper!<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/DvPB3ZjDUk4" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/10/paper-review-alan-turing-and-origins-of.htmltag:blogger.com,1999:blog-5917243066768946222.post-85208038237637592402011-10-05T11:04:00.000-04:002011-10-05T11:04:20.637-04:00more smokeSo, yesterday I presented some smoke textures that I created. I continued to work on it and after altering some values, I managed to create some new interesting smoke textures. These textures look cleaner than those made yesterday. I made sure that the background would be closer to black and it helps to see the curves made by the smoke.<br /><br />Here's some of these outputs:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-5LGMmv_36fo/ToxxZJu0fzI/AAAAAAAABHM/kFd0M8GKJ6I/s1600/black_smoke_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-5LGMmv_36fo/ToxxZJu0fzI/AAAAAAAABHM/kFd0M8GKJ6I/s320/black_smoke_02.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-ARO6PErCGaE/ToxxZ8enTvI/AAAAAAAABHQ/oYYM0Y3YFfg/s1600/black_smoke_04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-ARO6PErCGaE/ToxxZ8enTvI/AAAAAAAABHQ/oYYM0Y3YFfg/s320/black_smoke_04.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-r35fK41YVIQ/ToxxabZMT0I/AAAAAAAABHU/cS9TEJqMyGc/s1600/black_smoke_06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-r35fK41YVIQ/ToxxabZMT0I/AAAAAAAABHU/cS9TEJqMyGc/s320/black_smoke_06.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-nRKaZwhA5ng/ToxxbGi9K9I/AAAAAAAABHY/S4o7oOs8hnM/s1600/black_smoke_07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-nRKaZwhA5ng/ToxxbGi9K9I/AAAAAAAABHY/S4o7oOs8hnM/s320/black_smoke_07.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-OPA0b7ik4Kw/ToxxbvR4HVI/AAAAAAAABHc/HdPy_8AMvdA/s1600/black_smoke_09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-OPA0b7ik4Kw/ToxxbvR4HVI/AAAAAAAABHc/HdPy_8AMvdA/s320/black_smoke_09.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-ic4Wie9vvrU/ToxxcM6wXvI/AAAAAAAABHg/wcBakKsTYlQ/s1600/black_smoke_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-ic4Wie9vvrU/ToxxcM6wXvI/AAAAAAAABHg/wcBakKsTYlQ/s320/black_smoke_10.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-QPq3V1QtPRg/Toxxcjd6WDI/AAAAAAAABHk/4R5mCvgzuss/s1600/black_smoke_13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-QPq3V1QtPRg/Toxxcjd6WDI/AAAAAAAABHk/4R5mCvgzuss/s320/black_smoke_13.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-eNjryzFgLM4/ToxxdBoi4qI/AAAAAAAABHo/vsGtCKqYKto/s1600/black_smoke_17_add.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-eNjryzFgLM4/ToxxdBoi4qI/AAAAAAAABHo/vsGtCKqYKto/s320/black_smoke_17_add.png" width="320" /></a></div><br />When the process would be easier to control, with well defined functions to distribute the points, I will be able to generate as much smoke textures as I want. Might put a package of a hundred of them on Renderosity.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/PFGMha0F-UM" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/10/more-smoke.htmltag:blogger.com,1999:blog-5917243066768946222.post-86051567929384519812011-10-04T21:43:00.000-04:002011-10-04T21:43:06.453-04:00smoke texturesBack on creating textures. First, I finished the first version of that new renderer. Might still have some bug, but in general, it's done.<br /><br />One of the objectives that we had with this new tool that we created was to create some smoke. A bit similar to this one:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://smokingstories.files.wordpress.com/2008/09/abstract-color-smoke-art.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="216" src="http://smokingstories.files.wordpress.com/2008/09/abstract-color-smoke-art.jpg" width="320" /></a></div><br />The picture above is called Smoke Art, so creating images using smoke. This one is not generated by any computer. Other Smoke Art are listed there:&nbsp;<a href="http://www.bablotech.com/2008/12/14/20-amazing-smoke-art-pictures/">http://www.bablotech.com/2008/12/14/20-amazing-smoke-art-pictures/</a>, and some of them are really amazing.<br /><br />With our new method, we try to reproduce such piece of art, but completely random. We don't try to recreate a scene or anything. Just create random smoke effects.<br /><br />There's many ways to do such images, the most popular is probably with particles. You use thousands or millions of points and let them behave like smoke. But this approach is heavy to run and it's mostly for animation. For static images like ours, it's not very interesting to manage that amount of points to finally find the right image.<br /><br />Our method still consists of placing points and some information of associated with points on the plane to partition it. We are still using the layers to create the effects and it works really well with smoke. So here's some of my favorite that I created today:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-Shs0WNOzO5Y/Tou0Tz59nnI/AAAAAAAABFE/--Cjl9Xo2fg/s1600/smoke_13_bet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-Shs0WNOzO5Y/Tou0Tz59nnI/AAAAAAAABFE/--Cjl9Xo2fg/s320/smoke_13_bet.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-k06bsJ1-fgw/Tou0VDhfh_I/AAAAAAAABFI/UzCJCjZKK8g/s1600/smoke_16_3g.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-k06bsJ1-fgw/Tou0VDhfh_I/AAAAAAAABFI/UzCJCjZKK8g/s320/smoke_16_3g.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-cQTCltFdEAo/Tou0WjY4qKI/AAAAAAAABFM/9MueKxYDUcE/s1600/smoke_17_3g.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-cQTCltFdEAo/Tou0WjY4qKI/AAAAAAAABFM/9MueKxYDUcE/s320/smoke_17_3g.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-0strXh89Px8/Tou0YXbvQAI/AAAAAAAABFQ/EWNbQ6FzdLE/s1600/smoke_18_3g.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-0strXh89Px8/Tou0YXbvQAI/AAAAAAAABFQ/EWNbQ6FzdLE/s320/smoke_18_3g.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-k71WTD7XRJs/Tou0ZBRczyI/AAAAAAAABFU/yNVeX45uozU/s1600/smoke_19_3g.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-k71WTD7XRJs/Tou0ZBRczyI/AAAAAAAABFU/yNVeX45uozU/s320/smoke_19_3g.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-rZ8BRR8YAtY/Tou0a7sX_zI/AAAAAAAABFY/73CgLtL2zmw/s1600/smoke_23_3g.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-rZ8BRR8YAtY/Tou0a7sX_zI/AAAAAAAABFY/73CgLtL2zmw/s320/smoke_23_3g.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-m3i5yjkl76E/Tou0cT1N0rI/AAAAAAAABFc/JBjvIG2LA6U/s1600/smoke_26_3g_o.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-m3i5yjkl76E/Tou0cT1N0rI/AAAAAAAABFc/JBjvIG2LA6U/s320/smoke_26_3g_o.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-6pnhLZ7gdIk/Tou0dqIPVHI/AAAAAAAABFg/SkHUev8dTz8/s1600/smoke_27_3g_o.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-6pnhLZ7gdIk/Tou0dqIPVHI/AAAAAAAABFg/SkHUev8dTz8/s320/smoke_27_3g_o.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-3w2HHKzD1No/Tou0fcOmGeI/AAAAAAAABFk/j-581u-rEAw/s1600/smoke_29_3g_xy.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-3w2HHKzD1No/Tou0fcOmGeI/AAAAAAAABFk/j-581u-rEAw/s320/smoke_29_3g_xy.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-V_xR5kGNd7A/Tou0gb8EGLI/AAAAAAAABFo/M7gtJEOW0UY/s1600/smoke_30_3g_xy.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-V_xR5kGNd7A/Tou0gb8EGLI/AAAAAAAABFo/M7gtJEOW0UY/s320/smoke_30_3g_xy.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-P7-dpbZmlV8/Tou0h69TRcI/AAAAAAAABFs/2DblF4fxzSg/s1600/smoke_32_3g_xya.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-P7-dpbZmlV8/Tou0h69TRcI/AAAAAAAABFs/2DblF4fxzSg/s320/smoke_32_3g_xya.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-KHYTlJxSY-Y/Tou0jTcU9YI/AAAAAAAABFw/Ef-004cxug4/s1600/smoke_33_3g_xya.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-KHYTlJxSY-Y/Tou0jTcU9YI/AAAAAAAABFw/Ef-004cxug4/s320/smoke_33_3g_xya.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-zbIl6r4FZTk/Tou0lfegykI/AAAAAAAABF0/VIO4OItFUJ4/s1600/smoke_34_3g_xya.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-zbIl6r4FZTk/Tou0lfegykI/AAAAAAAABF0/VIO4OItFUJ4/s320/smoke_34_3g_xya.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-EY8uPQDxaKM/Tou0ngzcBBI/AAAAAAAABF4/RIwaCUBbIYE/s1600/smoke_37_3g_xya.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-EY8uPQDxaKM/Tou0ngzcBBI/AAAAAAAABF4/RIwaCUBbIYE/s320/smoke_37_3g_xya.png" width="320" /></a></div>We still have some work to do to really control that new technique. And also some experimentation to be sure that the behavior is more stable. One thing that we might try is adding a bit of color to it instead of working in gray. But not drastic colors like red or green. Little variation from gray, but enough to see that there's more.<br /><br />Please leave any comment or question that you have about these textures.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/ifOUtmlZchE" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/10/smoke-textures.htmltag:blogger.com,1999:blog-5917243066768946222.post-16940454527589388502011-09-30T14:57:00.000-04:002011-09-30T14:57:12.392-04:00Changed my profil logo...... just for the fun of doing it.<br /><br />I had an idea last night about a simple drawing:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-glgwWwJDvYQ/ToYPxcIYp2I/AAAAAAAABDY/1Lug9mstaaI/s1600/circ_over_diameter.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-glgwWwJDvYQ/ToYPxcIYp2I/AAAAAAAABDY/1Lug9mstaaI/s320/circ_over_diameter.jpg" width="320" /></a></div><br />But hey... it's very simple and it includes a bit my passion for mathematics without being that obvious... but I don't think it's very complicated to understand! And more important... it's better than just my nickname written in green :)<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/7Tm41euQe5I" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/09/changed-my-profil-logo.htmltag:blogger.com,1999:blog-5917243066768946222.post-39456076379452803662011-09-30T01:21:00.002-04:002011-09-30T01:42:13.166-04:00research newsI don't have new stuff to show right now, but I've been busy in the last week. I'm currently implementing a more dynamic version of my renderer. CUDA is very nice, but when you need to add quickly new modules or do some rapid&nbsp;tweaks, it's not the best solution.&nbsp;So, for now the plan is to render to have a slower renderer that would be easier to change and adapt. When we're sure of the features that we really want to keep and we'll know the full limitation of our system, an implementation in CUDA would be possible.<br /><br />One of the reason to change the renderer is that I needed some C++ features like virtual functions, which is very useful for designing rapidly a new system. I think there's some language that allows to create virtual function in CUDA or OpenCL by simply adding some hidden piece of code.<br /><br /><b><u>If it doesn't exist, here's how I'd do it:</u></b><br /><br />First, in CUDA, there's no function pointers. But if we take a look at how polymorphism works, it's really just a way to&nbsp;disguise procedural code. Actually, the whole object oriented programming scheme is just a way to disguise procedural code by hiding some information to the programmer so (s)he doesn't have to worry about it. Just like many other languages do (<i>Java is the most popular about that one because it hides a lot of security features like buffer overflows done during the execution to avoid major problems</i>).<br /><br />So, if we have:<br /><blockquote><b>class</b> A<br />{<br /><b>private</b>:<br />&nbsp; <b>int</b> value;<br /><b>public</b>:<br />&nbsp; A(<b>void</b>);<br />&nbsp; <b>virtual</b> ~A<b>(void</b>);<br />&nbsp; <b>virtual void</b> test(T param1, U param2);<br />};</blockquote>Then this piece of code is actually converted into something that look basically like this:<br /><blockquote><i>// prototypes</i><br /><b>struct</b> class_A;<br /><b>void</b> __class_A_constructor(<b>struct</b> class_A *<b>this</b>);<br /><b>void</b> __class_A_destructor(<b>struct</b> class_A *<b>this</b>);<br /><b>void</b> __class_A_test(<b>struct</b> class_A *<b>this</b>, T param1, U param2);<br /><b>struct</b> class_A_virtual_table<br />{<br />&nbsp; <b>void</b> (*class_A_destructor)(<b>struct </b>class_A *<b>this</b>);<br />&nbsp; <b>void</b> (*class_A_test)(<b>struct </b>class_A *<b>this</b>, T param1, U param2);<br />};<br /><br class="Apple-interchange-newline" /><i>// create a single instance of the virtual table and assign the values for the function pointers</i><b>struct</b> class_A_virtual_table class_A_virtual_table_only_instance_needed =<br />{<br />&nbsp;&nbsp;__class_A_destructor,<br />&nbsp;&nbsp;__class_A_test<br />};<br /><b>struct</b> class_A<br />{<br />&nbsp; class_A_virtual_table *VT;<br />&nbsp; <b>int</b> value;<br />};<br /><b>void</b> __class_A_constructor(<b>struct</b> class_A *<b>this</b>)<br />{<br />&nbsp;&nbsp;<b>this</b>-&gt;value = 0; <i>// or some other default value</i><br />&nbsp;&nbsp;<b>this</b>-&gt;VT = &amp;class_A_virtual_table_only_instance_needed;<br />}<br /><b>void</b> __class_A_destructor(<b>struct</b> class_A *<b>this</b>)<br />{<br />&nbsp; <i>// stuff to destroy</i><br />}<br /><b>void</b> __class_A_test(struct class_A *<b>this</b>, T param1, U param2)<br />{<br />&nbsp; // stuff to test<br />}<br />// virtual functions<br /><b>void</b> virtual_class_A_destructor(<b>struct</b> class_A *<b>this</b>)<br />{<br />&nbsp;&nbsp;<b>this</b>-&gt;VT.class_A_destructor(<b>this</b>);<br />}<br /><b>void</b> virtual_class_A_test(<b>struct </b>class_A*<b>this</b>, T param1, U param2)<br />{<br />&nbsp;&nbsp;<b>this</b>-&gt;VT.class_A_test(<b>this</b>, param1, param2);<br />}</blockquote>And then, with a subclass B, we have:<br /><blockquote><b>class</b> B:<b> public</b> A<br />{<br /><b>private</b>:<br />&nbsp;<b> double</b> value;<br /><b>public</b>:<br />&nbsp; B(<b>void</b>);<br />&nbsp; ~B(<b>void</b>);<br />&nbsp; <b>void</b> test(T param1, U param2); &nbsp;<i>// version of test but for class B</i><br />&nbsp;<b> void</b> function_in_B(<b>void</b>);<br />};&nbsp;</blockquote><blockquote><b>int</b> main(<b>void</b>)<br />{<br />&nbsp; B b;<br />&nbsp; A *a = &amp;b;<br />&nbsp; a-&gt;test(1, 2); &nbsp;<i>// let way that type T and U are integers..</i>.<br />&nbsp; b.function_in_B();<br />}</blockquote>Then, all of this become:<br /><blockquote><b>struct</b> class_B<br />{<br />&nbsp; <b>struct</b> class_A super;<br />&nbsp; <b>double</b> value;<br />};<br /><i>// prototypes for class B</i><br /><b>void</b> __class_B_constructor(<b>struct</b> class_B *<b>this</b>);<br /><b>void</b> __class_B_destructor(<b>struct</b> class_B *<b>this</b>);<br /><b>void</b> __class_B_test(<b>struct</b> class_B *<b>this</b>, T param1, U param2);<br /><b>void</b> __class_B_function_in_B(<b>struct</b> class_B *<b>this</b>);<br /><i>// virtual table for B, with the virtual functions for B</i><br /><b>struct</b> class_A_virtual_table class_B_virtual_table_only_instance_needed =<br />{<br />&nbsp;&nbsp;__class_B_destructor,<br />&nbsp;&nbsp;__class_B_test<br />};<br /><b>void</b> __class_B_constructor(struct class_B *<b>this</b>)<br />{<br />&nbsp; __class_B_constructor(&amp;(<b>this</b>-&gt;super));<br />&nbsp;&nbsp;<b>this</b>-&gt;VT = &amp;class_B_virtual_table_only_instance_needed; <i>&nbsp;// replace the virtual table</i><br />&nbsp; <b>this</b>-&gt;value = 0.0; <i>// or some other default value</i><br />}<br /><b>void</b> __class_B_destructor(<b>struct</b> class_B *<b>this</b>)<br />{<br />&nbsp;<i> // stuff to destroy in B</i><br />&nbsp; __class_A_destructor(&amp;(<b>this</b>-&gt;super)); &nbsp;<i>// then, destroy the stuff in the parent</i><br />}<br /><b>void</b> __class_B_test(<b>struct</b> class_B *<b>this</b>, T param1, U param2)<br />{<br />&nbsp; <i>// stuff to test, but for B</i><br />}<br /><b>void</b> __class_B_function_in_B(<b>struct</b> class_B *<b>this</b>)<br />{<br />&nbsp; <i>// whatever that function does!</i><br />}<br /><b>int</b> main(<b>void</b>)<br />{<br />&nbsp; <b>struct</b> class_B b;<br />&nbsp;&nbsp;__class_B_constructor(&amp;b);<br />&nbsp; struct class_A *a = &amp;(b.super); &nbsp;<i>// the address of the parent in struct class_B</i><br />&nbsp;&nbsp;virtual_class_A_test(a, 1, 2);<br />&nbsp;&nbsp;&nbsp;__class_B_function_in_B(&amp;b)<b>;</b><br />&nbsp;&nbsp;__class_B_destructor(&amp;b);<br />}</blockquote>So, as you can see, polymorphism is using function pointers to create the illusion that the right function is called each time.<br /><br />But, without any function pointers, we need to recreate that illusion. So, one way that can be done in CUDA/OpenCL, is to add a unique ID for each class. And each instance of that class will have that ID assigned in the constructor. So:<br /><blockquote><b>enum</b> CLASS_IDS { CLASS_A_ID, CLASS_B_ID, ..., CLASS_X_ID };<br /><b>struct</b> class_A<br />{<br />&nbsp;<b> int</b> ID;<br />&nbsp; <b>int</b> value;<br />};<br /><b>void</b> __class_A_constructor(<b>struct</b> class_A *<b>this</b>)<br />{<br />&nbsp; <b>this</b>-&gt;ID = CLASS_A_ID;<br />&nbsp;<b>&nbsp;this</b>-&gt;value = 0; // or some other default value<br />}<br /><b>struct</b> class_B<br />{<br />&nbsp; <b>struct</b> class_A super;<br />&nbsp; <b>double</b> value;<br />};<br /><b>void</b> __class_B_constructor(<b>struct</b> class_B *<b>this</b>)<br />{<br />&nbsp;&nbsp;__class_A_constructor(&amp;(<b>this</b>-&gt;super)); &nbsp;<i>// always call the parent constructor first!</i><br />&nbsp; <b>this</b>-&gt;ID = CLASS_B_ID; &nbsp;<i>// overwrite the ID</i><br />&nbsp;<b>&nbsp;this</b>-&gt;value = 0.0; <i>// or some other default value</i><br />}</blockquote>Finally, write the virtual functions like this:<br /><blockquote><b>void</b> virtual_class_A_destructor(<b>struct</b> class_A *<b>this</b>)<br />{<br />&nbsp; <b>switch</b>(<b>this</b>-&gt;ID)<br />&nbsp; {<br />&nbsp; <b>case</b> CLASS_A_ID:<br />&nbsp; &nbsp; __class_A_destructor(<b>this</b>);<br />&nbsp; &nbsp; <b>break</b>;<br />&nbsp; <b>case</b> CLASS_B_ID:<br />&nbsp; &nbsp; __class_B_destructor((class_B*)<b>this</b>);<br />&nbsp; &nbsp; <b>break</b>;<br />&nbsp;<i> // ...</i><br />&nbsp; <b>case</b> CLASS_X_ID:<br />&nbsp; &nbsp; __class_X_destructor((class_X*)<b>this</b>);<br />&nbsp; &nbsp; <b>break</b>;<br />&nbsp; };<br />}</blockquote>So, with a switch statement, it's possible to replace the virtual table. So, a compiler that would be able to take C++ code and convert it in CUDA/OpenCL would be able to do polymorphism with that approach. It's much more slower than a function pointer, but the result of the computation would be the same.<br /><br />I think that such compilers exist already, but I never used one of them. But it's probably using a method similar to the one above to emulate the virtual tables.<br /><br />And for those of you who didn't know how polymorphism worked, now you have a better idea of the process the compiler has to do to convert classes and their virtual functions in machine bytecode. So, I hoped that post helps a bit for that. Otherwise, there's a couple of resources available on the web that would clearly describe that process.<br /><br />If any of you know a (<i>free if possible</i>) compiler that convert basic C++ code in CUDA or OpenCL, but also has integrated some of the features of those languages like the synchronization between threads of the same bloc and atomic operations, I'd really like to see that and use it eventually. It must work on Linux!<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/5fnAz1UIxHI" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/09/research-news.htmltag:blogger.com,1999:blog-5917243066768946222.post-29573349513933984562011-08-25T13:48:00.000-04:002011-08-25T13:48:23.813-04:00first patternSo, yesterday I mentioned two steps that we need to work on to finish the hierarchy project. And one of them is to work on patterns or structures to show what is possible to do with that product.<br /><br />Today, I managed to to a first structure, a flower. Very simple to do. Just needed some adjustment first, but I got that result in few minutes. So here it is:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-f1RG0c61UIU/TlaJOgerh6I/AAAAAAAAA6o/d8xnZ5arrHQ/s1600/flower_08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-f1RG0c61UIU/TlaJOgerh6I/AAAAAAAAA6o/d8xnZ5arrHQ/s320/flower_08.png" width="320" /></a></div>Naturally, I just showed the final product. I had other images created before I managed to do the right effect that I wanted. I think that this is a nice preview of what that product can do.<br /><br />Let me know what you think about that output!<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/g6cRT3rXqO4" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/08/first-pattern.htmltag:blogger.com,1999:blog-5917243066768946222.post-62823027019059001902011-08-24T15:00:00.000-04:002011-08-24T15:00:28.317-04:00Hierarchy texturesSo, it's been a while. I was so busy at SIGGRAPH that I never had the time to share anything.<br /><br />In this post, I'm showing you some of the last textures I've been working on. These are build as a hierarchy. We use again our variation of the Voronoi diagram to create weird shapes. But this time, instead of using simply one level, we introduce many levels.<br /><br />On the first level, again, the Voronoi cells are computed and once we know in which cell we are, if that cell has a sub-level, we can then continue the visit in the structure into that sub-level. Each level has can have a small or big influence on the final color of the pixel.<br /><br />So, here's some outputs:<br /><br />One of the first output made. It has two cells on the first level. One is the circle-like shape in the middle and then the rest. In the "rest", there's a sub level with a simple small division of the plane in two.<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-YlB2KXU-HKs/TlVHDzjSW6I/AAAAAAAAA5Y/uGfdMmngltA/s1600/evol_00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-YlB2KXU-HKs/TlVHDzjSW6I/AAAAAAAAA5Y/uGfdMmngltA/s320/evol_00.png" width="320" /></a></div><br />Exactly as the previous one, but here, there's a sub-level in the circle-like shape. As you can see, the fact that there's a new sub-level only affects the part where that sub-level is.<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-iy35ccrZbmU/TlVHEZCnNuI/AAAAAAAAA5c/eYJzzvoEDFw/s1600/evol_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-iy35ccrZbmU/TlVHEZCnNuI/AAAAAAAAA5c/eYJzzvoEDFw/s320/evol_01.png" width="320" /></a></div><br />The actual first output that I got with the hierarchy.<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-Lp0Yx9RxHT8/TlVHFSUGDOI/AAAAAAAAA5g/n-xRll5wCEA/s1600/first.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-Lp0Yx9RxHT8/TlVHFSUGDOI/AAAAAAAAA5g/n-xRll5wCEA/s320/first.png" width="320" /></a></div><br />In the next images, I start playing with colors inside the cells. Naturally, all of these images where made from random point distribution.<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-KMOJTulQMDs/TlVHunrPQuI/AAAAAAAAA5k/xP_umJOsTgo/s1600/color_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-KMOJTulQMDs/TlVHunrPQuI/AAAAAAAAA5k/xP_umJOsTgo/s320/color_02.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-w7h8AAZdEnU/TlVHwbddiII/AAAAAAAAA5o/umVyDRdDr6g/s1600/color_05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-w7h8AAZdEnU/TlVHwbddiII/AAAAAAAAA5o/umVyDRdDr6g/s320/color_05.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-_IVdaIYO3rw/TlVHyWMJgfI/AAAAAAAAA5s/f5Izn8vOrXI/s1600/color_06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-_IVdaIYO3rw/TlVHyWMJgfI/AAAAAAAAA5s/f5Izn8vOrXI/s320/color_06.png" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">In these images, I simply played with the hierarchy. Each cell has a random chance to get a sub-level and so on. Until a maximal depth was reached. In some of them, I played also with the feature that at each level, you can influence the final color by accumulating a value.</div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-0ibgigt6H50/TlVIb_4rteI/AAAAAAAAA5w/1-FTyiGbl_0/s1600/random_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-0ibgigt6H50/TlVIb_4rteI/AAAAAAAAA5w/1-FTyiGbl_0/s320/random_02.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-wrAwDDUPb0s/TlVIcTocycI/AAAAAAAAA50/cdLubPOosbQ/s1600/random_06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-wrAwDDUPb0s/TlVIcTocycI/AAAAAAAAA50/cdLubPOosbQ/s320/random_06.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-tZ8wCXAtG-k/TlVIdL1lvnI/AAAAAAAAA54/Bc7r6tf2FQQ/s1600/random_07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-tZ8wCXAtG-k/TlVIdL1lvnI/AAAAAAAAA54/Bc7r6tf2FQQ/s320/random_07.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/--yvTnvjNKWg/TlVIfeUPGBI/AAAAAAAAA58/DQawKqCBpBU/s1600/random_08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/--yvTnvjNKWg/TlVIfeUPGBI/AAAAAAAAA58/DQawKqCBpBU/s320/random_08.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-20rERLz3uYc/TlVIgALF8HI/AAAAAAAAA6A/N3YLzLJ98qA/s1600/random_09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-20rERLz3uYc/TlVIgALF8HI/AAAAAAAAA6A/N3YLzLJ98qA/s320/random_09.png" width="320" /></a></div><br />Finally, there's two big step to do before we consider that project finished. First, we want to investigate various patterns. So, how can we do a particular shape for a cell. For this part, we don't need the hierarchy because we know it works. When we are able to control properly the patterns, we will be able to used them at various level.<br /><br />Second, we want to be more dynamic for the color. Right now, each cell use a function f:[0;1]-&gt;[0;1] to control its value that will influence all the other levels. But those functions are a bit static. I can add more, but it will never be enough. So we turn to use something like the shaders in OpenGL. Literally, each cell could have its own function (<i>coded in CUDA-C</i>) and that function would be used to control the contribution of that cell and its sub-level to the final color of the pixel.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/d4dsSTblSXQ" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/08/hierarchy-textures.htmltag:blogger.com,1999:blog-5917243066768946222.post-38589545763453622262011-08-05T23:24:00.000-04:002011-08-05T23:24:03.375-04:00SIGGRAPHThis week, I will be at SIGGRAPH in Vancouver. I will try to share some of the stuff I will see on the blog. I hope to be able to talk about the last stuffs in procedural texturing and rendering.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/frk-osjHq8g" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/08/siggraph.htmltag:blogger.com,1999:blog-5917243066768946222.post-46776204777272750842011-08-04T12:46:00.000-04:002011-08-04T12:46:45.392-04:00Twin Pictures DEMOI decided to put a demo on the market of Twin Pictures. In that free version, the only difference with the paid version is that you cannot change the pictures. But all the other effects are there.<br /><br />Here's the link:&nbsp;<a href="https://market.android.com/details?id=com.blogspot.widgg_research.twin_demo">https://market.android.com/details?id=com.blogspot.widgg_research.twin_demo</a><br /><br />If you like it, you will definitely like the full version where you can change the images!<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/crY84oKUOzQ" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/08/twin-pictures-demo.htmltag:blogger.com,1999:blog-5917243066768946222.post-43418412563414806222011-07-29T23:38:00.000-04:002011-07-29T23:38:22.934-04:00Twin Pictures videoSo here's a small video to show you Twin Pictures.<br /><br /><iframe allowfullscreen="" frameborder="0" height="349" src="http://www.youtube.com/embed/A4LwOGGDDfo?hl=en&amp;fs=1" width="425">&amp;amp;lt;p&amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt; &amp;amp;amp;lt;br /&amp;amp;amp;gt; Sorry about the bad quality and my voice, it's my first video... and I'm not the most eloquent speaker.&amp;amp;lt;/p&amp;amp;gt;</iframe><img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/Y0KAgvRwvgI" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/07/twin-pictures-video.htmltag:blogger.com,1999:blog-5917243066768946222.post-6380946373511288292011-07-28T21:52:00.000-04:002011-07-28T21:52:50.614-04:00upgrades on Twin PicturesSo today I published a new version of Twin Pictures. I added some interesting features.<br /><br />First, for the second image, you can choose instead to use the first image in negative. So, just like the default settings with the Android logo, it creates a really great effect. You can really enjoy the&nbsp;dueling&nbsp;process for the two images with the negative option.<br /><br />Here's an example with the Mortal Kombat Logo:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-YXSqUamDLkE/TjIP1FFvlnI/AAAAAAAAA3U/UiqEdDlVohk/s1600/mk00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-YXSqUamDLkE/TjIP1FFvlnI/AAAAAAAAA3U/UiqEdDlVohk/s320/mk00.png" width="192" /></a></div><br /><br />I also added new ways to split the screen for the images:<br /><br /><ul><li>Random: the original method, no real structure, it's spinning around at various speed</li><li>Symmetry: this method splits the screen in two. So you see equally part of image 1 and image 2 at all time.</li><li>Asymmetry: this method can look symmetrical on certain point of view, but not on the part shared by the images. At some point, you will not see one of the image.</li><li>Symmetrical Yin Yang: this one is inspired by some pictures I showed in a previous post. The screen is split in two, but there's no axis of symmetry.</li><li>Asymmetrical Yin Yang: just like asymmetry above, it splits the screen, but not necessary equally and without an axis of symmetry.</li></ul><div>It's also possible to set the brightness. The minimum is 50% and by default it's at 100%.</div><div><br /></div><div><b>Next upgrade</b>:</div><div><br /></div><div>I'm looking at options for the part of the screen where the images intersect. For now, there's a very small change between the images. But it's enough to be a rough one (<i>but it will be an option</i>).&nbsp;So, i'm planning 5-6 options just to give more choice to the users with the visual aspect.</div><br /><br /><a href="https://market.android.com/details?id=com.blogspot.widgg_research.twin">https://market.android.com/details?id=com.blogspot.widgg_research.twin</a><img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/aS8xiK-f8Vg" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/07/upgrades-on-twin-pictures.htmltag:blogger.com,1999:blog-5917243066768946222.post-58342851663450254062011-07-26T11:28:00.001-04:002011-07-26T11:30:27.841-04:00A new live-wallpaperRecently, I showed images about grouping points together to create a different kind of Voronoi diagram (<i>see <a href="http://widgg-research.blogspot.com/2011/07/merging-voronoi.html">Merging Voronoi</a></i>).<br /><br />The case with two groups is very interesting because it splits the plane in two parts. I was first intrigued by what it would look like animated and then I imagined that if each group is associated with an image. It's possible to show parts of the first image where its group is visible and part of the second image where the second group is.<br /><br />So I came up with a very simple live-wallpaper. All you need to do is select two images and let the animation do the rest. This is much more easier to use than the Weird Voronoi (Pro) with all the functions.<br /><br />Here's some outputs:<br /><br />(<i>this one is the default, when you first start the live-wallpaper</i>)<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-CnkIP2OD6wk/Ti7bTqDJc-I/AAAAAAAAA2Q/GFTRzYmz25E/s1600/s00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-CnkIP2OD6wk/Ti7bTqDJc-I/AAAAAAAAA2Q/GFTRzYmz25E/s320/s00.png" width="192" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-3f7Vxp61hEs/Ti7bWXfV4_I/AAAAAAAAA2U/6TloZ6z7ym4/s1600/s03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-3f7Vxp61hEs/Ti7bWXfV4_I/AAAAAAAAA2U/6TloZ6z7ym4/s320/s03.png" width="192" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-D63kcqSYe2Q/Ti7bZbvbeCI/AAAAAAAAA2Y/vRGAInZUZ9E/s1600/s04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-D63kcqSYe2Q/Ti7bZbvbeCI/AAAAAAAAA2Y/vRGAInZUZ9E/s320/s04.png" width="192" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-UZAHVNd5Wr0/Ti7bdmedeaI/AAAAAAAAA2c/kAq-EYb84L4/s1600/s11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-UZAHVNd5Wr0/Ti7bdmedeaI/AAAAAAAAA2c/kAq-EYb84L4/s320/s11.png" width="192" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-EmGPN22OMxc/Ti7bgpklDPI/AAAAAAAAA2g/g7QKg18oBJg/s1600/s15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-EmGPN22OMxc/Ti7bgpklDPI/AAAAAAAAA2g/g7QKg18oBJg/s320/s15.png" width="192" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-wS7t2usgyYY/Ti7bnVgVGGI/AAAAAAAAA2o/ccGIj7IQZ7k/s1600/s22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-wS7t2usgyYY/Ti7bnVgVGGI/AAAAAAAAA2o/ccGIj7IQZ7k/s320/s22.png" width="192" /></a></div><br />Here's the link and the QR code:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://qrcode.kaywa.com/img.php?s=5&amp;d=https%3A%2F%2Fmarket.android.com%2Fdetails%3Fid%3Dcom.blogspot.widgg_research.twin" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://qrcode.kaywa.com/img.php?s=5&amp;d=https%3A%2F%2Fmarket.android.com%2Fdetails%3Fid%3Dcom.blogspot.widgg_research.twin" /></a></div><br /><a href="https://market.android.com/details?id=com.blogspot.widgg_research.twin">https://market.android.com/details?id=com.blogspot.widgg_research.twin</a><img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/wZhCmys_ee4" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/07/new-live-wallpaper.htmltag:blogger.com,1999:blog-5917243066768946222.post-75653137766722819792011-07-18T16:53:00.000-04:002011-07-18T16:53:10.414-04:00Weird Voronoi Pro (news and possible improvement)So first, after playing around with all the functions. I found my favorite configuration yet (<i>but I might found a better one... who knows</i>).<br /><br /><table><tbody><tr> <th>field</th> <th>value</th> </tr><tr> <td>Select a ratio, R =</td> <td>(d1*d2)/(d3^2)</td> </tr><tr> <td>x = f(R)</td> <td>f(R) = tan(R*pi/4)</td> </tr><tr> <td>y = f(x)</td> <td>f(R) = R*(0.5*[!] + 0.5)</td> </tr><tr> <td>z = f(y)</td> <td>f(R) = R^2</td> </tr><tr> <td>c = f(z)</td> <td>f(R) = R</td> </tr></tbody></table><br />And for the improvements, one option is to at least double the number of steps. But I will wait for some comments about this. As you can see, in the above configuration, I don't even need the last one.<br /><br />Also, I'm still looking for more functions to offer a larger variety of transition in the [0;1] range. Particularly functions that might reach both limits more than once in the [0;1] of the input. This will create more disturbance inside one cell alone!<br /><br />This week, I will start writing some documentation, to explain all of this and to present the choices available later to develop your own function with GLSL.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/jdx_zjjdcVA" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/07/weird-voronoi-pro-news-and-possible.htmltag:blogger.com,1999:blog-5917243066768946222.post-24556608469808671762011-07-16T23:04:00.004-04:002011-07-18T16:40:32.453-04:00Weird Voronoi ProFinally, I published my professional version of my live-wallpaper. Currently (<i>while I'm writing those words</i>), the live-wallpaper is not available on the Market, <span class="Apple-style-span" style="color: #660000;"><b>BUT NOW IT'S AVAILABLE</b></span>. I think there's a delay before a paid apps is officially available (<i>I hope it's not too long</i>).<br /><br />The big changes compared with the free version is the number of functions. First, you can choose a "ratio" as a basic value. For each pixel, before determining its color, the three closest points (<i>according to the distance function used, not necessary the straight line</i>) are found. Let d1, d2 and d3 be those distances. In the free version, the only ratio that exists is d1/d2. Which is the basic one used to draw Voronoi diagram. The background used on this blog is drawn with that ratio. Remember that where there's a Voronoi's edge, it means that two points are a the same distance, so d1/d2 = 1. If the pixel is right on a point, then d1/d2 = 0.<br /><br />But in this new version, you have access to other ratio, like d1/d3, d2/d3 and&nbsp;(d1*d2)/(d3*d3). You, currently, have 11 choices for this. And the ratio influence the shape of the cells. For the color, only ratio using d1 and d2 make sense. All the other creates weird interaction. But some people might like it.<br /><br />Second, the functions. For now, the function used to compute the distribution of the color consist of 4 steps. Let R be the ratio, then you have:<br /><br /><ol><li>x = f(R)</li><li>y = f(x)</li><li>z = f(y)</li><li>c = f(z)</li></ol><br />where 'c' is the value used for the color. For each step, you can choose among 55 functions (<i>but let say 54, because if you choose f(R) = 1, then you remove a lot of choices</i>). The default function is f(R) = R.<br />So, if we consider all possible choices (<i>and ignore those that opposed each other</i>), you have 54^4 possibles functions with 11 ratios. Therefore, you have 93 millions functions available to you.<br /><br /><b>NOTE</b> that all function are f:[0,1] -&gt; [0,1]. So, by restraining to this interval, it's easier to control at each steps.<br /><br />Among the functions, there's some that use [?] and [!], two values between 0 and 1. These are values controlled elsewhere in the computation.<br /><br /><ul><li>[?] is a random value that changes for each frame rendered. This value is not stable so it creates effects that some time might look like lightnings.</li><li>[!] on the other hand is more stable. It's a wave that follow the positive values of a sine. Therefore, it goes from 0 to 1 and then from 1 to 0. It can be used to have a regular effects over the color distribution. By default, it takes 4 seconds to have a full cycle, but it's possible to change the speed.</li></ul><br />Here's the qr code and the direct link:<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://qrcode.kaywa.com/img.php?s=8&amp;d=https%3A%2F%2Fmarket.android.com%2Fdetails%3Fid%3Dcom.blogspot.widgg_research.WVP" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://qrcode.kaywa.com/img.php?s=8&amp;d=https%3A%2F%2Fmarket.android.com%2Fdetails%3Fid%3Dcom.blogspot.widgg_research.WVP" width="320" /></a></div><br /><a href="https://market.android.com/details?id=com.blogspot.widgg_research.WVP">https://market.android.com/details?id=com.blogspot.widgg_research.WVP</a><br /><br />Here's some screenshots:<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-YwSHq02070U/TiSZAMLE8OI/AAAAAAAAA04/Ln8A9MkcuJg/s1600/ss00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-YwSHq02070U/TiSZAMLE8OI/AAAAAAAAA04/Ln8A9MkcuJg/s320/ss00.png" width="192" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-aMspNgVX3z4/TiSZAu9VUrI/AAAAAAAAA08/lW3teIrialY/s1600/ss01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-aMspNgVX3z4/TiSZAu9VUrI/AAAAAAAAA08/lW3teIrialY/s320/ss01.png" width="192" /></a></div><br />The settings for the function. From the settings, click on "Functions" then "Cell and Color functions". You can see the selection of the ratio first followed by the four steps of functions.<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-Tfcp9Bcr4V8/TiSZAwFAiJI/AAAAAAAAA1A/N4nDYFW0m-c/s1600/ss02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-Tfcp9Bcr4V8/TiSZAwFAiJI/AAAAAAAAA1A/N4nDYFW0m-c/s320/ss02.png" width="192" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-x8eJ1XVLfO4/TiSZBX1J1iI/AAAAAAAAA1E/4v-F2cSnPqQ/s1600/ss03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-x8eJ1XVLfO4/TiSZBX1J1iI/AAAAAAAAA1E/4v-F2cSnPqQ/s320/ss03.png" width="192" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-dyDNX2-dVpk/TiSZCB3dEII/AAAAAAAAA1I/yMKvU4CNqwU/s1600/ss04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-dyDNX2-dVpk/TiSZCB3dEII/AAAAAAAAA1I/yMKvU4CNqwU/s320/ss04.png" width="192" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-KQ-IZsPIyI4/TiSZC4nuMNI/AAAAAAAAA1M/eQ6--2ldRDQ/s1600/ss05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-KQ-IZsPIyI4/TiSZC4nuMNI/AAAAAAAAA1M/eQ6--2ldRDQ/s320/ss05.png" width="192" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-u6PbO69B62U/TiSZD11XjcI/AAAAAAAAA1Q/9vWlA-ueLM0/s1600/ss06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-u6PbO69B62U/TiSZD11XjcI/AAAAAAAAA1Q/9vWlA-ueLM0/s320/ss06.png" width="192" /></a></div><br />I also post an update for the [!] feature. First, I was using the function sin(pi * t) where t is in [0;1]. But I forgot that this function is not continuous on the first derivative. This mean that at some point, the transition was not very fluid. It was following an half-circle and going fast on the 0 and took a lot of time around the 1.<br /><br />Therefore, I changed it to cos(2*pi*t) * 0.5 + 0.5. With this, the function is still in the [0;1] range but the transition is very smooth. There's no drastic, unaesthetic, changes. All of this because the this function is continuous on the first derivative.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/2hkS-Yw25go" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/07/weird-voronoi-pro.htmltag:blogger.com,1999:blog-5917243066768946222.post-84189561032542962832011-07-08T21:04:00.001-04:002011-07-08T21:43:31.920-04:00merging voronoiHere we are playing again with the Voronoi diagram (<i>VD</i>). We wanted to see what happen when sites are merged together (<i>MVD, merged VD</i>).<br /><br />VD partitions the plane in cells where each of these cell represents the closest part of the plane to a particular site. So, if you have sites on a map of various fast food restaurants, the Voronoi diagram tells you which one is physically the closest to your location.<br /><br />But imagine that we want to consider all restaurant from a particular chain as one entity. We want to know the influence or the domination of a particular chain.<br /><br />The following images are in pair. The first one is the influence of a chain of restaurant and the second is the actual VD that everyone knows. Cells with the same color represents a chain of restaurant.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-gQ8uLnNBAy0/Then7J53buI/AAAAAAAAAx4/hw32vTxdaJE/s1600/bet_18_21_00_a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-gQ8uLnNBAy0/Then7J53buI/AAAAAAAAAx4/hw32vTxdaJE/s320/bet_18_21_00_a.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-7tpODS377c0/Then8MnQy8I/AAAAAAAAAx8/6BE5fyGh9CQ/s1600/bet_18_21_00_b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-7tpODS377c0/Then8MnQy8I/AAAAAAAAAx8/6BE5fyGh9CQ/s320/bet_18_21_00_b.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-n5IotbvvJKk/TheoIuZEvOI/AAAAAAAAAyI/CqGDhYgjkC4/s1600/mult_02_a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-n5IotbvvJKk/TheoIuZEvOI/AAAAAAAAAyI/CqGDhYgjkC4/s320/mult_02_a.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-IoTIDBLksBQ/TheoJjQFoZI/AAAAAAAAAyM/lRx-SibZe8M/s1600/mult_02_b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-IoTIDBLksBQ/TheoJjQFoZI/AAAAAAAAAyM/lRx-SibZe8M/s320/mult_02_b.png" width="320" /></a></div><br />In the images, you can see some brighter points (<i>particularly in the first two images</i>), this is the actual location of the site (<i>or restaurant for in our example</i>).<br /><br />And just like the VD is well known for its role in texture synthesis, we hope to find a way to use the MVD to create some interesting results.<br /><br />As for the diagram itself, we don't really know what to do with it or how to interpret it. VD has a dual graph called the Delaunay Triangulation. But what would be the dual graph of MVD ? Where do we put the edges ? That's an open question.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/QBR6dwhOvw8" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/07/merging-voronoi.htmltag:blogger.com,1999:blog-5917243066768946222.post-21160758064192603812011-07-04T22:31:00.000-04:002011-07-04T22:31:24.546-04:00More texture synthesisIn this post, I present some new result that we really like. Again, it's a variation of the Voronoi diagram. You can observe the Voronoi cells interacting with each other. The colors help to see clearly the cells. And because of the few number of color, some cells might share the same color but are not related at all.<br /><br />Here's some of the results:<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-JBgNSlNugzo/ThJ2soT6wPI/AAAAAAAAAvU/c_3-6nMap1M/s1600/compare_01_a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-JBgNSlNugzo/ThJ2soT6wPI/AAAAAAAAAvU/c_3-6nMap1M/s320/compare_01_a.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-N47d9lDrpmU/ThJ2tnfL8vI/AAAAAAAAAvY/i-hG2vyN37k/s1600/mult_00_a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-N47d9lDrpmU/ThJ2tnfL8vI/AAAAAAAAAvY/i-hG2vyN37k/s320/mult_00_a.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-RtDeMRmjQVs/ThJ2ueubkzI/AAAAAAAAAvc/Uu1a_TtQEpo/s1600/mult_02_a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-RtDeMRmjQVs/ThJ2ueubkzI/AAAAAAAAAvc/Uu1a_TtQEpo/s320/mult_02_a.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-hNj55Bf6_Y0/ThJ2vEjdurI/AAAAAAAAAvg/Wga8k-hcwkQ/s1600/mult_03_a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-hNj55Bf6_Y0/ThJ2vEjdurI/AAAAAAAAAvg/Wga8k-hcwkQ/s320/mult_03_a.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-Ito8ssAwBVI/ThJ2vyo2noI/AAAAAAAAAvk/oDYzi1NNSDM/s1600/mult_04_a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-Ito8ssAwBVI/ThJ2vyo2noI/AAAAAAAAAvk/oDYzi1NNSDM/s320/mult_04_a.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-IG7mdwmA608/ThJ2xckxKfI/AAAAAAAAAvo/YczO7EJ6Svw/s1600/paired_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-IG7mdwmA608/ThJ2xckxKfI/AAAAAAAAAvo/YczO7EJ6Svw/s320/paired_03.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-dXV7ffHvmtU/ThJ2yjDlCOI/AAAAAAAAAvs/F-Cqj8gla7o/s1600/paired_04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-dXV7ffHvmtU/ThJ2yjDlCOI/AAAAAAAAAvs/F-Cqj8gla7o/s320/paired_04.png" width="320" /></a></div><br />This method, if it produces the result we're expecting, can be used to create texture by simply specifying some parameters or an artist can use a program with that method implemented to place some control points and control other parameters.<br /><br />Again, all these images can be computed with CUDA because each pixel is unique.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/-4Nl6KQQEYg" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/07/more-texture-synthesis.htmltag:blogger.com,1999:blog-5917243066768946222.post-27715320622544961982011-06-27T16:03:00.000-04:002011-06-27T16:03:57.829-04:00mosaicYesterday I mentioned using images as a source for the points and orientations. And I managed to do something.<br /><br />First, the original image (a South Park version of myself, before I lose some weight):<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-tZs3Z89hA1c/TgjhLKaWtJI/AAAAAAAAAsk/GAIhlU0yRCA/s1600/me_southpark.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-tZs3Z89hA1c/TgjhLKaWtJI/AAAAAAAAAsk/GAIhlU0yRCA/s1600/me_southpark.png" /></a></div><br /><br />And here's the various mosaic:<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-695p1Hplsms/Tgjhgb3ZHPI/AAAAAAAAAso/fRrTpoivtzw/s1600/out_01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-695p1Hplsms/Tgjhgb3ZHPI/AAAAAAAAAso/fRrTpoivtzw/s320/out_01.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-CjPn3Azhu4w/TgjhjA4KpiI/AAAAAAAAAss/1an448RqKMI/s1600/out_03_255.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-CjPn3Azhu4w/TgjhjA4KpiI/AAAAAAAAAss/1an448RqKMI/s320/out_03_255.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-RW6TAfPvmug/Tgjhlr9oUqI/AAAAAAAAAsw/1sDUcUZmdvA/s1600/out_04_128.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-RW6TAfPvmug/Tgjhlr9oUqI/AAAAAAAAAsw/1sDUcUZmdvA/s320/out_04_128.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-ZnG8VmH13F8/TgjhnwNnPyI/AAAAAAAAAs0/oIsc9-Ouvw8/s1600/out_07_128.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-ZnG8VmH13F8/TgjhnwNnPyI/AAAAAAAAAs0/oIsc9-Ouvw8/s320/out_07_128.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-_ZDsTXQU6To/Tgjhq27CAJI/AAAAAAAAAs4/6Aa8D2okq1g/s1600/out_08_new_M_0.9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://4.bp.blogspot.com/-_ZDsTXQU6To/Tgjhq27CAJI/AAAAAAAAAs4/6Aa8D2okq1g/s320/out_08_new_M_0.9.png" width="320" /></a></div><br /><br />I used various effects to control the orientation in the cell. Plus I tried a random point selection, except for the first output.<br /><br />Which one do you prefer ?<br /><br />Naturally, to produce the output, I'm still using CUDA. I didn't used any data structure to optimize, so it can be computed a bit faster.<img src="http://feeds.feedburner.com/~r/WidggsResearch/~4/YhIu7fZ8j-c" height="1" width="1" alt=""/>widgghttp://www.blogger.com/profile/06726054590740287992noreply@blogger.com0http://widgg-research.blogspot.com/2011/06/mosaic.html