sebkaine Posted September 24, 2014 Share Posted September 24, 2014 (edited) Hi guys, imagine that i have a car object in SOP. I would like to assign to this object 3 different shaders on it with a condition to select the good one. if render engine = maxwell use mat_car_mxm SHOP if render engine = mantra use mat_car_mantra SHOP if render engine = OpenGL viewport use mat_car_glsl SHOP Is it possible to do so ? How would you proceed ? Cause i am tired of making shader reasignment all the day ... Many Thanks for your feedback ! Cheers E Edited September 24, 2014 by sebkaine Quote Link to comment Share on other sites More sharing options...
sebkaine Posted September 24, 2014 Author Share Posted September 24, 2014 not very elegant but it works. if someone know how to make it works with an ordered menu it would be cool multiassign.hipnc Quote Link to comment Share on other sites More sharing options...
sebkaine Posted September 24, 2014 Author Share Posted September 24, 2014 solved multiassign_02.hipnc Quote Link to comment Share on other sites More sharing options...
eetu Posted September 24, 2014 Share Posted September 24, 2014 Ah, I thought you wanted it to be automatic For the different renderers you could have different ROPs, and the Pre-Render Scripts could go and flip that main switch before render, and the Post-Render Script could flip it back to the OpenGL state.. Quote Link to comment Share on other sites More sharing options...
sebkaine Posted September 24, 2014 Author Share Posted September 24, 2014 (edited) Ah, I thought you wanted it to be automatic For the different renderers you could have different ROPs, and the Pre-Render Scripts could go and flip that main switch before render, and the Post-Render Script could flip it back to the OpenGL state.. I first though that it would be complex ... but it's really weird how houdini offer simple answer to what would have been PITA in maya while sometimes it require complex answer to very simple problem. If you have a 100% auto way to solve this it would be fantastic ! You tricks with pre-render scripts is very clever thanks for this cause i wouldn't have think about this, would you do this in Python ? I really find the hscript synthax quite ugly , it remind me MEL .. Thanks again for your feedback eetu ! Edited September 24, 2014 by sebkaine Quote Link to comment Share on other sites More sharing options...
edward Posted September 25, 2014 Share Posted September 25, 2014 What about the Select SHOP? Quote Link to comment Share on other sites More sharing options...
sebkaine Posted September 25, 2014 Author Share Posted September 25, 2014 Thanks for your answer Edward, It looks very interesting as it seems to be exactly what SESI has build to do that. But i must confess that i don't get exactly how it work, the help is not perfectly sharp, and i can't find exemple scene either. How would you implement the select SHOP in my case ? Cheers E 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.