Jump to content

Heightfield mask into comp?


DanFor

Recommended Posts

Hi,

I am trying to pull height field masks from a terrain geo into a composition (to build a diffuse map as a terrain base texture), basically following the workflow in the youtube video below.

However, one thing has me stumped. Getting masks from the height field into a comp is straightforward (sop import node). However, when I set the sop import comp node to generate the custom planes (to get the mask and other geo data), the images generated are red/grey instead of grey scale. In the youtube video he does not seem to have that problem (although he skims through those parts extremely quickly, around 27 minutes in).

Am I missing some additional step to get height field mask data to work as a simple greyscale mask in a composition...?

Many thanks in advance for any pointers!

 

Edited by DanFor
  • Like 1
Link to comment
Share on other sites

I should perhaps clarify. :)

The image in the sopimport 2 thumbnail is what I want and expect. However, when applied as a mask to the over node, the result is not as expected.

5a284053699a7_ScreenShot2017-12-06at20_08_26.png.c86af51f97fdee4bcb4f0cf5a42148b7.png

And this is why. When looking ahh the sopimport2 mask channel, it actually looks like this:

5a2840994d7b3_ScreenShot2017-12-06at20_08_33.png.8a63dc48df3118ad66da3aedd56c6f59.png

...and I cannot seem to find any option to make sure it is interpreted as a suitable mask greyscale.... :-/

Again, many thanks for any advice!

Link to comment
Share on other sites

Thanks!

I still get the red mask image interpretation though. It is as if the imported planes are coloured. However, the thumbnails are greyscale...?

And in the composite node, I can see that the mask applied is indeed the coloured one I see in the image viewer, as areas that are supposed to be masked (with the correct mask interpretation) are bleeding through.

Any ideas?

As much as I love Houdini for its powerful procedural approach, I must say I really dislike the lack of documentation and myriad of quirks all over the place... :)

Link to comment
Share on other sites

This is a test with a roto shape, the mask should work. If you want to upload a test.hip I can have a look. 
Also, you can try the channel copy and set the target to none and set 0 to black or 1 to white depending on your source.
This is the image that I use in the comp btw.

TestComp.hipnc

Capturesss.PNG

Edited by Sepu
Link to comment
Share on other sites

Thanks!

I dug around a bit, and my problem turned out to be my confusion regarding how Houdini handles two things:

- The comp / over nodes and default alpha behaviour

- Houdini's apparent inconsistency when displaying mask images. I will explain: When looking at the my mask (the image from the sop import) the comp view displays it as black->red. However, the thumbnails in the tree view are in greyscale. This threw me for a loop and I thought I had missed some colourspace conversion step.

In the end it turned out I basically had things right, but to get the proper values I had to use a channel copy to properly bind the reds in the imported mask into mask values.

So, sorry for the ignorance and many thanks for the help. I hope this might be of help to someone else in the future. :)

Edited by DanFor
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...