Convert Figure to Props Script

http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/nodes/convert_figure_to_props/start

I recently found this script from a forum search in here, it really got me out of a bind too.The scene I had just refused to render, giving me the same out of memory entries on the log (RTX3060 12GB). This script reduced the memory required by a lot. However, during the conversion process I found that the Tear Jerker items I used on the original models had gone. Everything else was perfect. As to why the original scene suddenly consumed so much memory, it'll be my fault somewhere. I'll figure that out...eventually.

I'm pretty new to DAZ3D and do not have enough experience with it to understand what the script is doing, but I am curious as to whether it is even possible to include items such as Tear Jerker in the conversion.

I'm just fishing for information, out of general curiosity. Any thoughts or opinions would be great.

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,774

    It is turning all the figures (posable items) into props (static items). That gets rid of the joints, all of which have at least one weight map (a list of values associated with the vertices that make up the model's base shape, saying how much that joint should affect each) so that greatly reduces the amount of data in memory. The joint data isn't passed to Iray (all it needs is the final mesh shape) but it may have been that you were runnign out of system memory in preparing the scene  for rendering, which would have been helped by the reduction in system load for the base scene.

  • SofaCitizenSofaCitizen Posts: 1,881

    I am not familiar with that script so I don't know if it just does the same thing as the Edit->Rigging->Convert Figure to Prop menu option or not - however, I don't think I have seen that listed as a option for optimising scenes. Tear Jerker uses Geoshells - I am not sure whether they work on non-figures so that might be why they are being removed.

    As for optimising scenes you are probably better focusing on products that are designed for that purpose such as Camera View Optimiser, Scene Optimiser and the various Resource Saver shaders etc.

  • Richard Haseltine said:

    It is turning all the figures (posable items) into props (static items). That gets rid of the joints, all of which have at least one weight map (a list of values associated with the vertices that make up the model's base shape, saying how much that joint should affect each) so that greatly reduces the amount of data in memory. The joint data isn't passed to Iray (all it needs is the final mesh shape) but it may have been that you were runnign out of system memory in preparing the scene  for rendering, which would have been helped by the reduction in system load for the base scene.

    Thanks for the explanation Richard. The idea that it's bailing out at preparing the scene make a lot of sense to me. 

  • SofaCitizen said:

    I am not familiar with that script so I don't know if it just does the same thing as the Edit->Rigging->Convert Figure to Prop menu option or not - however, I don't think I have seen that listed as a option for optimising scenes. Tear Jerker uses Geoshells - I am not sure whether they work on non-figures so that might be why they are being removed.

    As for optimising scenes you are probably better focusing on products that are designed for that purpose such as Camera View Optimiser, Scene Optimiser and the various Resource Saver shaders etc.

    I thought it might be something to do with geoshells. I'm learning...slowly!

    I use Scene Optimiser quite a lot for 'indoor' scenes, but I have a really bad habit of making large outdoor scenes (backgrounds, props, and character models (G8/G8.1) and get more than a little carried away at times. Can't really get Scene Optimiser to give me what I'm looking for with those, again probably the way I'm trying to use it (i.e. incorrectly!)

    Honestly thought I would get away with it this time as there were only two G8.1 characters, where the scene just before this one used all the same props, background, and 3 x G8.1 charcacters and outfits. It rendered ok and quite quickly. The only addition was the TJ geoshells on the characters. Obviously I screwed up somewhere. 

    I'll check out Camera View Optimiser and the Resource savers you mention. Thanks for that.

  • SofaCitizenSofaCitizen Posts: 1,881

    Well, there is a lot to learn so it definitely takes time. I am only 1 year in myself so still have plenty to learn also.

    I also tend to do more "busy scenes" myself so I do know the pain of hitting the VRAM limits. Depending how you are loading the scenes, Camera View Optimiser might work for you as it can either hide or delete objects that are not visible within the cameras view. If you are using a preloaded environment scene then this can be very handy since it is likely that you are only using part of it anyway so you can run the script to hide the other parts.

    I have a RTX3080 myself but that only has 10GB. Even so, I have often rendered scenes with 4 different G8 figures - each with their own clothing and hair. The second-to-last one I did had 3 G8s and 2 G3s and as far as I believe G3s and G8s are not too different in terms of resources used. So it should be entirely possible for you to do what you are wanting with a little bit of work.

    I am far from an expert with Scene Optimiser, but usually I will first run the 2x reduction on all the textures since a busy scene usually means everything is a little further from the camera than what it is optimised for. Then run it again and sort by distance and 2x reduce the items that are far away from the camera since those are going to be fuzzied by the DOF anyway. There are many more options you can use, but these tend to be enough so far for me.

    In addition to what I mentioned before, there are some other options you can use when building your scenes. Take advantage of using Node Instances instead of copies where you can - since these do not take up extra memory (other than a little overhead) at the expense of having the same texture and pose (where relevant).  There is also the option of using Billboards (digital "cardboard cutouts") to fill a scene with background characters as and when you can get away with it. These do take some work and skill to make them not stand out as being fake, depending where and how they are positioned.

    Other possible options are earlier generation figures - I "THINK" G1 and G2 are less resource hungry. So these could be utilised for background figures where a billboard would be too obvious.

    Then, there is the other option which I haven't needed yet - but definitely will do soon - and that is to render the scene in chunks/parts. This could be as simple as temporarily hiding the foreground characters and rendering the background and then after that is done, unhiding the foreground figures & hiding the background to render a second file (ensuring this is saved as a PNG). These files can then be overlaid in a graphics editor. It's probably more complicated than that but there will be other threads on it that I will read up on before attempting it.

Sign In or Register to comment.