Paint.NET

Welcome to the Paint.NET forum!
It is currently Sat Nov 21, 2009 6:57 pm

All times are UTC


Forum rules


Questions or problems with plugin installation? Click here.



Post new topic Reply to topic  [ 243 posts ]  Go to page 1, 2, 3, 4, 5 ... 17  Next
Author Message
 Post subject: CodeLab (advanced users) Create your own Effects! (9/16/08)
PostPosted: Sat Mar 11, 2006 1:28 am 
Offline
Paint.NET Lead Developer
User avatar

Joined: Tue Jul 19, 2005 6:22 pm
Posts: 8877
Location: Kirkland, WA
Here's an "effect" that Tom wrote. Basically what it does is let you write code that is compiled on the fly and that is then executed in the Paint.NET effect engine. This is the same plugin that we made available for Paint.NET v2.1, but it has been updated to work with Paint.NET v2.6 (and later). With this you can implement almost any type of effect you want if you have the programming and mathematical talent to do so. This plugin works by presenting you with a simple text editor that you can use to type in C# code that is then compiled and executed (rendered) as soon as you stop typing.

Please note that this is experimental technology and is not meant to provide a robust development environment. It is perfect for rapid prototyping and very useful for educational purposes including teaching computer graphics.

This plugin especially benefits from Paint.NET's extensive multiprocessor and multicore support. For instance, if you are interested in rendering high resolution fractals on an expensive workstation, this is the way to do it! The code you write is automatically multithreaded and the workload is spread across multiple CPU's resulting in near linear performance scaling (4 CPU's = almost 4x faster).

Download: http://www.boltbait.com/pdn/codelab/
Note: BoltBait is the current maintainer of CodeLab.

Help file:
http://www.boltbait.com/pdn/codelab/help/

Tutorials:
http://paintdotnet.12.forumer.com/viewtopic.php?t=5281
http://paintdotnet.12.forumer.com/viewtopic.php?t=5308
http://paintdotnet.12.forumer.com/viewtopic.php?t=6405


Work with complicated displacement filters:
Image Image

Parametric images:
Image

High resolution fractals:
Image Image

_________________
The Paint.NET Blog: http://blog.getpaint.net/
Donations are always appreciated! http://www.getpaint.net/donate.html
Paint.NET Search Engine: http://searchpaint.net

Image


Last edited by Rick Brewster on Thu Apr 05, 2007 7:38 pm, edited 4 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 11, 2006 1:34 am 
Offline
User avatar

Joined: Mon Feb 13, 2006 1:26 am
Posts: 286
Location: Philadelphia, PA
Very cool!

I've been wondering what CodeLab was. I still don't have Visual Studio installed...school is very busy.
To compile the code with this plugin, does Visual Studio or another compiler need to be installed or is the compiler built-in?

Thanks for the post! I'm all hyped up about writing plugins now!

*starts installing Visual Studio*
-John

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 11, 2006 1:36 am 
Offline
Paint.NET Lead Developer
User avatar

Joined: Tue Jul 19, 2005 6:22 pm
Posts: 8877
Location: Kirkland, WA
Visual Studio is not required. Everything is built-in to the .NET Framework that you've already got installed.

_________________
The Paint.NET Blog: http://blog.getpaint.net/
Donations are always appreciated! http://www.getpaint.net/donate.html
Paint.NET Search Engine: http://searchpaint.net

Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 12:59 am 
Offline
User avatar

Joined: Wed Feb 22, 2006 9:13 pm
Posts: 974
Location: Corpus Christi
Thanks for the post!

For advanced users is correct! I myself have no idea how to write code.

However, there are some cool effects in the "Samples" folder included in the .zip file that you can fool around with. If for nothing else, grab this plugin for the included effects!

_________________
Image
- DO NOT contact me asking for the .pdn of my avatar or the PDN logo. Thank you. Have a nice day.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 5:34 pm 
Offline
User avatar

Joined: Mon Feb 13, 2006 1:26 am
Posts: 286
Location: Philadelphia, PA
To where should bug reports and the like for the CodeLab utility itself be directed?

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 5:34 pm 
Offline
Paint.NET Developer
User avatar

Joined: Tue Jul 19, 2005 6:45 pm
Posts: 48
Location: Redmond, WA
SearedIce wrote:
To where should bug reports and the like for the CodeLab utility itself be directed?

This topic will do fine, what's the bug?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 9:05 pm 
Offline
User avatar

Joined: Mon Feb 13, 2006 1:26 am
Posts: 286
Location: Philadelphia, PA
I have several bugs/suggestions:

When a file is opened, it would be nice if the "Name: " text box were updated with the file name (minus the .cs). It does the opposite while saving, so I thought it would make sense to do this while loading.

Also, the ability to scroll sideways instead of wrapping text would be nice. Or, as in my copy of Visual Studio, have a small indication to the side of the text box that indicates that a line has been wrapped (I understand this is harder to implement).

I beleive this is more of a suggestion for Paint.Net and not CodeLab, but it would be nice if the image could be zoomed/panned while changing things in an open Effect dialog (or CodeLab).

When an error shows up in the error field, and I click on it, the text in the text box that is causing the error is highlighted. This is great, however, if the erroneous code is not currently visible, nothing happens. It would be nice if the code edit window were automatically scrolled to where the highlighted error can be seen...otherwise, it is hard to find the error.

One final thing:
The code line enumeration starts at line 13, and sometimes error messages refer to things on lines such as "10." For example, if I change something in the first line like if I change "Render" to "Rendxer" (for no reason, obviously), it reports an error on "line 10". I understand that this happens becuase there is actually more code above what can be seen. I don't think it can hurt to show this code.

Overall, however, I'm extremely pleased with CodeLab...it is a great tool!

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 10:16 pm 
Offline
User avatar

Joined: Mon Feb 13, 2006 1:26 am
Posts: 286
Location: Philadelphia, PA
Also, when I press the "Delete" key instead of "Backspace" to delete code, the code is not recompiled after .5 sec.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 18, 2006 8:34 pm 
Offline
Paint.NET Lead Developer
User avatar

Joined: Tue Jul 19, 2005 6:22 pm
Posts: 8877
Location: Kirkland, WA
Moved to new Plugins forum

_________________
The Paint.NET Blog: http://blog.getpaint.net/
Donations are always appreciated! http://www.getpaint.net/donate.html
Paint.NET Search Engine: http://searchpaint.net

Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 06, 2006 8:46 pm 
Offline
Paint.NET Developer
User avatar

Joined: Tue Jul 19, 2005 6:45 pm
Posts: 48
Location: Redmond, WA
SearedIce wrote:
<Various bug reports>


Thanks for the bugs, I'll look into those. I'm not sure about the wrapping thing, but I'll look at it. Don't count on a wrapping indicator, though.

Ideally, we would write a full-fledged code editor, but that would be a little overkill for these purposes.

-tjackson


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 4:05 am 
Offline
User avatar

Joined: Wed Nov 30, 2005 11:40 pm
Posts: 1267
Location: Middle Tennessee
Wow.
I have only been programming with a general knowledge in Javascript. I understand this is C#? I took to it quickly and I love the flexibility. I need to learn alot of the function, but nice none the less. creates nice functional colors.

Also, debuggers just give you a specific area. I think there is no 100% accuracy pinpoint on a processor > 80 MHz

_________________
Image
Kitteh all growed up :_(


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 4:11 am 
Offline
Paint.NET Lead Developer
User avatar

Joined: Tue Jul 19, 2005 6:22 pm
Posts: 8877
Location: Kirkland, WA
Yup, it's C#. You'll find good reference for the Math functions here, btw (it uses the .NET Framework stuff):
Code:
http://msdn2.microsoft.com/en-us/library/system.math(VS.80).aspx

That URL doesn't seem to get linked up correctly with this forum software. D'oh. Copy and paste wins this round. Also, I recommend setting the language filter to just C#)[/url]

_________________
The Paint.NET Blog: http://blog.getpaint.net/
Donations are always appreciated! http://www.getpaint.net/donate.html
Paint.NET Search Engine: http://searchpaint.net

Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 12:26 pm 
Offline
User avatar

Joined: Wed Nov 30, 2005 11:40 pm
Posts: 1267
Location: Middle Tennessee
Rick Brewster wrote:
Yup, it's C#. You'll find good reference for the Math functions here, btw (it uses the .NET Framework stuff):
http://msdn2.microsoft.com/en-us/librar ... math(VS.80).aspx[/url]

I was looking around last night for the random function (which I know now is a Random instance (here r), referenced:
Code:
byte c = (byte)(r.Next(0,255))

The system functions are almost foreign, also.
The sierpinski triangle example I did on 8192 x 6144 resolution. Zoomed in a good bit.
The fractals are fast.

_________________
Image
Kitteh all growed up :_(


Last edited by Illnab1024 on Tue Aug 29, 2006 2:30 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 28, 2006 10:28 pm 
Offline

Joined: Sun Jul 30, 2006 7:55 am
Posts: 22
my fathers looking into it. good job!

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 03, 2006 9:06 pm 
Offline
User avatar

Joined: Wed Nov 30, 2005 11:40 pm
Posts: 1267
Location: Middle Tennessee
Here's a big fat bug: Go and dispose the source surface. It crashes it. I suppose a keyhook before it renders would do.

_________________
Image
Kitteh all growed up :_(


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 243 posts ]  Go to page 1, 2, 3, 4, 5 ... 17  Next

All times are UTC


Who is online

Users browsing this forum: CyberSpace and 31 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosted by Forumer & phpBB

Get your Forumer™ today!

Adding a forum to your website is a great way to get return visitors.

» Get your own Free Forum!

Terms of Use

Privacy Policy

Report Abuse

Copyright © 2003-2009 Forumer. All Rights Reserved. | Copyright © paint.NET