« KoalaRainbow 0.10.1 released | Main | Viva el Hot Fuss »

September 01, 2004

Isometric abstraction for KoalaRainbow?

Here's some output from a little Python playing from a week or two ago:

pypixart-iso-blocks.png

The blocks on the right are generated by fairly explicit function calls with explicitly named colors. The only abstraction they have is the 3d point transformation function. The blocks on the left are more generic; a generic rendering class takes a list of polygons and renders them using dot-product 'visibility culling' and dot-product brightness determination (the colors are actually HSV, with the hue associated with the object, the saturation always at max, and the V varying with the dot-product of the light vector and the surface normal.) All in all, nothing fancy, and a bit silly given the fact that any 3d engine can easily render things isometrically given the proper camera transform. (The HSV I presume can be implemented with shaders, but one might ask why not just use normal lighting if you've got it.)

Anywho, back on track. I'm considering taking KoalaRainbow and actually introducing some abstractions in the drawing stage, such as supporting things like the isometric magic above. Well, that and bulking up the primitives.

The fly in the ointment is that I don't like working with Perl. Since I generally like shiny things and always want to apply visualization to everything, ideally I could develop reusable code that could be used by KoalaRainbow, and then reuse that code in my other projects. Except all of my other projects are tending to involve Python. So I'm torn. There's the chance that people will use KoalaRainbow, which is always a good thing for a project, but then it's also a dead-end otherwise from my perspective. It seems unlikely that a hybrid monstrosity would fly; I might as well just dump KoalaRainbow and go with a pure-python plugin for PyBloxsom or some other pure-python blog short of plone.

But most importantly, this ranting provides a data point for KoalaRainbow to visualize. Muahaha! Comments appreciated because they are needed for visualization too. And heck, I haven't even tried to visualize trackbacks yet, so they might be fun as well.

Posted by sombrero at September 1, 2004 03:11 AM

Comments

Hi, have installed KR 0.10.0 and 0.10.1, both give me the following error when trying to access from the MT control panel:

Can't load error template; got error 'Loading template 'error.tmpl' failed: HTML::Template->new() : Cannot open included file tmpl/koalaRainbow/error.tmpl : file not found. at /var/www/philsdiary/cgi-bin/extlib/HTML/Template.pm line 1500 HTML::Template::_init_template('HTML::Template=HASH(0x8afc96c)') called at /var/www/philsdiary/cgi-bin/extlib/HTML/Template.pm line 1105 HTML::Template::_init('HTML::Template=HASH(0x8afc96c)') called at /var/www/philsdiary/cgi-bin/extlib/HTML/Template.pm line 999 HTML::Template::new('HTML::Template','filename','tmpl/koalaRainbow/error.tmpl','path','ARRAY(0x8a8deb4)','die_on_bad_params',0,'global_vars',1,...) called at /var/www/philsdiary/cgi-bin/extlib/HTML/Template.pm line 1049 HTML::Template::new_file('HTML::Template','tmpl/koalaRainbow/error.tmpl','path','ARRAY(0x8a8deb4)','die_on_bad_params',0,'global_vars',1,'path',...) called at /var/www/philsdiary/cgi-bin/lib/MT/App.pm line 406 eval {...} called at /var/www/philsdiary/cgi-bin/lib/MT/App.pm line 405 MT::App::load_tmpl('OnlyTheWind::KoalaRainbow::WebGui=HASH(0x85c1b10)','error.tmpl','path','ARRAY(0x8a8dea8)') called at /var/www/philsdiary/cgi-bin/extlib/OnlyTheWind/KoalaRainbow/WebGui.pm line 146 OnlyTheWind::KoalaRainbow::WebGui::load_tmpl('OnlyTheWind::KoalaRainbow::WebGui=HASH(0x85c1b10)','error.tmpl') called at /var/www/philsdiary/cgi-bin/lib/MT/App.pm line 282 MT::App::show_error('OnlyTheWind::KoalaRainbow::WebGui=HASH(0x85c1b10)','Loading template \'menu.tmpl\' failed: HTML::Template->new() ...') called at /var/www/philsdiary/cgi-bin/lib/MT/App.pm line 356 eval {...} called at /var/www/philsdiary/cgi-bin/lib/MT/App.pm line 297 MT::App::run('OnlyTheWind::KoalaRainbow::WebGui=HASH(0x85c1b10)') called at /var/www/philsdiary/cgi-bin/plugins/krgui.cgi line 38 eval {...} called at /var/www/philsdiary/cgi-bin/plugins/krgui.cgi line 30 '. Giving up. Original error was
Loading template 'menu.tmpl' failed: HTML::Template->new() : Cannot open included file tmpl/koalaRainbow/menu.tmpl : file not found. at /var/www/philsdiary/cgi-bin/extlib/HTML/Template.pm line 1500
HTML::Template::_init_template('HTML::Template=HASH(0x8a6e240)') called at /var/www/philsdiary/cgi-bin/extlib/HTML/Template.pm line 1105
HTML::Template::_init('HTML::Template=HASH(0x8a6e240)') called at /var/www/philsdiary/cgi-bin/extlib/HTML/Template.pm line 999
HTML::Template::new('HTML::Template','filename','tmpl/koalaRainbow/menu.tmpl','path','ARRAY(0x8a6eac4)','die_on_bad_params',0,'global_vars',1,...) called at /var/www/philsdiary/cgi-bin/extlib/HTML/Template.pm line 1049
HTML::Template::new_file('HTML::Template','tmpl/koalaRainbow/menu.tmpl','path','ARRAY(0x8a6eac4)','die_on_bad_params',0,'global_vars',1,'path',...) called at /var/www/philsdiary/cgi-bin/lib/MT/App.pm line 406
eval {...} called at /var/www/philsdiary/cgi-bin/lib/MT/App.pm line 405
MT::App::load_tmpl('OnlyTheWind::KoalaRainbow::WebGui=HASH(0x85c1b10)','menu.tmpl','path','ARRAY(0x8a6e9bc)') called at /var/www/philsdiary/cgi-bin/extlib/OnlyTheWind/KoalaRainbow/WebGui.pm line 146
OnlyTheWind::KoalaRainbow::WebGui::load_tmpl('OnlyTheWind::KoalaRainbow::WebGui=HASH(0x85c1b10)','menu.tmpl') called at /var/www/philsdiary/cgi-bin/lib/MT/App.pm line 459
MT::App::build_page('OnlyTheWind::KoalaRainbow::WebGui=HASH(0x85c1b10)','menu.tmpl','HASH(0x8473f14)') called at /var/www/philsdiary/cgi-bin/extlib/OnlyTheWind/KoalaRainbow/WebGui.pm line 389
OnlyTheWind::KoalaRainbow::WebGui::build_page('OnlyTheWind::KoalaRainbow::WebGui=HASH(0x85c1b10)','menu.tmpl','HASH(0x8473f14)') called at /var/www/philsdiary/cgi-bin/extlib/OnlyTheWind/KoalaRainbow/WebGui.pm line 164
OnlyTheWind::KoalaRainbow::WebGui::menuMode('OnlyTheWind::KoalaRainbow::WebGui=HASH(0x85c1b10)') called at /var/www/philsdiary/cgi-bin/lib/MT/App.pm line 348
eval {...} called at /var/www/philsdiary/cgi-bin/lib/MT/App.pm line 297
MT::App::run('OnlyTheWind::KoalaRainbow::WebGui=HASH(0x85c1b10)') called at /var/www/philsdiary/cgi-bin/plugins/krgui.cgi line 38
eval {...} called at /var/www/philsdiary/cgi-bin/plugins/krgui.cgi line 30


Is there anything you can suggest? the tmpl files are all chmod 755'd.

Posted by: Phil at September 7, 2004 02:17 PM

A comment! yay!

I'll email this too, but a helpful user early on had the following to say:
---
Hey!

Had some problems with koalarainbow when installing into an aliased
/cgi-bin/ directory.

I had to edit the template path:
#
# The filesystem path to the 'tmpl' directory, which contains the
# front-end templates used by the Movable Type application. This
# setting defaults to './tmpl', which means that the 'tmpl' directory
# is in the same directory as the 'mt.cgi' file; you probably don't
# need to change this setting.
#
TemplatePath /usr/home/usr/cgi-bin//tmpl

And that seemed to work. Dunno if it's worth putting that in the readme.
---

This is most likely the problem, as most people seem to otherwise be experiencing issues only with the actual rendering process...

Andrew

Posted by: sombrero at September 11, 2004 02:12 AM

I just installed MT 3.11 and KoalaRainbow looks very interesting! Too bad my installation won't work (neither 0.10 nor 0.10.1). Here's the error I get:
------------------

I think inc is ../extlib ../lib /usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.6.1 /usr/share/perl/5.6.1 /usr/local/lib/site_perl .
I am getting an invocation path of krgui.cgi

Got an error:
Can't locate Class/ISA.pm in @INC (@INC contains: ../extlib ../lib /usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.6.1 /usr/share/perl/5.6.1 /usr/local/lib/site_perl .) at ../extlib/OnlyTheWind/KoalaRainbow/ContextManager.pm line 187.
BEGIN failed--compilation aborted at ../extlib/OnlyTheWind/KoalaRainbow/ContextManager.pm line 187.
Compilation failed in require at ../extlib/OnlyTheWind/KoalaRainbow/FuncRegistry.pm line 23.
BEGIN failed--compilation aborted at ../extlib/OnlyTheWind/KoalaRainbow/FuncRegistry.pm line 23.
Compilation failed in require at ../extlib/OnlyTheWind/KoalaRainbow/QueryParseNodes/FunctionCall.pm line 22.
BEGIN failed--compilation aborted at ../extlib/OnlyTheWind/KoalaRainbow/QueryParseNodes/FunctionCall.pm line 22.
Compilation failed in require at ../extlib/OnlyTheWind/KoalaRainbow/QueryParser.pm line 24.
BEGIN failed--compilation aborted at ../extlib/OnlyTheWind/KoalaRainbow/QueryParser.pm line 24.
Compilation failed in require at ../extlib/OnlyTheWind/KoalaRainbow/WebGui.pm line 32.
BEGIN failed--compilation aborted at ../extlib/OnlyTheWind/KoalaRainbow/WebGui.pm line 32.
Compilation failed in require at krgui.cgi line 31.

Posted by: Donald at October 8, 2004 07:58 PM

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?