DaJuice Posted May 26, 2006 Share Posted May 26, 2006 First Post!!! Ok, with that out of the way... here's an alternative to the concrete material available in VOPs. Feel free to modify it, upgrade it, add controls, whatever. Quick notes: the shader uses the vector attribute 'edge_tint' if available (to darken the edges of geo tiles). It also uses a rest attribute for most stuff, so that you can randomize 'rest' (as shown in the SOP network) and create visible discontinuities in the larger noise from tile to tile. This shader does not require UVs. About the format that we present these shaders in... anyone want to lay down some ground rules or should we just freestyle it for now? Cheers! Concrete_1.0.zip Quote Link to comment Share on other sites More sharing options...
abvfx Posted May 26, 2006 Share Posted May 26, 2006 omg thank you so much. I can see this forum really shining. Great shader, mate. Now my characters have something to lean against.. or walk on . edit:// i dont see anything wrong with the way you presented the shader. Told us everything you need to know. Maybe just edit your first post if you update the shader. Quote Link to comment Share on other sites More sharing options...
peliosis Posted May 26, 2006 Share Posted May 26, 2006 What a concrete first post! Cool DaJuice! thats a great realistic shader:) Quote Link to comment Share on other sites More sharing options...
sibarrick Posted May 26, 2006 Share Posted May 26, 2006 Nice work. Keep 'em comin. Quote Link to comment Share on other sites More sharing options...
Overload Posted May 26, 2006 Share Posted May 26, 2006 Yea man thats really nice. Hey just wondering... I have my first Renderman class comming up next Quarter at SCAD... How much will that help me in VOPs?? Thanks for posting the file. Quote Link to comment Share on other sites More sharing options...
SvenP Posted May 26, 2006 Share Posted May 26, 2006 Yea man thats really nice. Hey just wondering... I have my first Renderman class comming up next Quarter at SCAD... How much will that help me in VOPs?? Thanks for posting the file. 28037[/snapback] If your Renderman class includes shaderwriting and doesnt only use slim you will gain a lot of knowledge that you can transfer to vops. Sven Quote Link to comment Share on other sites More sharing options...
Visual Cortex Lab Posted May 26, 2006 Share Posted May 26, 2006 wow i love when you guys posts those HIP files with VOP inside... i'm learning a lot from 'em.. thanks a loooot cheers Quote Link to comment Share on other sites More sharing options...
Hedphelym Posted May 26, 2006 Share Posted May 26, 2006 This material looks really nice! thank you for sharing this. Quote Link to comment Share on other sites More sharing options...
Guest Guest Posted May 26, 2006 Share Posted May 26, 2006 Nice work DaJuice! :thumbsup: I haven't looked at it very closely, but here are a few quick first impressions: - "Vex Specular" may not always be what you want (you may want OrenNayar for a "chalkier" cement, or a broad, slightly anisotropic specular highlight for example), so what do you think about splitting specular and diffuse and giving the user access to the different models/parameters? Among other things, this would allow us to modulate Oren-to-Lambert by "painting" a bound "diff_rough" attribute (shader parm), which would break up the look more. - Even if you don't split up the models, I don't think you want to have "evil" ambient hard-wired to 0.5. I'd suggest adding the "Ambient Color" of the lighting model as another parameter (and defaulting it to 1 so the user can control it implicitly by dimming an actual ambient light, which is the usual thing people do)... although, of course, ambient should be banned! - Have you considered adding support for reflections? Depending on how the cement is finished, it can be pretty reflective at grazing angles (and the bumps make that somewhat anisotropic, but I don't think you need to worry about that). Specular alone is not really suited for this kind of thing -- i.e: specularity from 5 point lights looks like exactly that: 5 bright spots. - Just going by the parameters here: you have "diffuse brightness" but no "diffuse tint"... is that intentional? ... gotta get back to work... Cheers! Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted May 26, 2006 Share Posted May 26, 2006 Oooops... that was me While I'm back here though, I just thought of something else (and this maybe should be part of the "guidelines": Add export parameters for all the important parts of the shader calculation. For example, we have all our shaders export at the very least: vector Cdiff (result of diffuse calc) vector Cspec (result of specular calc) float Kocc (weight form ambient occ if any) vector Nbent (bent normal, if any) etc, etc. Naming convensions is a separate topic, but you get the idea. Quote Link to comment Share on other sites More sharing options...
Jason Posted May 26, 2006 Share Posted May 26, 2006 etc, etc. Naming convensions is a separate topic, but you get the idea. 28050[/snapback] Very good point! I've started a Guidelines thread to talk about good practices wrt naming and so on. Please feel free to add suggestions like this over there . Quote Link to comment Share on other sites More sharing options...
DaJuice Posted May 26, 2006 Author Share Posted May 26, 2006 Thanks all for the feedback. - "Vex Specular" may not always be what you want (you may want OrenNayar for a "chalkier" cement, or a broad, slightly anisotropic specular highlight for example), so what do you think about splitting specular and diffuse and giving the user access to the different models/parameters? Among other things, this would allow us to modulate Oren-to-Lambert by "painting" a bound "diff_rough" attribute (shader parm), which would break up the look more. Good idea. Need to do this anyways to export diffuse and speculars. - Even if you don't split up the models, I don't think you want to have "evil" ambient hard-wired to 0.5. I'd suggest adding the "Ambient Color" of the lighting model as another parameter (and defaulting it to 1 so the user can control it implicitly by dimming an actual ambient light, which is the usual thing people do)... although, of course, ambient should be banned! Good point!! Doh! I never use ambient lights in my scenes so this completely slipped my mind. You're right, this won't do. - Have you considered adding support for reflections?Depending on how the cement is finished, it can be pretty reflective at grazing angles (and the bumps make that somewhat anisotropic, but I don't think you need to worry about that). Specular alone is not really suited for this kind of thing -- i.e: specularity from 5 point lights looks like exactly that: 5 bright spots. Hadn't occured to me that concrete could sport reflections too. I'll add this as an option. - Just going by the parameters here: you have "diffuse brightness" but no "diffuse tint"... is that intentional? Yea, idunno what's up with that. If people want pink concrete they shall have it!! But yea, another thing to add. I'll take care of it later today. Thanks for the guidelines Jason. Cheers! Quote Link to comment Share on other sites More sharing options...
old school Posted May 27, 2006 Share Posted May 27, 2006 Real nice shader. Makes for a convincing limestone as well. I have a few comments on the shader. - It is important that you keep the noises in the same shader space where it makes sense. The dirt network's turbulent noise is being fed in global P with a space change to object while all the other noises are being fed from the Rest Position VOP which defaults to Texture space. Wire the output of the restpos1 Rest Position VOP in to the pos input of xform2 Transform VOP. The problem is if you move the geometry inside the object, the dirt will slide but the concrete dimples will stick. can be confusing for the end user. Either move them all to object or to Rest/Texture. You can read more about this in Texture and Modelling book Ch2: Texture Spaces. "The feature spaces should have a fixed relationship that doesn't change when the camera or the object moves." - Keeping your shaders optimized is always a concern. You are using Transform VOPs to simply scale P by global_scale. These use matrix multiplication which can be expensive. You can safely replace xform1 and xform2 Transform VOPs with simple Multiply VOPs. - Testing the rest position attribute on a primitive sphere is not very effective. Resting a single point leaves you with no surface texture. I usually test with NURBs spheres just for this very reason. - When you mix more than two noise patterns together that may have high frequency content, you may get hit by aliasing issues (sparklies). Looking at your shader it isn't happening as the only real high frequency noises are in the aanoise1and aanoise3 VOPs. Then again, you don't know when the object isn't so big in frame. What seems like moderate frequency can turn to high. It is quick and simple to try the animated camera test. Pick your camera and at frame one, zoom right in to one of the surfaces and set your keys. Move to say frame 100 and zoom right out so that the test scene is pretty small on the screen and give your camera a bit of a rotation in Z, say 180 degrees. Set the keys. Now render a sequence and look for any sparkles. Mixing two high frequency anti-aliased patterns together may cause aliasing. Sort of like trying to listen to two finely tuned radios where one is on a heavy classical piece and the other is on thrash metal. I have seen this with both texture maps (used as bump maps) and with procedurals (used to displace P or N) where both texture maps or noises had high frequency. Cranking shading quality to 2 or more is the only cure in these cases. Quote Link to comment Share on other sites More sharing options...
DaJuice Posted May 27, 2006 Author Share Posted May 27, 2006 Awesome, thanks for the great info old school. Good sh*t. The shading space stuff kinda spun my head. I didn't consider that stuff might be animated at the SOP level. The only way to keep procedurals sticking to the geometry with SOP level animation is with a rest attribute then? Sorry if that seems dense. I have plugged the dirt to the rest attribute as well. Ideally I'd like the shader to be able to detect a second rest attrib (if present) and use that for the dirt instead. As I mentioned the rest attribute in the file is randomized for each tile, but I'd rather not have the dirt use a randomized rest. The pattern should be continous from tile to tile, though it doesn't look too bad right now. - Keeping your shaders optimized is always a concern. You are using Transform VOPs to simply scale P by global_scale. These use matrix multiplication which can be expensive. You can safely replace xform1 and xform2 Transform VOPs with simple Multiply VOPs. Thanks, won't forget that one. - When you mix more than two noise patterns together that may have high frequency content, you may get hit by aliasing issues (sparklies). Looking at your shader it isn't happening as the only real high frequency noises are in the aanoise1and aanoise3 VOPs. Then again, you don't know when the object isn't so big in frame. What seems like moderate frequency can turn to high.It is quick and simple to try the animated camera test. Pick your camera and at frame one, zoom right in to one of the surfaces and set your keys. Move to say frame 100 and zoom right out so that the test scene is pretty small on the screen and give your camera a bit of a rotation in Z, say 180 degrees. Set the keys. Now render a sequence and look for any sparkles. Mixing two high frequency anti-aliased patterns together may cause aliasing. Sort of like trying to listen to two finely tuned radios where one is on a heavy classical piece and the other is on thrash metal. I have seen this with both texture maps (used as bump maps) and with procedurals (used to displace P or N) where both texture maps or noises had high frequency. Cranking shading quality to 2 or more is the only cure in these cases. Yup, familiar with this issue. The problem seems worst with very fine displacement. I will render out a sequence like you suggested and see how "safe" the default frequencies are. In the meantime, here's the shader as it currently is. Hope I didn't make any major booboos. I added a bunch of controls, tidied some stuff up, commented a few nodes, and put in some exports. Not sure about weight form AO or bent normals, can someone explain those? Reflections also still need to be added. If you have any more suggestions I'd like to hear them, and you're of course free to tool around with it yourselves. Concrete_1.1.zip Quote Link to comment Share on other sites More sharing options...
Alexander Weide Posted May 27, 2006 Share Posted May 27, 2006 HI i made a version with wet reflexion's the only problem is it looks like metal. please look at this, i made a switch too, to change between wet and dry. and dont forgot iam a noob in houdini but a maya master i love houdini its so fucking hard to learn... Concrete_1.2.hipnc Quote Link to comment Share on other sites More sharing options...
DaJuice Posted May 29, 2006 Author Share Posted May 29, 2006 Hey mainframe, I got some strange grid patterns over the objects during the render. Not sure why. Kay, I've added raytrace reflections as well, use at your own risk. If you're doing glossy reflections, rendertimes can be... :shocking: concrete_juice1.2.zip Quote Link to comment Share on other sites More sharing options...
Alexander Weide Posted May 29, 2006 Share Posted May 29, 2006 Yes i know the render problem, and i fixed it. the problem was, i turned off, micro poly rendering in the render globals of mantra. i turned it on, and all works fine. .........crazy...........but it works......... thanks for youre new shaderversion, i looks beautiful. i hope i can test it, the next hours. i see you gone a completely other way, to solve the reflexions problem. thats fine. i love the vextree's.......i love houdini......... Quote Link to comment Share on other sites More sharing options...
LEO-oo- Posted May 29, 2006 Share Posted May 29, 2006 @DaJuice - nice! Hard work to place all the concrete-blocks - time for a Paulaner Quote Link to comment Share on other sites More sharing options...
stu Posted May 29, 2006 Share Posted May 29, 2006 Wow, I'm gone for a week and a whole new forum pops up! Cool cement shader - a great start to what I'm sure will be a very popular forum. It raises an interesting question - should there be a standard in place as to whether something like ambient occlusion should be shader-centric or light-centric? I've always been inclined to handle this from a light perspective so that I didn't have to include the routines in every shader. Thoughts? Quote Link to comment Share on other sites More sharing options...
Guest Guest Posted May 29, 2006 Share Posted May 29, 2006 I've always been inclined to handle this from a light perspective so that I didn't have to include the routines in every shader. Yeah, you could make it light-centric, but the problem is that bent normals and baked occlusion are both object-centric. What I ended up doing here, is adding a standard occlusion tab to all shaders. It can be set to either generate occlusion or read from baked files -- reason is that you don't want to be changing shaders just to generate baked occlusion for example. 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.