Guest xionmark Posted February 15, 2009 Share Posted February 15, 2009 Oh oh ... this call only works for instancing points, not other primitives/geometry. Just a note, I just discovered if I copy the velocity to the primitive's point's the addVelocityBlurGeometry() does in fact work ... it'll be in the next release. Sure would be nice to have a few more tips and notes in the HDK ... oy! Mark Quote Link to comment Share on other sites More sharing options...
vmuriel Posted February 16, 2009 Share Posted February 16, 2009 (edited) Hey Mark, I found this information in VRAY_Procedural.h not in the HDK documentation. That file is nicely documented. 00252 // If you want to perform velocity motion blur on the geometry, you can add 00253 // all the detail at once, calling this convenience function. 00254 // Note: The "shutter" is really a scale on the velocity. However, since 00255 // velocity is typically specified in units/second, you usually need to 00256 // scale by the shutter time of the frame. To do this, you should multiply 00257 // by the "object:velocityscale" property of the object. 00258 // 00259 // Assume that we have a procedural where the user can specify an 00260 // individual shutter time in a parameter called "shutter". Then, the 00261 // initialization code might look something like: 00262 // float shutter, vscale; 00263 // if (!import("shutter", &shutter, 1)) 00264 // shutter = 1; // Default to full shutter 00265 // if (!import("object:velocityscale", &vscale, 1)) 00266 // { 00267 // // This should never happen since it's a property 00268 // vscale = 0; 00269 // } 00270 // this->myShutter = shutter * vscale; 00271 // Then, during the rendering process: 00272 // gdp = allocateGeometry(); 00273 // createGeometry(gdp); // Create the render geometry 00274 // addGeometry(gdp, 0); // Add geometry for beginning of frame 00275 // // Add the motion blur geometry 00276 // addVelocityBlurGeometry(gdp, this->myShutter); 00277 // 00278 // The maximum velocity displacement is returned (so that bounding boxes 00279 // may be computed). 00280 // 00281 float addVelocityBlurGeometry(GU_Detail *gdp, fpreal shutter, const char *velocity_attribute="v"); Conclusion, if you are hungry of HDK tips, don't forget to look in the headers. I have found very useful infomation there. Edited February 16, 2009 by vmuriel Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted February 16, 2009 Share Posted February 16, 2009 Conclusion, if you are hungry of HDK tips, don't forget to look in the headers.I have found very useful infomation there. Oh don't I know ... before the HDK was made available for free (SESI used to charge $2500 for it), one had to use hcbrowse, hviewclass & hviewfile ... And before we started using Doxy on the headers, it was (and often still is) all about "grepping" the headers to find what you needed. On this occasion the addVelocityBlurGeometry() call is a new addition to the API and simply went under the radar for me. Was it mentioned in the release notes? Other than the few HTML help pages, the examples, and using Doxy, that's about it, it's the wild west of 3D programming. It's cool, for the persistent, there's much to be gained; sadly though, there's all too much work expended looking up something that *should* be easy to find. Have fun! Mark Quote Link to comment Share on other sites More sharing options...
vmuriel Posted February 16, 2009 Share Posted February 16, 2009 Your HDK adventure is long, I see. You're absolutely right, more HDK info would be great. But hey ... is the HDK, only for obstinate souls. Thanks Mark, for the HDK information exchange. Cheers. Quote Link to comment Share on other sites More sharing options...
atap3d Posted February 16, 2009 Share Posted February 16, 2009 (edited) Hi. Your DSO is very interesting. But I think your plugin spends a lot of memory in instancetype-file mode. I tried "addProcedural" and "instance all the geometry at once" methods. Actualy, I think, your "instance all the geometry at once" is not "instance all the geometry at once". Your "instance all the geometry at once" is "merge all geometry into one object". If you use the following method, the memory spends ten times less. while(condition) { modify(xform); openGeometryObject(); setTransform(xform, 0.0); addGeometry(gdp, 0.0); closeObject(); // gdp does not change } But there is complexity. When using setTransform transformation occurs in screen space. At least I think so. It is absolutely not in world space. Do you know how to make the transformation in world space? Edited February 16, 2009 by atap3d Quote Link to comment Share on other sites More sharing options...
niko3d Posted February 17, 2009 Share Posted February 17, 2009 Hi mark Heres the Ifd test data, looks like houdini is looking for the file VRAY_clusterThis.so, which isnt of course a windows file. Any ideas? Registering procedural 'clusterThis' Registering procedural 'demobox' Registering procedural 'demofile' Registering procedural 'demovolume' Registering procedural 'sprite' Registering procedural 'image3d' Registering procedural 'metapoly' Registering procedural 'file' Registering procedural 'fur' Registering procedural 'program' Registering procedural 'hscriptinstance' Registering procedural 'image3dvolume' mantra Version 9.5.375 (Compiled on 02/10/09) User defined plane attribute 'device::IPlay.rendermode' 'string'[1] User defined plane attribute 'device::IPlay.framerange' 'string'[1] User defined plane attribute 'device::IPlay.currentframe' 'real'[1] User defined plane attribute 'device::IPlay.rendersource' 'string'[1] User defined plane attribute 'device::IPlay.houdiniportnum' 'int'[1] mantra: Unable to find procedural DSO 'mantra/VRAY_clusterThis.so' mantra: Cannot allocate procedural 'clusterThis' on object /obj/geo1 Load Time: 0.296u 0.406s Memory: 29.25 MB VEX Shaders Loaded asad_light U:/applications/houdini/95/houdini/vex/Light/asad_ Generating Image: C:/test.exr (640x480) Plane[C]: Cf+Af[4] (16-bit float) SampleFilter: alpha PixelFilter: gaussian 2 2 VEX Type: vector4 Dither: 0.5 Gamma: 1 Gain: 1 White point: 1 Thread Count: 4 Render Time: 0.390u 0.437s Memory: 47.79 MB of 61.43 MB arena size Cheers Nick Quote Link to comment Share on other sites More sharing options...
niko3d Posted February 17, 2009 Share Posted February 17, 2009 (edited) Hi mark After digging around in the Vray procedural, it seems it wasnt evaluating the houdini_os var correctly cant see why it would be having problems, I will check into our config and make sure its not something on there. Anyway I enforced the use of the .dll instead. This time I get this data back and mantra crash. M:\kickstart>mantra -V4 -f C:\test.ifd Registering procedural 'clusterThis' Registering procedural 'demobox' Registering procedural 'demofile' Registering procedural 'demovolume' Registering procedural 'sprite' Registering procedural 'image3d' Registering procedural 'metapoly' Registering procedural 'file' Registering procedural 'fur' Registering procedural 'program' Registering procedural 'hscriptinstance' Registering procedural 'image3dvolume' mantra Version 9.5.375 (Compiled on 02/10/09 User defined plane attribute 'device::IPlay. User defined plane attribute 'device::IPlay. User defined plane attribute 'device::IPlay. User defined plane attribute 'device::IPlay. User defined plane attribute 'device::IPlay. VRAY_clusterThis::getProceduralArgs() VRAY_clusterThis::allocProcedural() VRAY_clusterThis::VRAY_clusterThis() - Const VRAY_clusterThis::VRAY_clusterThis() - Versi mantra: Unknown parameter 'otl_version' mantra: Unknown parameter '"1.4.4"' VRAY_clusterThis::initialize() Load Time: 0.359u 0.328s Memory: 29. VEX Shaders Loaded asad_light U:/applications/houdi Generating Image: C:/test.exr (640x480) Plane[C]: Cf+Af[4] (16-bit float) SampleFilter: alpha PixelFilter: gaussian 2 2 VEX Type: vector4 Dither: 0.5 Gamma: 1 Gain: 1 White point: 1 VRAY_clusterThis::getBoundingBox() Thread Count: 4 VRAY_clusterThis::render() Instancing ... Cheers Nick Edited February 17, 2009 by niko3d Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted February 17, 2009 Share Posted February 17, 2009 Registering procedural 'clusterThis' <SNIP> mantra: Unable to find procedural DSO 'mantra/VRAY_clusterThis.so' mantra: Cannot allocate procedural 'clusterThis' on object /obj/geo1 Hi Nick, The problem appears to be in the VRAYProcedural. You're on Windows right? The message above is looking for VRAY_clusterThis.so, it should looking for VRAY_clusterThis.dll. Make sure you have the DLL installed and that the VRAYProcedural is pointing to the correct DLL's. Thanks, Mark Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted February 17, 2009 Share Posted February 17, 2009 OK, it looks like it's running the cluster code now. When you say mantra crashes, I need details. Does mantra completely die? Or does the cluster DSO throw an exception and then mantra completes the render? Make sure all the required attributes are on the incoming geometry (I'll have better error reporting soon). If you can post the output of the render where it stops, that would help. Or post an IFD file. Thanks, Mark Quote Link to comment Share on other sites More sharing options...
niko3d Posted February 19, 2009 Share Posted February 19, 2009 Hi mark, Ive figured out what was causing the crashing by looking into the ifd : Quote Link to comment Share on other sites More sharing options...
niko3d Posted February 25, 2009 Share Posted February 25, 2009 Hey mark, I've been doing some tests with clusterThis. How should cluster this act with the radius of the cluster through time? I get a strange pulsing effect and depending on the noise settings the radius changes so drastically that the pattern inverts its self. Does clusterThis support animated/simulated data? So you know i was testing clusterThis on a single particle. What exact attributes are needed for stable clusters for moving particles? Seems like a such a great tool for use with particle Sims etc. it be such a shame if this cant be supported oh and thanks for sharing your DSO : Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted February 26, 2009 Share Posted February 26, 2009 I've been doing some tests with clusterThis. How should cluster this act with the radius of the cluster through time? I get a strange pulsing effect and depending on the noise settings the radius changes so drastically that the pattern inverts its self. Does clusterThis support animated/simulated data? So you know i was testing clusterThis on a single particle. What exact attributes are needed for stable clusters for moving particles? Seems like a such a great tool for use with particle Sims etc. it be such a shame if this cant be supported oh and thanks for sharing your DSO : Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted February 26, 2009 Share Posted February 26, 2009 Hi.Your DSO is very interesting. But I think your plugin spends a lot of memory in instancetype-file mode. I tried "addProcedural" and "instance all the geometry at once" methods. Actualy, I think, your "instance all the geometry at once" is not "instance all the geometry at once". Your "instance all the geometry at once" is "merge all geometry into one object". If you use the following method, the memory spends ten times less. while(condition) { modify(xform); openGeometryObject(); setTransform(xform, 0.0); addGeometry(gdp, 0.0); closeObject(); // gdp does not change } But there is complexity. When using setTransform transformation occurs in screen space. At least I think so. It is absolutely not in world space. Do you know how to make the transformation in world space? Hello, sorry, I missed this post ... I'm pretty sure I'm doing what you're showing above, but a slight difference in the way the transform happens. There's a lot of optimization to do, primarily with the brute force attribute code, it will be coming along soon, I have a few other tasks to finish with it first. Mark Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted April 6, 2009 Share Posted April 6, 2009 Greetings, Update: Version 1.4.6 available at: http://digitalcinemaarts.com/dev/clusterThis/index.html New features and fixes: * Added geometry velocity blur. The velocity motion blur now calls addVelocityBlurGeometry() and the deformation motion blur is calculated by clusterThis DSO as before (remember when using deformation blur you will be doubling the amount of geometry generated). * Added volume instancing. Simple volume instancing. I started creating extensive Voxel arrays but it became clear that would better executed in a separate project so the volume instanced is a single "volume object" per location generated. * Added curve instancing. A NURBS curve is created per incoming point, created from the points generated from the instancing loop. (Not quite working yet, having issues with part of the curve remaining at world origin) *Optimized attribute processing. Cleaned up a bunch of the attribute creation and assignment code, will reduce overhead. *Added motion blur pass for CVEX processing. Added a loop for processing deformation motion blur geometry to the CVEX processing code. *Changed parameter code to use proper functions. Changed the import() function to the proper getFParm()/getIParm()/getSParm() functions. *Added verbosity switch for console messages. *Added randomness for when to instance of objects There's now a control on the OTL to control the "probability" of an object being instanced. *Using SYSsin() and SYScos () instead of std C functions. *Optimized memory usage for CVEX processing, correct memory allocation for attributes and objects. Now only the exact amount memory is allocated for the CVEX processing based ob geometry size and the user selected attributes to be sent to the CVEX processing engine. *Added user selectable attributes for CVEX processing. Allows the user to select which attributes to be sent to the CVEX engine so the VEX code you write will have those data available and only the memory required for that processing is allocated. There's a number of tips and notes I need to compile that will be helpful for using this clustering tool, I'll post those soon. Much testing is in order now as there's a few odd things I can't figure out related to using the addProcedural() method ("deferred processing"), which I would think would have a number of benefits, doesn't seem the case. Please send any bug reports. And as always, use with caution, it's open source ... m'kay? Enjoy. Mark Quote Link to comment Share on other sites More sharing options...
davylew Posted April 8, 2009 Share Posted April 8, 2009 Thx xionmark. When i was using deep shadow render the cluster. I get nothing..... Can you show how to setup deep shadow with your dso... thx ! Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted April 8, 2009 Share Posted April 8, 2009 When i was using deep shadow render the cluster. I get nothing..... Hello, You'll need to provide more details. Deep shadows make no difference, the DSO gets run for each DSM required then the final pass when mantra renders the image. I use DSM's all the time with this tool. Mark Quote Link to comment Share on other sites More sharing options...
stevenong Posted April 8, 2009 Share Posted April 8, 2009 Thx xionmark.When i was using deep shadow render the cluster. I get nothing..... Can you show how to setup deep shadow with your dso... thx ! You have to look through the light & make sure it's looking at the points. Also, you should be using a Spot Light instead of a Point Light and frame the geometry as tight as you can to get the best possible results. It's really hard to know what's wrong without looking at your file so please post it and we can check it out. Cheers! steven Quote Link to comment Share on other sites More sharing options...
davylew Posted April 19, 2009 Share Posted April 19, 2009 You have to look through the light & make sure it's looking at the points. Also, you should be using a Spot Light instead of a Point Light and frame the geometry as tight as you can to get the best possible results.It's really hard to know what's wrong without looking at your file so please post it and we can check it out. Cheers! steven I got deepshadow now. Thx guys.!! Another question .. How to shading particles of realistic water spray? Mass of partilces could render with this dso, but how to shading lots point "volume" like? Quote Link to comment Share on other sites More sharing options...
itriix Posted April 30, 2009 Share Posted April 30, 2009 (edited) Hi everyone, i'm playing around with the mantra "clusterThis" procedural geometry DSO, and i'm not getting anything to come out when i render. i'm sure i'm just not doing something i should be. what i've done... I install the 3 different files to their proper locations. i load the "VRAY_clusterThis_dev_v1.4.6.hip" file... then i just tried to render. it didn't crash or do anything the such, but it just gave me a black image with nothing in the alpha... so i kept looking around. noticed some warnings and errors on the nodes in the "particles" object... the file in node was referring to the rop output node, which was set to "geo/particles_$F4.bgeo" so i changed it in the MAIN take, to $HIP/geo/particles_$F4.bgeo and then renderd out the "bgeos"... which when i read them in, it's fine, i can see the particles.... but then, when i click "RENDER" on the mantra node, still, just a black image, no alpha information, as if nothing is rendering. so i'm still confused what's happening here. anyone have any clue what i might be missing here? thanks, J "i'm trying to do an intense particle sim and i think this would TRULY help out a lot" Edited April 30, 2009 by itriix Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted April 30, 2009 Share Posted April 30, 2009 Hello, From the shell, start mantra like so: earth:~> mantra -V4 Registering procedural 'clusterThis' Registering procedural 'demobox' Registering procedural 'demofile' Registering procedural 'demovolume' Registering procedural 'sprite' Registering procedural 'image3d' Registering procedural 'metapoly' Registering procedural 'file' Registering procedural 'fur' Registering procedural 'program' Registering procedural 'hscriptinstance' Registering procedural 'image3dvolume' mantra Version 9.5.350 (Compiled on 01/14/09) The -V4 flag for mantra will tell you what DSO's are being loaded. If clusterThis is not in the list, either the DSO or the VRAYprocedural file are in the wrong location (or possibly the VRAYprocedural file is incorrect), When you start up the demo file, select the first take, turn on view points in the viewport and home the viewport. You should see a collection of points. Render it, and in mplay you should see a bunch of red/pink/white spots. Mark 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.