Jump to content
How to Install Plugins ×

Shape3D (2007-08-24) [Bug Fixed September 2023]


Recommended Posts

  • 3 months later...

No UI pops up for Shape3D in v4.0.19 -


Plugin will render a simple gray scale sphere and does not launch the settings UI. 

PDN locks up solid and must be terminated from task manager.  Crash logs do NOT get generated.


Troubleshooting steps taken:

 -force quit pdn/ uninstall then reinstall shape3d from forum = no change
 -force quit pdn/ uninstall then reinstall shape3d from author's web page = no change
 -force quit pdn/ unlock all items in effects folder = no change
 -ran fixpdn.exe/ reboot pc = no change
 -reinstall .NET, now running v4.7 = no change  (pdn diags show .NET as v4.03)
 -uninstall pdn/ reboot pc/ reinstall pdn/ reboot pc = no change
 -uninstall v4.0.19/ reboot pc/ install v4.0.16/ reboot pc = no change


NOTE:  Shape3D was all good prior to swapping out my internal hdd. New drive has same OS, same

hardware, all OS updates installed, drive defragged and cleaned.  Programs/ apps and the like

are not much different now than from what was installed on the old drive except the new system

was built without the oem bloatware and I now use Microsoft Security Essentials instead of

Avast AV free.

Application    paint.net 4.0.19 (Final 4.19.6484.39094)
Build Date    Monday, October 02, 2017
Install type    Classic
Hardware accelerated rendering (GPU)    True
Animations    False
DPI    96.00 (1.00x scale)
Language    en-US
OS    Windows 7 Service Pack 1 x64 (6.1.7601.65536)
.NET Runtime    4.0.30319.42000
Physical Memory    4,015 MB
CPU    Intel(R) Core(TM)2 Duo CPU     E6550  @ 2.33GHz
    Speed    ~2327 MHz
    Cores / Threads    2 / 2
    Features    DEP, SSE, SSE2, SSE3, SSSE3
Video Card    Intel(R) Q35 Express Chipset Family
    Dedicated Video RAM    0 MB
    Dedicated System RAM    64 MB
    Shared System RAM    192 MB
    Vendor ID    0x8086
    Device ID    0x29B2
    Subsystem ID    0x281A103C
    Revision    2
    LUID    0x00008054
    Flags    None
    Outputs    2

Hey, guess what?!?  Ran pdn v4.0.16 in safe mode . . . and . . . Brilliant! It worked!
But after booting my pc normally, this negative inpact user feature again presented itself

which leads me to believe this is a Windows problem doing bad things to pdn.

Now comes the hard part. Please let me know what I need to do next in troubleshooting this.   

Your knowledge, experience and expertise are most appreciated. 

Link to comment
Share on other sites

1 hour ago, IronSkye said:

No UI pops up for Shape3D in v4.0.19 -


Have you got a second monitor? The UI usually shows up there.

Link to comment
Share on other sites

Ego Eram Reputo - You are my Hero!


I do not have two monitors, but the one that I do have has two available modes, analog and digital.  I checked my video settings and sure enough there it was.  Not sure how, but my pc settings were of that for dual monitors on an extended desktop.  Once corrected - problem solved. 


Thank you so much!

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...
11 minutes ago, PerfectSymmetry said:

I can't seem to find the template. Can you give me A direct template for the box you done in the images?



(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

  • 1 year later...

@welshblue discovered a bug in the way Shape3D computes alpha when antialiasing completely opaque areas. Though all the subpixels have A=255, the resulting alpha is 254.


The AA is done in three places: one for each primitive type. The code in each section is identical except for the calls to low-level primitive-rendering routines. Here is the cylinder code, with the variables renamed for clarity:



		private void CSa(Surface src, float X, float Y, ref uint c)
			if (!this.aa_on || this.aa == 0)
				this.CMp(src, X, Y, ref c);
			int aaRepsPerSide = this.aa + 1;
			float aaRepsPerSideRecip = 1f / (float)aaRepsPerSide;
			float aaRepsTotal = (float)(aaRepsPerSide * aaRepsPerSide);
			float scaledAlphaSum = 0f;
			float sumR = 0f;
			float sumG = 0f;
			float sumB = 0f;
			float ssY = Y - 0.5f + 0.5f * aaRepsPerSideRecip;
			float ssStartX = X - 0.5f + 0.5f * aaRepsPerSideRecip;
			int i = 0;
			while (i < aaRepsPerSide)
				float ssX = ssStartX;
				int j = 0;
				while (j < aaRepsPerSide)
					uint argb = 0u;
					this.CMp(src, ssX, ssY, ref argb);
					if (argb != 0u)
						float scaledAlpha = (argb >> 24 & 255u) / aaRepsTotal;
						scaledAlphaSum += scaledAlpha;
						sumR += (argb >> 16 & 255u) * scaledAlpha;
						sumG += (argb >> 8 & 255u) * scaledAlpha;
						sumB += (argb & 255u) * scaledAlpha;
					ssX += aaRepsPerSideRecip;
				ssY += aaRepsPerSideRecip;
			uint uintScaledAlphaSum = (uint)scaledAlphaSum;
			if (uintScaledAlphaSum != 0u)
				uint r = (uint)(sumR / scaledAlphaSum);
				uint g = (uint)(sumG / scaledAlphaSum);
				uint b = (uint)(sumB / scaledAlphaSum);
				c = ((uintScaledAlphaSum & 255u) << 24 | (r & 255u) << 16 | (g & 255u) << 8 | (b & 255u));
			c = 0u;






I'm pretty sure @Ego Eram Reputo and I could modify the AA code to work correctly, assuming EER is willing.

  • Upvote 1
Link to comment
Share on other sites

I'm up for it. I'll have a look this weekend. Thanks for the code!

Link to comment
Share on other sites

Before this weekend, I'll post some suggested replacement code. I'd like to add a routine, called from the setup code, to precompute some values, so they don't need to recomputed per-pixel. The basic change is to save the division of alpha to the end. The way it's currently done is really imprecise.

Link to comment
Share on other sites

Let me set up a repo on Github for it (if I haven't already). It makes sense to use this technology if we have it available :)


PM me your github handle and I'll add you to the repo.

Link to comment
Share on other sites

Here is a version of Shape3D which will, I hope, fix the opacity problem without introducing any other problems. (The opacity problem is that completely opaque pixels are rendered with an an alpha of 254 when Shape3D's antialiasing is enabled.)


New Shape3D DLL (8/28/2019): Shape3D.zip

  • Like 2
  • Upvote 4
Link to comment
Share on other sites

Great Job MJW :star:


Please can we have some testers for this fix. If we encounter no problems I'll promote this version to "official" status and put it in the first thread.

Link to comment
Share on other sites

New build (v1.2.6.3) has been released!


This fixes the opacity issue outlined above. Many thanks to MJW for the fix.


Go get it!

Link to comment
Share on other sites

Thank you @MJW for your work on the Shape3D 🥰


I am, however, still experiencing trouble with this plugin since after v4.1.  I don't know if this will mean anything to anyone, but the symptoms are:


Upon opening Shape 3D the first time in Paint.net - it crashes and leaves no crash log.

After the first crash it works fine until I close Paint.net again ☹️


How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

Link to comment
Share on other sites

  • 1 year later...
  • 3 weeks later...

Under the Cylinder tab, find All Face section & uncheck Body and Bottom leaving just the Top face. In Texture map section, choose either of the bottom two options.



Link to comment
Share on other sites

  • 11 months later...
  • toe_head2001 changed the title to Shape3D (2007-08-24) [Bug Fixed September 2023]

Join the conversation

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

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...