Community
Maya Shading, Lighting and Rendering
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya materials topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Heightmap for floor too high?

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
nguyen824
1028 Views, 8 Replies

Heightmap for floor too high?

I got this from: https://www.textures.com/search?q=Brick%20Floor 

Named "Flat Cobblestone"

nguyen824_0-1630546350982.png

How to stick it back down to floor?

8 REPLIES 8
Message 2 of 9
mspeer
in reply to: nguyen824

Hi!

Based on the preview image the displacement image has colors in a range from about 0.4 to 0.6, so you will get this offset for your displacement too.

You can edit the image in an image application and bring the lowest color values down to 0 or modify the values in the file node:

Color Balance -> Alpha Gain

Color Balance -> Alpha Offset

Message 3 of 9
nguyen824
in reply to: mspeer

Thanks mate, I got it right now. Stuck it back onto the floor geometry. 

Adjusting the file node in Maya "Colour Balance -> Alpha Gain/Offset" did stick it down but also made the bricks flat so that did not completely work.
Had to adjust levels in Photoshop. I'm noob, had to trail and error a few times by 'adjusting levels, saving a new PNG file then loading it into the file node' a few times. :p.
When you said "colour range 0.4 - 0.6" did you mean like 40%-60% from blacks to whites?

 

Credits: Screenshots taken with ShareX.

maya_E0ZDgb5GU6.pngmaya_rV6bEfkJGC.pngBefore adjusting levels.Before adjusting levels.After adjusting levels pushing in the blacks more. In photoshop.After adjusting levels pushing in the blacks more. In photoshop.

Message 4 of 9
mspeer
in reply to: nguyen824

Hi!

"Adjusting the file node in Maya "Colour Balance -> Alpha Gain/Offset" did stick it down but also made the bricks flat so that did not completely work."

- Only Alpha Gain makes it flat, so increase gain again.

 

When editing the image you can also increase overall contrast, so the higher values will become white.

 

Please also make sure to use "RAW" for color space as you want to use the raw color values for displacement.

 

 

Message 5 of 9
nguyen824
in reply to: mspeer

"Only Alpha Gain makes it flat, so increase gain again."

I don't understand? what gain? Alpha gain or Colour gain? Tried both, it just makes it fly up or flatten down without editing in Photoshop.

I've attached my map files (from textures.com) if you want to try on a single plane polygon with no subdivisions with aiStandardSurface node.

 

"When editing the image you can also increase overall contrast, so the higher values will become white."

It just seems to darken everything slightly, even before and after adjusting levels? Try it?

 

Please also make sure to use "RAW" for color space as you want to use the raw color values for displacement. 

Ah ok, thanks. I thought you mean Raw file format then I discovered this https://substance3d.adobe.com/documentation/integrations/substance-textures-in-maya-196215825.html

You meant an option in the node in Maya. All it did was increase intensity/sensitivity of the Alpha Gain option slider.

Message 6 of 9
mspeer
in reply to: nguyen824

Hi!

 

Gain is a multiplier and Offset an offset.

I recommend to do some tests with different values or do some research about how this works. You only need these 2 attributes to perfectly tune your displacement.

 

"It just seems to darken everything slightly"

- You can manually define the black point and the white point with your Levels slider in Photoshop, everything else doesn't matter. Then in Maya you can control the amount of displacement by using "Apha Gain" in the file node or "Scale" in the displacement node.

Message 7 of 9
nguyen824
in reply to: mspeer

"You only need these 2 attributes"

I've already tried, it didn't work for these, only make it fly up or flatten. Only adjusting levels in Photoshop worked. Try it.

 

Thanks for helping.

Message 8 of 9
mspeer
in reply to: nguyen824

Hi!

Then you maybe missed one important thing,

Alpha Offset can also have negative values.

 

displ_offset.gif

 

 

Message 9 of 9
nguyen824
in reply to: mspeer

Ah, good spot, thanks!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report