deadalvs Posted December 6, 2016 Share Posted December 6, 2016 Hi, I'm a bit deadlocked currently and did not find an answer via google, the docs, or the sidefx forum. Which typical generic shaders (principled shader, mantra surface, ..) can be used as a versatile shader that allows baking of extra image planes via the ‘baketexture’ ROP? I've seen that for this to work in VOP networks (e.g. created via the 'material shader builder' ), a ‘bind export’ node needs to be defined, to be able to render certain custom mattes. But as I'd like to use default shaders - is this even possible without setting up my own shader with VOPs? Also, is the baketexture ROP supposed to be used with specific shaders (because of attr names)? Any input welcome! Thanks! Quote Link to comment Share on other sites More sharing options...
davpe Posted December 6, 2016 Share Posted December 6, 2016 you can use any shader for baking. these prebuilt ones, like Mantra surface, are cumbersome to work with beyond the most basic stuff (too much nodes inside that makes it hard to see what is going on) but other than that it is the same stuff like any other shader in houdini. I strongly recommend though starting out from empty Surface shader builder VOP. Quote Link to comment Share on other sites More sharing options...
deadalvs Posted December 6, 2016 Author Share Posted December 6, 2016 ok, wow. that seems like a daunting task - I've never made my own shader .. Sure, once you have your own shader, you have full control. That does make sense... I mean I know which features I need, but I assume I'll struggle a lot. Thanks for the input. I'll dig a bit in this field. Please let me know if you can recommend some good tutorials or such. Quote Link to comment Share on other sites More sharing options...
davpe Posted December 6, 2016 Share Posted December 6, 2016 well i don't think it's a daunting task at all. actually, it is the most straightforward and easy thing, in my opinion. if you want to bake an attribute, for instance, then you only need one node inside (parameter VOP). what really is a daunting task is diving into mantra surface and trying to figure something in there what exactly do you find daunting about building the shader from scratch? maybe I can help you get started. 1 Quote Link to comment Share on other sites More sharing options...
deadalvs Posted December 7, 2016 Author Share Posted December 7, 2016 hey .. ! well .. you have the experience .. for an outsider / nocive, it seems daunting... I'll find out soon. hehe. thanks for offering help. Note: the attribution for the shader values will come from upstream and are set procedurally, basically overriding the shader defaults. what I need is a (PBR / as realistic as possible) 'base shader' that does the following: -------------------------------------------------------------------------------------------------------------- ( an analogy of a shader would be a simple material, like e.g. the Cinema4D standard material) shader features: -------------------- - color & texture (multiplied) - emission color, emission intensity (multiplied) - alpha (cut out, e.g. for leafs) - normalmap, with intensity float - opacity (transparency) & IOR float / refraction - reflectivity & reflectymap (multiplied) - roughness & roughnessmap (multiplied) - .. additional, I'll need to be able to texture bake color maps from the shader and additional primitive / point attributes ------------------- - diffuse - reflection (float 0-1) // I won't bake refraction mattes - emission (float 0-1) - tangent space normals - .. if you can get me started with a very simple example of a shader with diffuse color, emission and opacity / refraction. I'm pretty sure I'll understand an example and can extrapolate it for the other components. meanwhile, I do know how to actually bake out the arbitrary vector values as masks by binding the values within the shader. cheers & thanks! matt Quote Link to comment Share on other sites More sharing options...
deadalvs Posted December 9, 2016 Author Share Posted December 9, 2016 I checked some of the tutorials, but it also seems that lots of things change between versions.. which makes it more difficult to dive into this. I'm currently on 15.5.632 Hope to get an input. Quote Link to comment Share on other sites More sharing options...
davpe Posted December 9, 2016 Share Posted December 9, 2016 hi, sorry, I've been more than busy lately... check out the sample file. I've created a simple shader with a few usual outputs. i suppose you can figure how to add another ones. cheers, D. bake_to_tex_example.hiplc Quote Link to comment Share on other sites More sharing options...
davpe Posted December 9, 2016 Share Posted December 9, 2016 oh and one more thing... if you create your own shader from scratch and emission or sss will seem to do nothing, you have to unlock and dive inside the surfacemodel VOP and connect Ce output to Ce input at the very end of the shader tree. it's a bug in early 15.5's releases but should be fixed in the latest (works in my example file). Quote Link to comment Share on other sites More sharing options...
deadalvs Posted December 11, 2016 Author Share Posted December 11, 2016 hey David! ok, I've had a look .. this indeed looks not too complicated... first: huge 'thank you' for taking the time!! a few questions: ============ 1] when I try to add a node in the vopmaterial node, Houdini bails out of the shader and throws the error 'mantra: Multiple image planes for 'diff_clr' channel in image '. what could this be? 2] is there a technical difference between bringing attribute values into the shader via a 'parameter' node or using the 'bindExport' node? 3] I can't follow the logic behind the red null node with the 'render node' path and the sticky 'use link below to jump to texture bake ROP'. is this ONLY for baking? can you explain? 4] is the following statement correct? - basically you propose using a generic shader model ('surface shader mode') plus a generic node ('compute lighting') that does all the physical calculations on this shader... - additionally, you just drive the different shader channels, including the additional mattes (that need to be defined in the ROP and the bake texture ROP) if you ever need some CityEngine help (procedural cities), let me know! my (own) company: www.vrbn.io cheers! matt Quote Link to comment Share on other sites More sharing options...
davpe Posted December 11, 2016 Share Posted December 11, 2016 hi, 1) this means you've got multiple parameters called "diff_clr" in your shader and therefore it is conflicting. note that the node name (label) and the parameter name that the node exports are not the same thing (so you may have more nodes with a different label but the parameter name may be the same for all of them which leaves Mantra confused) 2) no. the only difference that i am aware of is that in bind export VOP, the export option is set to "Always" by default (that is important for Mantra to be able to access that particular parameter). 3) this node is just a null that contains a link to the ROP network. i did this merely for your convenience so you can quickly jump to the ROP network without figuring out where it is. it has no function in the shader. 4.1) not sure about your terminology here. what i am proposing is using mantra's default Surface model shader VOP - a general shading model for Mantra computing all the diffuse, specular etc. properties of the surface. it is the same node as the one sitting in the core of Mantra surface material, but striped down of all the user interface stuff (which makes it easier to work with). that is if you need to bake lighting. if you don't, you can happily skip this and render just different parameters which will make your render faster as well. 4.2) same here with the terminology. so to be clear: I define different parameters that can be picked up by Mantra and rendered as a custom image planes (mattes as you say). what you call shader channels are essentially another parameters inside of the Surface model shader that has been predefined for your convenience - you can dive inside and rewire things to change how it works if you need to. these parameters can contain anything you want, any part of your shader network, even when it is completely separate branch not connected to anything else. so you can output any number of separated procedural patterns, mattes and whatnot at once. hope that makes sense if i ever need some City engine help, I'll let you know, thanks cheers, D. Quote Link to comment Share on other sites More sharing options...
deadalvs Posted December 13, 2016 Author Share Posted December 13, 2016 Hi, thanks! I'll dig deeper into this. odforce was down yesterday (or I just could not access it those times I tried). I'll let you know asap! matt Quote Link to comment Share on other sites More sharing options...
deadalvs Posted December 23, 2016 Author Share Posted December 23, 2016 (edited) hey Davpe! I'm having a look now at your file. This helps immensely and makes sense how to approach it. Huge thanks so far! I'm trying to deal with tangent space normal maps, but I'm not sure how to push them correctly into the 'Surface model shader VOP' as there's some vector math nodes involved.. Is there an easy way for this? (the examples in the other shader examples are quite confusing..) matt Edited December 23, 2016 by deadalvs Quote Link to comment Share on other sites More sharing options...
deadalvs Posted December 23, 2016 Author Share Posted December 23, 2016 ps.. my start attached as screenshot. Quote Link to comment Share on other sites More sharing options...
davpe Posted December 23, 2016 Share Posted December 23, 2016 hi, not entirely sure how to use this properly, I'm hardcore displacement guy But my guess is you want to add normal map to surface normals, not to surface position. and you want to transform surface N instead of normal map (that has already coordinates specified in uv space). Quote Link to comment Share on other sites More sharing options...
deadalvs Posted December 25, 2016 Author Share Posted December 25, 2016 haha, ok. I'll continue to search. I'll also post on the other forum. merry christmas! matt 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.