Activate Posted December 8, 2016 Share Posted December 8, 2016 (edited) I am struggling with getting material variations with packed primitives when using a Copy SOP. The example is a forest, e.g. a fairly complex tree with 100ks of leaves. With the Instance object, it was possible to assign a shop_materialpath and material_override to points, e.g. to change BaseColor. With packed primitives and the Copy SOP, adding a material_override causes mantra to completely ignore the assigned material. A way to get around this is to assign a material_stylesheet. Unfortunately, material_stylesheet causes mantra to unpack all the packed primitives which quickly exhausts all available memory. Here is an example file: https://drive.google.com/file/d/0B3SRWSd2MwvPQndFcWhOTUlrcVE/view?usp=sharing (25M) Any ideas would be appreciated. Edited December 8, 2016 by Activate Quote Link to comment Share on other sites More sharing options...
Atom Posted December 8, 2016 Share Posted December 8, 2016 There seems to be an example file in the help that demonstrates stylesheet overrides on packed primitives. ap_packed_primitive_stylesheet_overrides.hipnc Quote Link to comment Share on other sites More sharing options...
Activate Posted December 8, 2016 Author Share Posted December 8, 2016 It works but it causes unpacking of primitives in mantra, so that the geometry is no longer shared. It significantly increases render times and memory. That's a problem with material stylesheets. I believe they work effectively only for light-weight geometry, e.g. crowds. Quote Link to comment Share on other sites More sharing options...
Activate Posted December 9, 2016 Author Share Posted December 9, 2016 So, far the only solution I have been able to get to work is to assign different materials (based on some thresholds on the parameters) rather than doing full parameterized materials, e.g. make leaves look more wilted if they have less vigor, etc. Quote Link to comment Share on other sites More sharing options...
davpe Posted December 9, 2016 Share Posted December 9, 2016 for access to packed prims in shader you can also use renderstate VOP. Quote Link to comment Share on other sites More sharing options...
Activate Posted December 9, 2016 Author Share Posted December 9, 2016 Thank you. renderstate(packed:attribute) on point attributes works great. 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.