LaidlawFX Posted April 9, 2014 Share Posted April 9, 2014 Does anyone know how to fix them overlapping polys that we still have left over? I'd like to 'relax' those overlapping polys, similar to uv relax. Ask Gordon he should be working at ilm now last I heard. He did the uv flipping from object to world space and the stretching portion. Quote Link to comment Share on other sites More sharing options...
gosch Posted April 14, 2014 Share Posted April 14, 2014 Small update ) I've utilized technique of texture correction suggested by rayman. On flat objects it works quite well, going to test it on more complicated geometry next. https://vimeo.com/91874669 1 Quote Link to comment Share on other sites More sharing options...
Linghaoli Posted April 15, 2014 Share Posted April 15, 2014 Okay Fellas. I'm throwing my hat in the ring, here. I've made a few additions to Pavel's file. I hope you all find them useful! I am more interested in the displacement of geometry than the displacement at the shader level for the following reasons. If you are not in a Mantra pipeline, it's easier to pass along the displaced geometry to another renderer. You can add another level of displacement to the newly-shaped, cracked geometry. If you want accurate collisions, you'll want these large scale cracks in the geometry. So, I added the following features (all of which can be vastly improved and optimized). Created a group out of the edge points and edge prims. Used those edge groups to cusp the vertex normals of only the edges. In many shaders, you'll want water-tight geometry. Faceting can cause faces to explode outwards when displacing along normal at render time. This gives you crisp edges, while keeping the rest of the curved surfaces smooth. See the .gif attached. Used those edge groups to create an edgeDisp attribute with a falloff (the blend of the attribute can be done better). I used this attribute in the existing wrangle SOP to limit the crack-displacement closer to the edges. Why? Because this preserves the integrity of the geometry a little better. Without it, there tends to be more overlapping polygons on the surfaces further from the edges. See the .gif attached. I'm also attaching the .hip file. I colored the changes I made in red. Click on the .gifs below to better understand what I'm talkin' bout. edgeCusp.gif edgeDisp.gif .hip file on it's way!!! thanks so much fxrod! super useful info! to chip in a little bit: It's not a mantra pipeline at the place I am current working for, so fx even export "rest" point attr to go with the geo, in that case lookdev artist can use it directly to decide how the displacement on the inside face would look. 1 Quote Link to comment Share on other sites More sharing options...
Grucho Posted May 6, 2014 Share Posted May 6, 2014 Hello everybody. Thanks so far to everyone for helping me learning Houdini. I have some problem with the displacement. The interior is working fine but it is making some bad artifact on the exterior and I don't know why... The surface of the sphere it is not smooth at it should be. Here the render and the hip file. Thanks again!! interior_detail_test.hipnc Quote Link to comment Share on other sites More sharing options...
Solitude Posted May 6, 2014 Share Posted May 6, 2014 Thought I'd give it a shot on sops (with the idea of transferring to other software for rendering)... normals aren't perfect yet, but uvs and such are working. Video with uvs and better normals here: www.fx-td.com/content/misc/voronoi_edge_disp_uv.mov 1 Quote Link to comment Share on other sites More sharing options...
Grucho Posted May 6, 2014 Share Posted May 6, 2014 Thought I'd give it a shot on sops (with the idea of transferring to other software for rendering)... normals aren't perfect yet, but uvs and such are working. Video with uvs and better normals here: www.fx-td.com/content/misc/voronoi_edge_disp_uv.mov I've got the same problem with normals. Do you know a work around? Quote Link to comment Share on other sites More sharing options...
Solitude Posted May 6, 2014 Share Posted May 6, 2014 Not yet... The normals in that image are faceted because I'm recomputing -- in my latest version they are smooth (shown in the video link), but with a few artifacts along seams. I haven't quite nailed it yet... I think it might have to do with having to separate the normals from the inside vs outside better. Quote Link to comment Share on other sites More sharing options...
narbuckl Posted May 12, 2014 Share Posted May 12, 2014 Still some slight flickering but the method is very useful. this was the shader based method, very simple geo for the simulation. Quote Link to comment Share on other sites More sharing options...
Grucho Posted May 12, 2014 Share Posted May 12, 2014 Still some slight flickering but the method is very useful. this was the shader based method, very simple geo for the simulation. Nice, But how can you apply this shading on an other displacement shader? for example I have a cube with a diplacemente map on the outside, how can i combine the two shader? Quote Link to comment Share on other sites More sharing options...
narbuckl Posted May 12, 2014 Share Posted May 12, 2014 Nice, But how can you apply this shading on an other displacement shader? for example I have a cube with a diplacemente map on the outside, how can i combine the two shader? I can look into it, Igor's example looks like he has it figured out, off the top of my head I imagine its something like modifying the uv's based on the initial displacement so anything after that is using the current displaced position, not the original, then you should just use the same mask attribute you used to exclude the displacement as the area for the displaced texture. You would just need to watch the blending on the edges of the two areas. -Nathan Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted May 12, 2014 Share Posted May 12, 2014 I can look into it, Igor's example looks like he has it figured out, off the top of my head I imagine its something like modifying the uv's based on the initial displacement so anything after that is using the current displaced position, not the original, then you should just use the same mask attribute you used to exclude the displacement as the area for the displaced texture. You would just need to watch the blending on the edges of the two areas. -Nathan Yeah Nathan's right you can just string the displacement nodes together, so you can make right angle displacement, an L like extrusion, even if you wanted to. Displacement on displacement looks really cool if you got the right idea for it. If you take the displacement shader module and make a vop otl of it, it's really easy to add to different shaders, stack the displacement, and maintain it within the proper bounds. I included it my uber shaders a simple if block and hide when menu will make it efficient to be there and hide it if you don't need it for your main shader. That way you don't have to maintain a special shader that does this. Quote Link to comment Share on other sites More sharing options...
narbuckl Posted May 13, 2014 Share Posted May 13, 2014 (edited) has anyone looked at extracting the RBDpacked prim intrinsics to get the matrix transforms? It seems to store a lot of useful data (rest,pivot,orient,local/global transforms, etc.) seems that if you were to offset the point of the packed prim per point of the object you could get a lot of the data needed for the displacement. Just trying to think of ways of eliminating steps in sops. -Nathan Edited May 13, 2014 by narbuckl Quote Link to comment Share on other sites More sharing options...
Ratman Posted May 13, 2014 Share Posted May 13, 2014 has anyone looked at extracting the RBDpacked prim intrinsics to get the matrix transforms? It seems to store a lot of useful data (rest,pivot,orient,local/global transforms, etc.) seems that if you were to offset the point of the packed prim per point of the object you could get a lot of the data needed for the displacement. Just trying to think of ways of eliminating steps in sops. -Nathan I've been all over the place with that stuff lately for a project. I'd recommend crackin' open the Transform Pieces OTL and checking out the last two AttribWrangle nodes. It's all about the new primintrinsic() and setprimintrinsic() vex variables. Very interesting stuff! Quote Link to comment Share on other sites More sharing options...
rayman Posted May 13, 2014 Share Posted May 13, 2014 Hello! I did a few tests with multiple displacements a couple of days before and it worked fine. You have to execute edge displacement first, recompute uvs and use them to perform standard displacements later. Then you can use internal blend attribute (I can`t remember exact name) to mask inside areas. About packed attributes: that was my initial attempt, but I decided, that it is more flexible to compute matrices on the fly as this way you can mix any combination of simulation and manual animation and it will still work. I will try to upload new files soon, as I added some new features: -Per piece local mask - each piece will apply displacement only on its edges and inside prims (this means less or no flickering on flat areas). Unfortunately it is another pre-step. -Fixed iterative displacement - better displacement on thin and corner areas -Added old matrix setup so pieces now can move nicely What I want to add is just to pack everything inside one snippet node, and use the same code for sop and shader parts. 3 Quote Link to comment Share on other sites More sharing options...
narbuckl Posted May 13, 2014 Share Posted May 13, 2014 (edited) Hello! I did a few tests with multiple displacements a couple of days before and it worked fine. You have to execute edge displacement first, recompute uvs and use them to perform standard displacements later. Then you can use internal blend attribute (I can`t remember exact name) to mask inside areas. About packed attributes: that was my initial attempt, but I decided, that it is more flexible to compute matrices on the fly as this way you can mix any combination of simulation and manual animation and it will still work. I will try to upload new files soon, as I added some new features: -Per piece local mask - each piece will apply displacement only on its edges and inside prims (this means less or no flickering on flat areas). Unfortunately it is another pre-step. -Fixed iterative displacement - better displacement on thin and corner areas -Added old matrix setup so pieces now can move nicely What I want to add is just to pack everything inside one snippet node, and use the same code for sop and shader parts. Hey Pavel (and everyone participating), going off some of your earlier files I ended up creating these .otls. the first 2 "matrix combine" and "matrix split" were just to simplify the process of importing transform matrices (the 3rd otl uses these). the main one you should look at is the 'ortho displace'. It was my attempt at creating a portable node to add to multiple shader setups. I tried to keep it as organized as possible, hope it helps in your effort fyi: The resulting dispP,dispN are meant to go into a displace along normals node not directly into the displacement output. otl pack.rar Edited May 13, 2014 by narbuckl 2 Quote Link to comment Share on other sites More sharing options...
santosh Posted May 13, 2014 Share Posted May 13, 2014 Hey Nathan...fantastic stuff mate...can you by any chance post the hip with the otls implemented.. Hey Pavel (and everyone participating), going off some of your earlier files I ended up creating these .otls. the first 2 "matrix combine" and "matrix split" were just to simplify the process of importing transform matrices (the 3rd otl uses these). the main one you should look at is the 'ortho displace'. It was my attempt at creating a portable node to add to multiple shader setups. I tried to keep it as organized as possible, hope it helps in your effort fyi: The resulting dispP,dispN are meant to go into a displace along normals node not directly into the displacement output. otl pack.rar Quote Link to comment Share on other sites More sharing options...
narbuckl Posted May 13, 2014 Share Posted May 13, 2014 (edited) Hey Nathan...fantastic stuff mate...can you by any chance post the hip with the otls implemented.. Thanks! I'll have to look into stripping out some studio specific stuff from the scene file in order to post a .hip but the main attributes the system requires are: mx_x, mx_y, mx_z, mx_p, which I created using the same technique Pavel used from an earlier file that he posted (SHOP_edgedisp_v08B). If your using a different method for tracking the matrix then that works too you just need to name the attributes accordingly and make sure that your matrix is based on all vectors being orthogonal at the rest position of the object. So prior to sim (or at start frame) the vectors are all aligned along their axis for each point, then you just need to transform those vectors with the pieces. Aside from that I used the same minpos/intersect method that Pavel is using in his current files. Grabbing the original pre-fractured geometry in order to get the original bounds/UV The OTL works in sop/vops context as well as shops, im currently using it in my shader but I tested it to make sure it works in sops as well. -Nathan Edited May 13, 2014 by narbuckl 1 Quote Link to comment Share on other sites More sharing options...
santosh Posted May 15, 2014 Share Posted May 15, 2014 Hey Pavel, was wondering if you have your current setup.. the one you are using on the bunny..much appreciated man..this thread is a gold mine of info... Nathan , those OTLs are working smooth man..thx Hello! I did a few tests with multiple displacements a couple of days before and it worked fine. You have to execute edge displacement first, recompute uvs and use them to perform standard displacements later. Then you can use internal blend attribute (I can`t remember exact name) to mask inside areas. About packed attributes: that was my initial attempt, but I decided, that it is more flexible to compute matrices on the fly as this way you can mix any combination of simulation and manual animation and it will still work. I will try to upload new files soon, as I added some new features: -Per piece local mask - each piece will apply displacement only on its edges and inside prims (this means less or no flickering on flat areas). Unfortunately it is another pre-step. -Fixed iterative displacement - better displacement on thin and corner areas -Added old matrix setup so pieces now can move nicely What I want to add is just to pack everything inside one snippet node, and use the same code for sop and shader parts. 1 Quote Link to comment Share on other sites More sharing options...
rayman Posted May 17, 2014 Share Posted May 17, 2014 (edited) Small update! Sop and Shop parts now are sharing the same code - networks are synced and almost identical. Code is divided into 2 parts, because I like to keep noise as vex node instead of writing it as a function. (Noise and ramps are the 2 things I prefer to use inside vops insted of wrangles) In this update you have controls and visualisation for displacement masks along edges and inside groups. There are a bunch of nodes that you can adjust to control the distribution of displacement. Almost everything is a vex, so you can find some useful code there. There is also iteration variable inside wrangles, that you may find useful. . Nathan: These otls are great! Very useful. The reason I still don`t use otls is that I`m constantly changing parts of the setup, so I think it is easier to debug it when everithing is a flat network. For example sometiemes I use rest_p for noise generation instead of inverted matrix as it always produces stable results. I also don`t like how attributes, parameters and variables are currently named, so I may change them to be more consistent. Still thank you for sharing them. Great work! santosh: The bunny setup I think is the previous setup I uploaded, with some noise and displacement adjustments. I don`t have exact files right now, but I`ll try to find them by the end of the week. P.S. If it is possible, can somebody test if this file is working fine in animation. I`m not able to render it right now as I spent a whole day to open the scene and render 1 static frame. Also check if uvs and displacement are stable in both sop and shops. Thanks! SOP_SHOP_EdgeDisp_v12.hipnc Edited May 17, 2014 by rayman 5 Quote Link to comment Share on other sites More sharing options...
Solitude Posted May 17, 2014 Share Posted May 17, 2014 (edited) Thanks for sharing! Looks great! The only problem I see (and it should be pretty easy to fix) is the same problem I was having in mine orginially. The normals on the outside of the sphere are faceted because they aren't be resampled from the original geometry. An attribvop + xyzdist + primtive attribute run over the verts can do it pretty easily. P.S. the sops version (displaceSop and uvs) under it don't seem to be functioning. Edited May 17, 2014 by Solitude 1 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.