Skip to main content
Participant
November 26, 2021
Answered

Scale only part of texture

  • November 26, 2021
  • 1 reply
  • 343 views

Is it possible to scale only part of a texture to avoid stretching in some parts?

Texture graph:

Texture on mesh (In model graph):

Base shape for texture:

As you can see on the mesh the round parts of the shape is stretched. This couses the round parts to shape into a point and loses it's curve. I already made the point less by making the ship widder (see nr 3) with a transfor node. But it does not remove the whole stretch problem.

 

So my question was if it would be possible to only scale the middle part of the shape (see nr 2)? But still keep the round parts (see nr 1) on top of the middle shape.

This topic has been closed for replies.
Correct answer Luca Giarrizzo

Hello @Cattring,

 

This is fairly simple to do using a function in a Pixel Processor node. The function could do the following:

 

  • Move the shape up in the top half of the image, and down in the bottom half of the image. This effectively creates two copies of the shape
  • Then, fill the space between the two halves with the pixels at the midsection of the shape, resulting in a stretching effect

 

I have attached a Substance 3D file (SBS) which includes a simple implementation of this idea. Feel free to use it in your projects, and I hope this can help you learn a thing or two about function graphs and the Pixel Processor node!

 

In your specific use case, the extremities of the shape should remain clean half-circles. regardless of the stretching length or the circle radius.

 

I hope this is useful!

 

Best regards.

 

1 reply

Luca Giarrizzo
Community Manager
Luca GiarrizzoCommunity ManagerCorrect answer
Community Manager
November 29, 2021

Hello @Cattring,

 

This is fairly simple to do using a function in a Pixel Processor node. The function could do the following:

 

  • Move the shape up in the top half of the image, and down in the bottom half of the image. This effectively creates two copies of the shape
  • Then, fill the space between the two halves with the pixels at the midsection of the shape, resulting in a stretching effect

 

I have attached a Substance 3D file (SBS) which includes a simple implementation of this idea. Feel free to use it in your projects, and I hope this can help you learn a thing or two about function graphs and the Pixel Processor node!

 

In your specific use case, the extremities of the shape should remain clean half-circles. regardless of the stretching length or the circle radius.

 

I hope this is useful!

 

Best regards.

 

Luca Giarrizzo | Quality Engineer, 3D & Immersive | Adobe