Jump to content

Export noise as greyscale image from point VOP


Recommended Posts

With Python you could try something like this:

import numpy as np
from PIL import Image

path = hou.evalParm('image_path')
node = hou.pwd()
geo = node.geometry()

lum = np.array(geo.pointFloatAttribValues('luminance'))
lum = lum * 255
lum = lum.astype(np.uint8)
 
img = Image.fromarray(lum, mode='L')
img.save(path)

This way, it currently throws an 'tuple index out of range'-error with 1-dimensional arrays for greyscale images, though.

export_grey_image.hipnc

Link to comment
Share on other sites

@karen its white because you are viewing the wrong pass. IF you look at my photo you have to view the right image plane. Open it in mplay and select diffcolor.

you might need to save it as something other then jpeg for multiple channels. Just try by hitting render to mplay and to test it.

diff.jpg

Edited by ejr32123
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...