Popular Post MJW Posted September 13, 2017 Popular Post Share Posted September 13, 2017 (edited) Texture Object Rounder converts objects to rounded height maps. It's in the Height Map subfolder. For the most common case of an object that's symmetric about the vertical axis, it produces a height map for the object of rotation. For example, it will convert a filled circle to a spherical height map, a filled isosceles triangle to a conical height map, and a filled rectangle to a cylindrical height map. The plugin (Version. 1.0.6464.41586): Texture Object Rounder.zip The Help Menu description: Quote Texture Object Rounder converts objects to height maps by making the horizontal cross-sections circular. For the effect to work correctly, horizontal lines through each object should not pass through indentations or holes, such as those in a heart shape or a torus. The controls are: Height Map Scale: Scales the height map. When set to 1.0, the height map will appear circular when the Texture Height Scale is 255. For wide objects this may result in the height map's heights overflowing. To remedy this problem, decrease this control's value, and correspondingly increase Texture Height Scale. Produce 24-Bit Height Map: When enabled, the height map will have 24-bits of precision. When disabled, the height map will be an 8-bit grayscale image. Show Shading (Disable before exiting): Specifies the height map should be shown as shaded. To preserve the height map for later use, this option must be disabled before exiting. All the controls that follow are used only to control shading, and have no effect on the rounded height map produced. Texture Height Scale (Only affects shading): Increases or decreases the texture height used for shading Ambient Light Intensity: Increases or decreases the intensity of the Ambient Light. Ambient light affects every pixel identically, independent of the gradient. Directional Light Direction: Sets the direction of the Directional Light. The Directional Light's effect on a pixel is determined by light's direction and the texture's gradient at the pixel. (The control's outer ring currently has no function.) Directional Light Intensity: Increases or decreases the intensity of the Directional Light. The directional light contributes both diffuse and specular (reflected) light. Specularity: Determines the shininess of the surface. Increasing this value decreases the diffuse lighting and increases the specular lighting. Specular Concentration (Exponent): Determines the sharpness of the specular highlights. Higher values produce sharper highlights. The UI: An example: Original object: The height map: The shaded height map: ----------------------------------------------------------------------------------------- The initial version is imperfect. The height maps produced are sometimes quite ridgy when shaded. The ridges result from errors in computing the outer silhouette of the object. To produce a smooth height map, the object's edge must be determined with subpixel accuracy. This is accomplished by using the alpha values of the edge pixels. My current algorithm isn't as accurate as I would like. I have some ideas to improve it, but they're somewhat complex. I decided to release the current version, as is. I hope to provide a better version in not too long. The Texture Smoother may help smooth the ridges. The objects to be rounded are normally produced using the Shape and Line/Curve tools. For example, you can draw a shape with the Line/Curve tool, duplicate the layer, horizontally reflect the layer, merge the layers, then fill with the Paint Bucket. Fill with care so that all the interior pixels are filled. A well-antialised edge is necessary for a smooth texture. Edited August 23, 2018 by Pixey Fixed postimg links 3 7 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted September 13, 2017 Share Posted September 13, 2017 cryptic.... Haha! A brand new plugin. Looks terrific! Thank you MJW! 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...
MJW Posted September 13, 2017 Author Share Posted September 13, 2017 The example should make it clearer. As additional explanation, I added: "For the most common case of an object that's symmetric about the vertical axis, it produces a height map for the object of rotation. For example, it will convert a filled circle to a spherical height map, and a filled rectangle to a cylindrical height map." Quote Link to comment Share on other sites More sharing options...
Seerose Posted September 13, 2017 Share Posted September 13, 2017 @MJW! Thank you very much for new plugin. Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
Ishi Posted September 13, 2017 Share Posted September 13, 2017 This is amazing. I think you can do a 3D-ish chess piece on this and many more! If you could combine shapes that it supports. Quote Link to comment Share on other sites More sharing options...
lynxster4 Posted September 13, 2017 Share Posted September 13, 2017 Great plugin @MJW! Of course, I had to try it on a shape that wasn't recommended. I see what you mean. Even though the butterfly is symmetrical, it doesn't handle it well around the body. I tried next on a recommended shape and the result is fantastic! I smoothed the height map and applied an image with Texture Shader. There is so much potential here, I am speechless..... Thank you! 2 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...
MJW Posted September 13, 2017 Author Share Posted September 13, 2017 3 hours ago, Ishi said: This is amazing. I think you can do a 3D-ish chess piece on this and many more! If you could combine shapes that it supports. Thank you! The Texture Merger should help in combining shapes. The usual method is to use the Maximum merge mode. Make sure to set the Merged Height Alpha Source to Composite Alpha, so both height maps are visible. Quote Link to comment Share on other sites More sharing options...
IRON67 Posted September 15, 2017 Share Posted September 15, 2017 Really nice and useful, if you only need a tiny but high-quality single object and you don't want to install and handle a complex 3D-application like Blender. 1 Quote Link to comment Share on other sites More sharing options...
Seerose Posted August 23, 2018 Share Posted August 23, 2018 @welshblue! Thank you for sharing. 1 Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
MJW Posted August 20, 2019 Author Share Posted August 20, 2019 1 hour ago, welshblue said: Just curious if there's a reason in the T O R end or in S3D as it's no big deal running AA Assistant That's weird. It doesn't do that for me. My best guess is that the background is almost but not entirely transparent after the shape is drawn (like the alpha is 1), and that AA's Assistant clears it. if you have Red ochre's Alpha Threshold, try using that instead of AA's Assistant, and see if that fixes the problem. If it does, the question is still, why isn't the background fully transparent? If it doesn't fix it, I'll have to look into it some more. EDIT: More likely, the shape isn't entirely opaque. Perhaps for some reason the original image on which Shape3D is run is nearly, but not completely, opaque. EDIT 2: Perhaps Shape3D's Transparency control is checked. I tried to tell in the video, but couldn't. 1 Quote Link to comment Share on other sites More sharing options...
MJW Posted August 20, 2019 Author Share Posted August 20, 2019 One thing that might be worth trying is to get one of the times Object Rounder doesn't work, then use the Color Picker to check the opacity of the background, and the center of the object, to see if the background pixels are entirely transparent, and the object contains completely opaque pixels. Quote Link to comment Share on other sites More sharing options...
MJW Posted August 20, 2019 Author Share Posted August 20, 2019 I finally got it to fail, and now I think I know why. When it didn't work, the alpha of the most opaque object pixels produced by Shape3D was 254. It happened after I increased Shape3D's AA to the maximum of 5. I don't know, though, that that was the cause or just a coincidence. EDIT: I seems to be related to Shape3D's antialiasing. If I turn it off, or set the level to 1, the alphas are 255. If I set it to 2 or greater, the alphas are 254. I should add that the Object Rounder always looks for completely opaque pixels to help determine the starting edge of the object on each row of pixels. This has to do with its (not especially successful) attempt to determine the start and end of the edge to better-than-pixel precision. Quote Link to comment Share on other sites More sharing options...
MJW Posted August 21, 2019 Author Share Posted August 21, 2019 @Ego Eram Reputo was able to restore the xml feature. Perhaps he could fix the AA bug. I think I can take a pretty good guess about the basic cause. Shape3D uses the usual supersampling AA method, which requires summing the alphas, then dividing by the number of per-pixel samples. I expect that the division (which may be integer division) truncates or rounds down incorrectly. One integer-division method that works properly is to double the alpha sum (by left shifting), add the number of per-pixel samples, then divide by twice the number of per-pixel samples. That amounts to adding 0.5, to round in the usual fashion. // Compute the (rounded) averages. int twiceA = a << 1; b = ((b << 1) + a) / twiceA; g = ((g << 1) + a) / twiceA; r = ((r << 1) + a) / twiceA; a = (twiceA + ssSamples) / ssTwiceSamples; return ColorBgra.FromBgra((byte)b, (byte)g, (byte)r, (byte)a); If Shape3D uses floating-point, the fix is probably just to add 0.5 before converting back to integers. (I added the technical details for Ego Eram Reputo, though he most likely already knows them as well as I do.) 1 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted August 22, 2019 Share Posted August 22, 2019 15 hours ago, MJW said: I added the technical details for Ego Eram Reputo, though he most likely already knows them as well as I do) I'm more of an elderly script-kiddie, so I like it when you do half my job for me 15 hours ago, welshblue said: Lines and lines of text and numbers to make something you can physically use ? Witchcraft Some of my code requires actual living sacrifice - so witchcraft is not far off the mark (In an RPG I'm developing, I'm allowing the cost of magic (Mana) to be deducted from Hit Points or added as a number of months to the characters age. Coding seems similar in many respects) 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...
Ketenks Posted May 8, 2020 Share Posted May 8, 2020 I just got this plugin and I'm trying to make this shape have a metal gleam to it, even gold. And for some reason the top and bottom of the object is cut off from the rounding effect. Is there anyone who knows why it does this? Whether it can be avoided? Or fixed? Quote Link to comment Share on other sites More sharing options...
Ketenks Posted May 8, 2020 Share Posted May 8, 2020 (edited) After messing with it, it appears to be a result of how it is coded up. The top part is being recognized as the top of a sphere and the bottom the bottom of a cone. And it wants to draw that in, but then the image changes from that and it starts drawing reflections for the rest of it as it should be. I'm not sure if this can be fixed except by the one who wrote the plugin. Edit: yeah even having it recognize half it still wants to see that part as a circle and cone for some reason. Edited May 8, 2020 by Ketenks Quote Link to comment Share on other sites More sharing options...
Ketenks Posted May 8, 2020 Share Posted May 8, 2020 Excellent! Thank you for the stuff. I'll check it out. Quote 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.