Jaanus Posted March 17, 2019 Share Posted March 17, 2019 (edited) Hi, I have quite a specific question. What would be a good and straightforward way to make a grid's divisions and aspect ratio depend on an image I am to use in an Attribute from Map SOP to color it? My aim at the moment is a HDA that let's the user choose an image from the hard drive, adds it's colors to the grid and calculates the divisions of that grid and the aspect ratio of that grid based on the image. Currently it seems to me I have to jump through using either Python, COPs context or VEX shader context, although it seems like something that perhaps is somehow still doable in only SOPs and VEX/VOPs. I don't have nothing against doing it in COPs, shader VOPs or Python, I just haven't thought of a straightforward way to get information from one of these areas to SOPs. Under shader VOPs there is a Resolution node that should give these numbers perhaps in the most straightforward way, and there are the COP specific VEX functions ixres and iyres and inputs in the COP VOP node, but at the moment the way VEX and VOPs work in COPs seems different enough from SOPs that I haven't found out a good way to get these numbers into SOPs. Same problem with using Python node in SOPs. Any ideas on how best to tackle this? Edited March 17, 2019 by Jaanus syntax errors, missing words Quote Link to comment Share on other sites More sharing options...
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.