Popular Post MoltenCrazy Posted December 3, 2018 Popular Post Share Posted December 3, 2018 (edited) With the help of both the Redshift community and resources here, I finally figured out the proper workflow for dealing with Redshift proxies in Houdini. Quick summary: Out of the box, Mantra does a fantastic job automagically dealing with instanced packed primitives, carrying all the wonderful Houdini efficiencies right into the render. If you use the same workflow with Redshift, though, RS unpacks all of the primitives, consumes all your VRAM, blows out of core, devours your CPU RAM, and causes a star in nearby galaxy to supernova, annihilating several inhabited planets in the process. Okay, maybe not that last one, but you can't prove me wrong so it stays. The trick is to use RS proxies instead of Houdini instances that are in turn driven by the Houdini instances. A lot of this was based on Michael Buckley's post. I wanted to share an annotated file with some additional tweaks to make it easier for others to get up to speed quickly with RS proxies. Trust me; it's absolutely worth it. The speed compared to Mantra is just crazy. A few notes: Keep the workflow procedural by flagging Compute Number of Points in the Points Generate SOP instead of hard-coding a number Use paths that reference the Houdini $HIP and/or $JOB variables. For some reason the RS proxy calls fail if absolute paths are used Do not use the SOP Instance node in Houdini; instead use the instancefile attribute in a wrangle. This was confusing as it doesn’t match the typical Houdini workflow for instancing. There are a lot of posts on RS proxies that mention you always need to set the proxy geo at the world origin before caching them. That was not the case here, but I left the bypassed transform nodes in the network in case your mileage varies The newest version of Redshift for Houdini has a Instance SOP Level Packed Primitives flag on the OBJ node under the Instancing tab. This is designed to basically automatically do the same thing that Mantra does. It works for some scenarios but not all; it didn't work for this simple wall fracturing example. You might want to take that option for a spin before trying this workflow. If anyone just needs the Attribute Wrangle VEX code to copy, here it is: v@pivot = primintrinsic(1, “pivot”, @ptnum); 3@transform = primintrinsic(1, “transform”, @ptnum); s@name = point(1, “name_orig”, @ptnum); v@pos = point(1, “P”, @ptnum); v@v = point(1, “v”, @ptnum); Hope someone finds this useful. -- mC Proxy_Example_Final.hiplc Edited December 3, 2018 by MoltenCrazy 7 3 Quote Link to comment Share on other sites More sharing options...
DaJuice Posted December 6, 2018 Share Posted December 6, 2018 Thanks for sharing, I'm sure that will save somebody a headache at some point. Quote Link to comment Share on other sites More sharing options...
Daryl Dunlap Posted December 6, 2018 Share Posted December 6, 2018 Redshift 2.6.28 added support for rendering Packed Primitives and instancing them. The next Redshift release will take this a step further, and add support for Automatically Instancing SubNets as well. Quote Link to comment Share on other sites More sharing options...
JH12 Posted February 6, 2019 Share Posted February 6, 2019 On 12/7/2018 at 9:16 AM, Daryl Dunlap said: Redshift 2.6.28 added support for rendering Packed Primitives and instancing them. The next Redshift release will take this a step further, and add support for Automatically Instancing SubNets as well. So does that make the above instruction now irrelevant? Quote Link to comment Share on other sites More sharing options...
tricecold Posted February 20, 2019 Share Posted February 20, 2019 (edited) Hello, I have questions regarding proxies as well, I am trying to optimize the sh*t out of my night city scene, I have tried mesh lights and instanced lights, the problem is I dont know how much I can bake per instance, which is like one building. RS render node outputs very small proxy files, is it because it's referencing to instanced proxies. Can't I do a nice proxy of one building with baked GI, ( not UV based, Irridiance PC) and instance that back? Can we also include the lights in proxies, is there any workflow or tutorial for this. I don't need to render everything as one pass, u would probably divide it to 10 layers and deep comp afterwards. Just a bit lost here, very new to redshift Edited February 20, 2019 by tricecold Quote Link to comment Share on other sites More sharing options...
Midphase Posted February 20, 2019 Share Posted February 20, 2019 Tim, I would highly recommend that instead of here or FB, you post this question on the Redshift forum under the Houdini Bugs section (even though it's not a bug). Juanjo is highly knowledgeable of Redshift in Houdini and he's always replying within minutes. I'm looking for the official answer as well since I'm all about optimizing Redshift renders! P.S. Welcome to the Redshift family, hopefully you like it and stick with it, and hopefully you'll consider doing some of your tutorials using Redshift as the rendering engine! Quote Link to comment Share on other sites More sharing options...
tricecold Posted February 21, 2019 Share Posted February 21, 2019 (edited) Yes , I got a pretty fast reply , although the documentation also suggests mesh lights to be in closer groups spacially. I already have a solution but it's not practical, I can render each section seperately and deep comp after. The other thing that's bugging me is how to control trace sets in a smarter way , can it be driven by detail attributes for example, because I have 50 instanced proxies, so practically I have one object, what if I want to trace based on an ID, for example trace against each other in this group of instances that has a matching attribute value. I keep experimenting, finding better values and all that. I am still stuck at baking Irridiance point cloud into the proxy for example. How do I make Houdini load a specific Irridiance point cloud per instance of proxy etc. And yes, I am doing my last tutorial with redshift that's why I got it, although I will have to do a simple mantra switch along with it. Edited February 21, 2019 by tricecold Quote Link to comment Share on other sites More sharing options...
reeson Posted March 1, 2019 Share Posted March 1, 2019 I have a question about materials. You need to setup those before you do a RS proxy render, right? Quote Link to comment Share on other sites More sharing options...
Sepu Posted March 2, 2019 Share Posted March 2, 2019 you can add them and then override them as well, so is pretty flexible. Quote Link to comment Share on other sites More sharing options...
Kokosing Posted July 17, 2019 Share Posted July 17, 2019 Hi, has anyone tried this with VDBs? I’m getting a crash every time I try to export a VDB to .rs. Quote Link to comment Share on other sites More sharing options...
Dusmus Posted October 9, 2019 Share Posted October 9, 2019 Hey guys, I have animated rs proxies that I need to instance on points. Does anyone know if there a attribute similar to the "abcframe" on alembic to randomize the rs sequence starting frame per point ? Thanks ! S Quote Link to comment Share on other sites More sharing options...
rtr033000 Posted November 15, 2019 Share Posted November 15, 2019 On 10/9/2019 at 11:30 AM, Dusmus said: Hey guys, I have animated rs proxies that I need to instance on points. Does anyone know if there a attribute similar to the "abcframe" on alembic to randomize the rs sequence starting frame per point ? Thanks ! S Also curious about this. Quote Link to comment Share on other sites More sharing options...
ch3 Posted October 28, 2020 Share Posted October 28, 2020 To use a sequence of .rs proxies, you just have to manually set the right frame on each instance in the s@inceancefile attribute. I use the code bellow to randomly pick a proxy out of a sequence of variations. // ../file_<v>.<f>.bgeo.sc string version = sprintf("v%03d", chi("version")); string frame = sprintf("%04d", int(fit01(rand(i@ptnum),chi("fMin"),chi("fmax")+1)) ); s@instancefile = chs("path"); s@instancefile = re_replace("<v>", version, s@instancefile, 0); s@instancefile = re_replace("<f>", frame, s@instancefile, 0); I guess if you want to cycle the an animation, you can modify the vex to something like that // ../file_<v>.<f>.bgeo.sc string version = sprintf("v%03d", chi("version")); //string frame = sprintf("%04d", int(fit01(rand(i@ptnum),chi("fMin"),chi("fmax")+1)) ); int f = int( @Frame + (rand(i@ptnum)*100) ); f = ((f-chi("fMin")) % (chi("fmax")-chi("fMin"))) + chi("fMin"); string frame = sprintf("%04d", int(f) ); s@instancefile = chs("path"); s@instancefile = re_replace("<v>", version, s@instancefile, 0); s@instancefile = re_replace("<f>", frame, s@instancefile, 0); 2 Quote Link to comment Share on other sites More sharing options...
GlennimusPrime Posted November 2, 2021 Share Posted November 2, 2021 Thank you @ch3! I have been searching for a solution to randomly looping a Redshift proxy file for so long now. I've only just stumbled upon this page now. Love your work! 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.