MENOZ Posted June 9, 2011 Share Posted June 9, 2011 HI. I'm trying to render a scene with many instanced geometries using delayed load. All works fine, but it takes 2 minutes loading the instances (6000+), and only few seconds to render. I'd like to know if I can load the geometries once, and not reload everything at each frame. Nothing is animated except for the camera. In the interactive render, once I load the geometries I can move the camera and lights around and it updates very quickly, but as soon i change the frame it needs to recalculate. Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted June 9, 2011 Share Posted June 9, 2011 How are you loading the geometry? Is there a cache per frame or is there a single cache that is not frame dependent? Using delayed load or embedding the geometry into the IFD? Also the operating system could make a difference, buffer cache versus no buffer cache. Quote Link to comment Share on other sites More sharing options...
MENOZ Posted June 9, 2011 Author Share Posted June 9, 2011 I'm using a delayed load, a bgeo for the geometry and the ifd for materials. it's static, donesn't change per frame, not frame dependet. the only thing that is moving is the camera. I'm on win7 64 bit. I don't know about the buffer cache. what do you mean? Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted June 9, 2011 Share Posted June 9, 2011 I'm using a delayed load, a bgeo for the geometry and the ifd for materials. it's static, donesn't change per frame, not frame dependet. the only thing that is moving is the camera. I'm on win7 64 bit. I don't know about the buffer cache. what do you mean? Be sure that the "share geometry" check box is on for the delayed load shader. Windows 7 has a buffer cache of sorts so reading anything from disk again shouldn't slow things down too much. It basically stores any recent file transactions in "unused" memory to speed things up in case the files are read again. When rendering watch the processor usage. If it sits idle for long periods of time it is probably reading in geometry but if it stays constant for most of the time then something else is probably slowing it down like displacements. Quote Link to comment Share on other sites More sharing options...
MENOZ Posted June 9, 2011 Author Share Posted June 9, 2011 (edited) share geometry is on, I have no displacement, i tried without shaders and it's make no difference. I tried to modify the buffer but it's the same. I will dig into it.. In the verbosity I read a long "loading geometry" list, one for each instanced point. Maybe he's making connection between the cached geometry file and the scattered points..?? It seems that more or less only one processor is working in this phase, general cpu usage is around 12%. it's a pity Edited June 9, 2011 by MENOZ Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted June 9, 2011 Share Posted June 9, 2011 If the geometry is fairly light, like 1,000 polygons per instance then it might be faster to just create one monolithic cache instead of instances. It might also be worth sending the scene to support to see if they can isolate the bottleneck. Quote Link to comment Share on other sites More sharing options...
Netvudu Posted June 9, 2011 Share Posted June 9, 2011 Hi, just to add another thing to try before falling into despair...do you have any random attributes affecting your instances, such as color or scale? If that´s the case, why don´t you try for different fixed (but varied) values instead of true random values... ...in case I didn´t explain myself properly, I´m suggesting using 5, 8, 10, or whatever number of versions, instead of true random parameters that make for 100s of different versions of the original geometry. I´m pretty sure the RAM hit for the prior situation is way lower than the latter, and visually it´s not that different. Quote Link to comment Share on other sites More sharing options...
symek Posted June 9, 2011 Share Posted June 9, 2011 It's a two minutes of Mantra time or Houdini time? 6000 instances would take a lot of time to export depending on params complexity. Mantra should operate faster. Quote Link to comment Share on other sites More sharing options...
Jason Posted June 9, 2011 Share Posted June 9, 2011 You could write ascii IFDs and try to hack something by redefining the object transform and camera info, along with ray_image filename, and then calling ray_raytrace for each one before a ray_quit? Quote Link to comment Share on other sites More sharing options...
MENOZ Posted June 10, 2011 Author Share Posted June 10, 2011 [...] file procedural: /obj/geo1:6699 loading geometry F:/.../palm.bgeo file procedural: /obj/geo1:6700 loading geometry F:/.../palm.bgeo file procedural: /obj/geo1:6701 loading geometry F:/.../palm.bgeo file procedural: /obj/geo1:6702 loading geometry F:/.../palm.bgeo file procedural: /obj/geo1:6703 loading geometry F:/.../palm.bgeo file procedural: /obj/geo1:6704 loading geometry F:/.../palm.bgeo Load Time: 1:51.25u 0.889s 2:15.66r Memory: 344.35 MB. VM Size: 535.88 MB Render Time: 2:03.537u 0.936s 2:30.32r Memory: 604.28 MB. VM Size: 701.15 MB Peak Geometry Objects: 4 this is what I get from the houdini console. @Netvudu yes I tried to remove all stamping and all attributes, nothing change. I never had a RAM HIT. @SYmek from the window task manager I see that is the mantra process that is working. I tried to delay load a single sphere, and it takes a little less time, but always too much. The problem is that it reload everything at each frame @Jason I don't know what are you talkin about, I've never done it before. You mean an IFD od the scene that scatter points and calls the external geometry, or the ifd of the instanced geometry? I'll try do open an ascii ifd for now and see.. Quote Link to comment Share on other sites More sharing options...
symek Posted June 10, 2011 Share Posted June 10, 2011 (edited) [...] file procedural: /obj/geo1:6699 loading geometry F:/.../palm.bgeo file procedural: /obj/geo1:6700 loading geometry F:/.../palm.bgeo file procedural: /obj/geo1:6701 loading geometry F:/.../palm.bgeo file procedural: /obj/geo1:6702 loading geometry F:/.../palm.bgeo file procedural: /obj/geo1:6703 loading geometry F:/.../palm.bgeo file procedural: /obj/geo1:6704 loading geometry F:/.../palm.bgeo Load Time: 1:51.25u 0.889s 2:15.66r Memory: 344.35 MB. VM Size: 535.88 MB Render Time: 2:03.537u 0.936s 2:30.32r Memory: 604.28 MB. VM Size: 701.15 MB Peak Geometry Objects: 4 this is what I get from the houdini console. Instancing 6000 delay loaded sphere takes on my laptop 9 seconds for export an IFD and 2-5 seconds for Mantra to load it depending on whether I use bounding boxes, share geometry and so on. Your geometry is shared so it should be a snap. There is something wrong here. Is your geometry on a network drive by any chance? Could you move it locally for a test? @Jason I don't know what are you talkin about, I've never done it before. You mean an IFD od the scene that scatter points and calls the external geometry, or the ifd of the instanced geometry? I'll try do open an ascii ifd for now and see.. I suppose Jason talks about hacking IFD and using Mantra capability to render once loaded IFD many times from different cameras. AFAIK it was introduced to support IPR and perhaps stereo setups. You would need to manually prepare your IFD file. Edited June 10, 2011 by SYmek Quote Link to comment Share on other sites More sharing options...
MENOZ Posted June 10, 2011 Author Share Posted June 10, 2011 No the geometry is local. I try to change the hard disk... I have some doubt about the bgeo file that i'm loading. I use mantra archive to generate a sphere.bgeo and sphere.ifd (that contains materials) Is this procedure correct? what do you mean "export an IFD?" you do in that way? or mantra does it automatically when launching the render? I don't know if I should set a mantra node, and in the main tab set "disk file" to write out a ifd of my sphere. But in delayed load I can load only bgeo, obj.. not ifd (for the geometry). Quote Link to comment Share on other sites More sharing options...
MENOZ Posted June 10, 2011 Author Share Posted June 10, 2011 I've got a reply from sidefx. share geometry works between points but not between frames. The only way is to hacking the IFD, as Jason wrote. By the way it's strange that it takes so much on my pc. I'll do some other test on this. Quote Link to comment Share on other sites More sharing options...
MENOZ Posted June 12, 2011 Author Share Posted June 12, 2011 Hello. I'd like to make an occlusion pass of my delayed load geometry. I could modify every shader that compose my scene so that it export an occlusion vex variable and I can render it with image planes. But it's not very handy. I would prefer render a different take with an override on materials, but if I want to render a different take I would need a different Mantra node, and it needs to reload again all the scene. How can I do? Quote Link to comment Share on other sites More sharing options...
Jason Posted June 14, 2011 Share Posted June 14, 2011 How can I do? This exact thing is one of the major reason behind the invention of Python Filtering. There is an almost exact example of what you might need on this page: http://www.sidefx.com/docs/houdini11.0/rendering/python Be aware that you can change the destination image name on the mantra command line or by performing a property override for the output image in your PyFilter. Note: you must be using a fairly recent version of Houdini 11 -- Houdini 10.0.736: Fixed a problem with python filtering of the "image:filename" setting. It should now be possible to change the image filename using python filtering. 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.