zaya Posted August 26, 2019 Share Posted August 26, 2019 (edited) Hey guys, I recently made a plugin to brush up on my linear algebra for this upcoming semester. The result takes in an image, and outputs a 3D image where the 3rd dimension is the intensity of the color. It works pretty well, I think! If someone smarter than me wants to mess with the code, and see if they can improve it more, feel free. As always, the code is open source and can be found on my GitHub page The plugin will appear under Stylize > Make 3D Let me know what you think! make-3d.zip Edited August 26, 2019 by zaya Updating DLL 1 Quote Link to comment Share on other sites More sharing options...
homebrew Posted August 26, 2019 Share Posted August 26, 2019 hi tried this but doesn't work for me. there is TR's Monolitic one can apply to text box. did your effect work with image, text or selection only. i've tried on image, logo, text and selection with no result on PDN 4.2.1 and win X build 1903 Quote Link to comment Share on other sites More sharing options...
HyReZ Posted August 26, 2019 Share Posted August 26, 2019 Greetings, I just attempted to use your plugin on a 5000 x 5000 pixel canvas and got a 15 minute rendering time and horrible results with the extrusion. The plugin needs more development. 1 Quote Link to comment Share on other sites More sharing options...
zaya Posted August 26, 2019 Author Share Posted August 26, 2019 6 hours ago, homebrew said: hi tried this but doesn't work for me. there is TR's Monolitic one can apply to text box. did your effect work with image, text or selection only. i've tried on image, logo, text and selection with no result on PDN 4.2.1 and win X build 1903 Hi! The plugin only works on images. In the example it is rasterized text that has already been committed as an image. 6 hours ago, HyReZ said: Greetings, I just attempted to use your plugin on a 5000 x 5000 pixel canvas and got a 15 minute rendering time and horrible results with the extrusion. The plugin needs more development. Yeah. I am unsure how to utilize the GPU to render images, so everything is going through the CPU which I realize makes it rather slow. It is not intended for use on larger images as it runs in O(n^3) time amortized. Could you elaborate on the "horrible results"? Did it look aesthetically bad, or was something the matter with the actual rendering? This is kind of a crappy hack as Paint.NET is not intended for use as a 3D rendering medium; apologies if I oversold the usefulness of the plugin. Quote Link to comment Share on other sites More sharing options...
lynxster4 Posted August 26, 2019 Share Posted August 26, 2019 @zaya I have to agree with the above comments. I don't really see how this is supposed to look good. It needs some serious tweaking! My result: The 'Y' just goes on forever...there is no end to it. At least the other letters stopped with their natural curves. Why are there transparent spaces between the colored lines? Quote My Art Gallery | My Shape Packs | ShapeMaker Mini Tut | Air Bubble Stained Glass Chrome Text with Reflections | Porcelain Text w/ Variegated Coloring | Realistic Knit PatternOpalescent Stained Glass | Frosted Snowman Cookie | Leather Texture | Plastic Text | Silk Embroidery Visit my Personal Website "Never, ever lose your sense of humor - you'll live longer" Link to comment Share on other sites More sharing options...
zaya Posted August 26, 2019 Author Share Posted August 26, 2019 19 minutes ago, lynxster4 said: @zaya I have to agree with the above comments. I don't really see how this is supposed to look good. It needs some serious tweaking! My result: The 'Y' just goes on forever...there is no end to it. At least the other letters stopped with their natural curves. Why are there transparent spaces between the colored lines? I'm afraid I don't know why there are transparent spaces. I assume it has something to do with rounding errors in the matrix algebra, but I really couldn't say. It may be the shader as well, I'll look into it. As for continuing on forever, that I don't know how to fix. That's because the only coordinates it translates are the coordinates of the src canvas. It then assumes the first place the points hit on the origin is also their coordinate at their base regardless of the Y value. (Imagine tilting a pole closer and closer to the screen until it intersects it. At that point, it just assumes every point under the intersection is also part of the pole). There may be ways of fixing this, but I think they'll slow down the program even further. Sorry Quote Link to comment Share on other sites More sharing options...
zaya Posted August 26, 2019 Author Share Posted August 26, 2019 It’s also worth noting, im not sure text is the best use-case for this. I had some cool looking results using it on clouds to generate mountain terrain: Quote Link to comment Share on other sites More sharing options...
lynxster4 Posted August 26, 2019 Share Posted August 26, 2019 Now I see the value in this plugin. Neat! I think we were all using this on text because you used text in your initial example. Maybe you could change your screenshot...to the above example you just posted maybe? Here's my new attempt: This could be very useful for making backgrounds as you pointed out. It prob still needs some tweaking, but I like it! Quote My Art Gallery | My Shape Packs | ShapeMaker Mini Tut | Air Bubble Stained Glass Chrome Text with Reflections | Porcelain Text w/ Variegated Coloring | Realistic Knit PatternOpalescent Stained Glass | Frosted Snowman Cookie | Leather Texture | Plastic Text | Silk Embroidery Visit my Personal Website "Never, ever lose your sense of humor - you'll live longer" Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 26, 2019 Share Posted August 26, 2019 Should I move this to the Plugin Developer's Central ? Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
zaya Posted August 26, 2019 Author Share Posted August 26, 2019 (edited) make-3d.zip Okay, so I haven't solved all the bugginess, but I got it to a point where it's beyond my intelligence to be able to fix it any more. Please see the updated file. It now contains a little slider thing to change the relative "blackness" that colors are compared to. Adjusting this sometimes fixes the leaky colors bug @lynxster4 identified. I have also found the output looks a lot better if you run a Gaussian blur on the images before running them through the Make3D plugin. I did not make the app do this by default, because if an image has very crisp, non-aliased colors it will be very smooth, but for photos and the like id recommend blurring before running the plugin. Finally, I found the best usecase for this plugin (other than a weird vanity project for me...) You can use it to take images of topographical maps and generate 3D versions (sort of). It takes a lot of tweaking with the colors and the Black Tolerance value but it's usually possible to get a sort of decent image from most maps. See below: It also makes cool looking modern artish stuff if you run it on random blurred images. Let me know what you think and @Rick Brewster if you think it belongs there, feel free. I won't be mad about it. But I think this is the last update I'll make to this plugin for a while... make-3d.zip Edited August 26, 2019 by zaya linking to attachment rather than uploading it twice 1 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted August 27, 2019 Share Posted August 27, 2019 6 hours ago, Rick Brewster said: Should I move this to the Plugin Developer's Central ? This^. Let's pop it in the Developer section until we get a few more of the kinks worked out. 1 Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.