Jump to content

Make 3D


zaya

Recommended Posts

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. 

example2.png

 

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 by zaya
Updating DLL
  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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:

 

make3d_01.png

 

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?

 

Link to comment
Share on other sites

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:

 

make3d_01.png

 

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 :/ 

Link to comment
Share on other sites

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:

 

make3d_02.png

 

This could be very useful for making backgrounds as you pointed out. It prob still needs some tweaking, but I like it!  :)

 

Link to comment
Share on other sites

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:

 

heatmap.png

 

heatmap2.png

 

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 by zaya
linking to attachment rather than uploading it twice
  • Like 1
Link to comment
Share on other sites

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.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...