aracid Posted March 8, 2007 Share Posted March 8, 2007 Hey all I'm busy rendering some crowds using massive and im trying to optimise the ground ambient occlusion, so what im thinkin is taking the amc out of massive, converting that into a point cloud, and then rendering that with some sort of fall off based on the distance between the surface being shaded to the point in the points cloud. using mantra :-) so this is the render i get using air and the ground ambient occlusion, what looking for is this the blue being the point out of the point cloud. I thought this would be a simple solution in theory and it works close to where the centre of the scene is, however but i keep on getting this - notice how the fall off dissapears further away from the scene origin. i'M trying to achieve some way of looping though the points that are nearest to the one being shaded and Maxing Cd and not ending up with this so if anyone can shed some light on this for me, I'd really appreciate it. heres the hip file that i used to generate the problem. odforce.rar thanks again brian Quote Link to comment Share on other sites More sharing options...
doc Posted March 8, 2007 Share Posted March 8, 2007 I created a shader that will do what you want... or at least I think it does something close to what you're after. I can't stand using looping/if statements in vops so i wrote it with vex. Check the operator type properties' "vex code" tab for details. let me know if you have any questions. L doc_fast_ao.otl Quote Link to comment Share on other sites More sharing options...
doc Posted March 8, 2007 Share Posted March 8, 2007 Apparently there was a problem with my otl, so here's the .vfl that it comes from. I'd post a hip, but the way things are set up here at work we can't embbed otls. Luca doc_fast_ao.vfl Quote Link to comment Share on other sites More sharing options...
edward Posted March 9, 2007 Share Posted March 9, 2007 I'd post a hip, but the way things are set up here at work we can't embbed otls. How do they do that? I know they can make it so that it nevers saves the "Save Embedded OTLs" option, but you should always be able to turn it back on after you start Houdini prior to saving your .hip file? Quote Link to comment Share on other sites More sharing options...
stevenong Posted March 9, 2007 Share Posted March 9, 2007 Hey Ed, This is how it's done: hopmanager.pref.nosave & it's a show wide setting so all the options are locked to prevent accidentally change. However, we can source houdini_setup in a standalone shell without the show environment variables which will allow us to embed HDAs into the hip file. Cheers! steven Quote Link to comment Share on other sites More sharing options...
doc Posted March 9, 2007 Share Posted March 9, 2007 However, Luca can source houdini_setup in a standalone shell without the show environment variables which will allow him to embed HDAs into the hip file. He just forgot about that, I'm sure. Nope, just lazy Quote Link to comment Share on other sites More sharing options...
stevenong Posted March 9, 2007 Share Posted March 9, 2007 Hey lazy doc, You're not supposed to grab my previous text & quote me! Cheers! steven Quote Link to comment Share on other sites More sharing options...
rdg Posted March 9, 2007 Share Posted March 9, 2007 What is the difference between your shader and a sprite attached to each point, where the sprite is a radial falloff ? As I understand the source, you are reading the point cloud like a texture file? How do you know that bgeo files can be used as texture files? Georg Quote Link to comment Share on other sites More sharing options...
aracid Posted March 9, 2007 Author Share Posted March 9, 2007 Hey doc, thanks for the updated version, this one is exactly what im looking for :-) What is the difference between your shader and a sprite attached to each point, where the sprite is a radial falloff ?Georg I havent actually tried that solution and yeah, basically what doc's done is measured the point on the surface being shaded to the closest point cloud, which basically returns something similar to the second pic on the post. With this method im hoping that it might give less problems when the terrain isnt flat and u end up with a sprite that over laps the edge or penetrates the geometry. Quote Link to comment Share on other sites More sharing options...
MADjestic Posted April 12, 2007 Share Posted April 12, 2007 Hey doc, thanks for the updated version,this one is exactly what im looking for :-) I havent actually tried that solution and yeah, basically what doc's done is measured the point on the surface being shaded to the closest point cloud, which basically returns something similar to the second pic on the post. With this method im hoping that it might give less problems when the terrain isnt flat and u end up with a sprite that over laps the edge or penetrates the geometry. I took the liberty of rebuilding doc's shader in VOPs (more for an exercise - neither I like the way 'for's and 'while's look in VOPs). So here's the shader - it works 'almost' like doc's and I am not sure whether it's me or the way VOPs are supposed to work, nevertheless I can't really tell why they do work this way. Reading the code of a network explains much, except why it was done to work exactly like such... Maybe somebody is more successful in exploring this 'terre inconnue' doc_ao_vops.rar Quote Link to comment Share on other sites More sharing options...
aracid Posted February 21, 2008 Author Share Posted February 21, 2008 Hey guys is it just me, or does this scene file not work in H9? has anyone tried anything similar? Quote Link to comment Share on other sites More sharing options...
protean Posted April 3, 2008 Share Posted April 3, 2008 Hey guysis it just me, or does this scene file not work in H9? has anyone tried anything similar? I'm trying to get this working too. Doc's code works fine but I need to get a node based version working. We had a simnilar network working in H8 but in 9.1.145 it isn't. J Quote Link to comment Share on other sites More sharing options...
JoshJ Posted April 3, 2008 Share Posted April 3, 2008 I tried the node based vops version in a recent build of Houdini. After saving the scatter sop as a bgeo and packaging the shader into a material (and replacing the shader sop with a material sop), everything looked like it was working well. What specific problems are you all having with it, at what step is it not working? I'm trying to get this working too. Doc's code works fine but I need to get a node based version working. We had a simnilar network working in H8 but in 9.1.145 it isn't.J Quote Link to comment Share on other sites More sharing options...
Jason Posted April 3, 2008 Share Posted April 3, 2008 How do they do that? I know they can make it so that it nevers saves the "Save Embedded OTLs" option, but you should always be able to turn it back on after you start Houdini prior to saving your .hip file? I think all large facilities end up disabling embedding and locking the prefs with the .nosave Steven mentions. However, you can still go to the Operator Type Manager using the RMB "Copy" function, copy the operator type not to another external OTL file but instead to "Embedded". This will embed the HDA into the hipfile. (IMHO the Operator Type Manager should publicize this capability somehow - perhaps with a "Embed this Operator Type" toggle alternative to the string field) You can also use a script to embed all your OTLs, taking care not to embed OTLs shipped with Houdini: set ots = `execute("otinuse -t")` foreach ot ($ots) set original_otl = `execute("otgetotl $ot")` if( "$original_otl" != "Embedded" ) if( `strmatch("${HFS}*","$original_otl")` == 1 ) echo "$ot is part of the houdini distribution. ($original_otl)" else echo "embedding operator type ($ot) from ($original_otl)" otcopy $ot Embedded #otprefer $ot Embedded # prefer it if you like.. endif endif end Quote Link to comment Share on other sites More sharing options...
protean Posted April 4, 2008 Share Posted April 4, 2008 I tried the node based vops version in a recent build of Houdini. After saving the scatter sop as a bgeo and packaging the shader into a material (and replacing the shader sop with a material sop), everything looked like it was working well. What specific problems are you all having with it, at what step is it not working? I've attached the file i'm working with. If it works for you then I'm at a loss. I've also tried building it from scratch without much result and also with a for loop instead of a while loop but I'm not getting very far with it. John doc_ao_vops_H9_edit.rar 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.