Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displacement Map filter documentation #253

Closed
2 tasks done
2rs2ts opened this issue Jun 19, 2020 · 2 comments
Closed
2 tasks done

Displacement Map filter documentation #253

2rs2ts opened this issue Jun 19, 2020 · 2 comments

Comments

@2rs2ts
Copy link

2rs2ts commented Jun 19, 2020

Description

I would like for some documentation on the Displacement Map filter.

As someone who does not have a background in computer graphics I don't really know how to construct a map to do the things I want, and when you google "displacement map" you get the wikipedia page and then mostly tutorials for Photoshop and Blender. I would not expect someone to write up full tutorials for this filter but ideally the documentation should include:

  • A basic explanation of its parameters (this is a must)
  • An explanation for how the map image is interpreted
  • Some example maps and what their result is at various ratios

Since I don't have the background to be able to communicate what I'd like to see in the docs in more detail I will just explain something that's puzzling me, and say that if the docs were to cause me to stop being puzzled by it, then that would probably be good for a lot of other users too.

The plugin ships with two masks:

  • neutral.png: neutral
  • disp-stretch-middle.png: disp-stretch-middle

Questions I have about these are:

  • Why is neutral.png just a dark yellow square? Is that color a "no-op"?
  • Why is disp-stretch-middle.png a bunch of shades of red and green and not other colors?
  • What effect does the color of a pixel have, e.g. what does a red pixel do compared to a green pixel?
  • How does the mask map onto an image that does not share its aspect ratio? Is it simply stretched? What color are the pixels created as a result given?

It would be great if these questions could get answered in the documentation, though I realize that this may be something that I should be expected to just read a book to understand instead, so in the event that I am asking too much, documentation that at least links to sources that would answer my questions would be good. The wikipedia article is not helping :)

One more thing: the wiki links to a documentation page for the filter that is, of course, missing.
image
So just to make sure I don't leave it unsaid, once the documentation is written, this link should also be fixed.

Checklist

  • I am willing to pay someone to implement this feature.
    (If the documentation was really excellent I would gladly send a tip to let the author get some fancy coffee)
  • This feature absolutely can't be done with already existing features.
@Xaymar
Copy link
Owner

Xaymar commented Jun 20, 2020

Displacement filter takes normal maps as an input (just like written in the description) and uses them to move the sampling point for each pixel. You can find plenty of resources online that explain normal maps, and even resources on how to create them: 1, 2, 3, 4.

The meaning of the normal map is mostly still the same, but in the filter the X/Y/Z (R/G/B) channels are used as offsets. 0 (0) is -1, 0.5 (127, 128) is 0, 1.0 (255) is +1. The settings in the filter control how strong the offset is, which is described by the hover text.

Note that this filter will be removed once shaders have the ability to use textures as parameters.

Edit: Also try hovering over the properties in the filter. They have documentation.

@Xaymar
Copy link
Owner

Xaymar commented Nov 2, 2020

Closing this, since the filter will be marked as deprecrated in the next version.

@Xaymar Xaymar closed this as completed Nov 2, 2020
Repository owner locked as resolved and limited conversation to collaborators Apr 26, 2021
@Xaymar Xaymar added this to the Displacement Mapping milestone Dec 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants