Instance Noodle Displacement both direction of axis

Hallo I am trying to displace vertices in both directions of a given axis using a control texture. Using RGB mode I would expect for every vertex a point in the texture to be sampled, obtained its rgb values and these values be used as X Y Z values.
It seems like only the red is used as also was noticed in:

Either a bug or I am not fully understanding what RGB mode is.
tx
S.
DisplacementMapping.v4p (21.2 KB)

This work for you?
https://www.dropbox.com/s/0u9zyezlkojuf1o/DisplacmentMapNoTess.gsfx?dl=1

Yes this indeed works, I have also noticed a couple of error in the same fx coming stock with Instance Noodle, so that must have been the problem.

Now that I got RGB displacement working, although that is not what I needed (axis displace is just fine), at least I ve found out what is my is my issue: understanding how to work with negative valued colours.

Say I have a texture with different shades of grey, where 50% grey represents no displacement, black represents displacement in one direction of the selected axis and white the other direction.
So, all I need is to do is to remap black/white to “negative white/white”, any hint while Windows is updating ?
tx

Just subtract 0.5 from your colour map before sampling it, grey becomes 0, black -.5, white .5. That help?

@io there was indeed a bug where by RGB was only sampling red. If that works for you now I’ll add it to the github and eventually the contrib.

For doing basic math on textures I quite like ‘ScalarOperation’ from @microdee’s mp.dx pack

Yes it does work for me the previously attached .gsfx

And also got proper texture remapping, thanks
S.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.