karen Posted July 1, 2020 Share Posted July 1, 2020 Can I export noise as greyscale image from point VOP? Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted July 1, 2020 Share Posted July 1, 2020 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 Quote Link to comment Share on other sites More sharing options...
evanrudefx Posted July 2, 2020 Share Posted July 2, 2020 I did something like this before. You can also do this using texture baking. save_pnoise.hiplc Quote Link to comment Share on other sites More sharing options...
karen Posted July 4, 2020 Author Share Posted July 4, 2020 On 02/07/2020 at 6:39 AM, ejr32123 said: I did something like this before. You can also do this using texture baking. save_pnoise.hiplc When I press save to disk on the bake textures in your file, I get a blank jpeg, all white. Quote Link to comment Share on other sites More sharing options...
evanrudefx Posted July 4, 2020 Share Posted July 4, 2020 (edited) @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. Edited July 4, 2020 by ejr32123 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.