Sign in to follow this  
MJW

Texture Object Rounder

Recommended Posts

MJW    690

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:

Texture_Object_Rounder_UI.png

 

An example:

Original object:

Texture_Object_Rounder_Test1.png

The height map:

Texture_Object_Rounder_Test1_Height_Map.

 

The shaded height map:

 

Texture_Object_Rounder_Test1_Shaded.png

 

-----------------------------------------------------------------------------------------

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.

  • Like 2
  • Upvote 5

Share this post


Link to post
Share on other sites
MJW    690

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

Share this post


Link to post
Share on other sites
Ishi    181

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.

Share this post


Link to post
Share on other sites
lynxster4    1,029

Great plugin @MJW!    :star:     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.

 

textureobjectrounder_01.png

 

I tried next on a recommended shape and the result is fantastic!  I smoothed the height map and applied an image with Texture Shader.

 

textureobjectrounder_02.png

 

 

There is so much potential here, I am speechless.....

 

Thank you!    <3

  • Like 2

Share this post


Link to post
Share on other sites
MJW    690
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.

Share this post


Link to post
Share on other sites
IRON67    241

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.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this