LEADTOOLS Support
Imaging
Imaging SDK Examples
HOW-TO: Create 3D Textures with LEADTOOLS
#1
Posted
:
Wednesday, November 1, 2017 12:41:49 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 163
Was thanked: 9 time(s) in 9 post(s)
The LEADTOOLS BumpMapCommand can be used to integrate an existing bump map with its corresponding texture map. Other parameters can be set as well, such as the brightness and direction of the light source. For more information on parameters, see the documentation page.
https://www.leadtools.com/help/leadtools/v19/dh/ps/bumpmapcommand.htmlHere's an example that shows the BumpMapCommand in action:
Code:
using (RasterCodecs codecs = new RasterCodecs())
{
RasterImage image = codecs.Load(@"brick.jpg");
RasterImage bumpmap = codecs.Load(@"brick-bmp.jpg");
BumpMapCommand bmc = new BumpMapCommand();
bmc.Azimuth = 5;
bmc.Brightness = 20;
bmc.BumpImage = bumpmap;
bmc.BumpPoint = new LeadPoint(0, 0);
bmc.Depth = 3;
bmc.DestinationPoint = new LeadPoint(0, 0);
bmc.Elevation = 20;
bmc.Intensity = 0;
bmc.LookupTable = null;
bmc.Tile = true;
bmc.Run(image);
codecs.Save(image, @"brick-bumpmapped.jpg", image.OriginalFormat, 0);
}
I've attached the input and output images generated. The output can be modified by adjusting the parameters.
Edited by moderator Wednesday, November 1, 2017 8:10:57 PM(UTC)
| Reason: Not specified
Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
Imaging
Imaging SDK Examples
HOW-TO: Create 3D Textures with LEADTOOLS
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.