Understanding DAZ Studio Instancing

SnowSultanSnowSultan Posts: 3,680
edited November 2014 in The Commons

I'd just like to see if I understand all of the things that Instancing can do in DAZ Studio. Hopefully Richard or anyone else who knows more can chime in and share more information (and correct me if I'm wrong).


- You can instance props and then reposition and resize them, but you CANNOT change their materials or morph them independently.

- You can instance figures, but you CANNOT change the instanced figures' poses, morphs, or materials (which kinda makes this useless unless you want a bunch of figures all posed the same way).


Can someone explain what Edit -> Figure (or Object) -> Instances... -> Break Instance Group does? It sounds like it would be a way to force the instances to stop obeying the original, but it doesn't seem to do anything for me.

Is there also a way to randomly distribute the instances when creating a bunch of them at once, or do they always appear in formation?


Thanks in advance for any help.

Post edited by SnowSultan on

Comments

  • srieschsriesch Posts: 4,243
    edited December 1969

    Can't answer all of your questions, but just wanted to say that while it is correct that you can't change the materials, poses, morphs, etc. of instances (any changes you make to the original are also applied to all instances), you CAN adjust the scale of an instance. This will allow you to make the minor cheat of setting the X scale to -100, allowing you to mirror a pose, which combined with a different position and rotation in your scene may allow you to make it look kind of like a different pose. However in general yes, instancing is for identical things.

    Also research geoshells.

    A way to randomly distribute the instances would be awesome, I wish there was one. Actually I like Bryce's ability to paint instances onto a terrain, it's handy to be able to just crank a slider up to 150 and adjust the randomness a bit and plunk down a forest instanced from a tree or a field instanced from a glass clump. Wish I could do that in DS too.

  • araneldonaraneldon Posts: 712
    edited December 1969

    Some plugins help with this (LAMH, Infinito), and then there's tofusan's script. Haven't used any of these yet.

  • BlackFeather1973BlackFeather1973 Posts: 739
    edited December 1969

    With 'Group Like Sibling Instances' you can group instances into one node, 'Break Instance Group' will turn that group back into individual instances.
    Not sure if there are options available for the formation, i usually generate and distribute instances via scripting (you can see some examples in my fun with scripts thread) .

  • SnowSultanSnowSultan Posts: 3,680
    edited December 1969

    Sorry, I wasn't receiving notices on this thread. Thank you for the suggestions. That Replicator script from tofusan is great, it's very easy and not only does it scatter randomly, you can randomize the sizes too (great for foliage). :)

  • RGcincyRGcincy Posts: 2,839
    edited December 1969

    Tofusan's script works well. This image was done by parenting two leaf objects to a (now hidden) sphere, than running the script. Did a quick and good job distributing the leaves randomly around the sphere surface.

    ShapeMagic_blowing_leaves.jpg
    674 x 826 - 444K
  • HavosHavos Posts: 5,435
    edited March 2015

    Another trick I have done to make instances look less alike is to dress them in different clothing. This was done by converting various clothing items (actually it was armour) to props fitting the pose of the instanced figure. In my scene there were numerous M4 skeleton figures (all converted to props after posing to reduce the memory size), I then added helmets, shield, pieces of armour, and different weapons to the various instances, as well as obviously posing each instance at different angles. This made the skeleton hoard seem less like a bunch of similar figures and more like an attacking army of individuals.

    Post edited by Havos on
  • crifmer_a3ace2ba16crifmer_a3ace2ba16 Posts: 37
    edited December 1969

    Hi guys, hope you don't mind if I jump in here with questions...

    So making an instance will save processing/render time because it just does calculations for the original, and just reuses those calculations, right?

    So if the geometry is not really there, will instances play with light correctly? If I instance a light, it will render all the instanced light sources as "real" light sources, right? What about shadows? Will an instanced object still block light and create proper shadows?

    I guess I'm just hung up on the "it's not really there" aspect. I went looking in the wiki for info about instances, but couldn't really find anything.

    Now to go looking for stuff on geoshells.

  • HavosHavos Posts: 5,435
    edited December 1969

    crifmer said:
    Hi guys, hope you don't mind if I jump in here with questions...

    So making an instance will save processing/render time because it just does calculations for the original, and just reuses those calculations, right?

    So if the geometry is not really there, will instances play with light correctly? If I instance a light, it will render all the instanced light sources as "real" light sources, right? What about shadows? Will an instanced object still block light and create proper shadows?

    I guess I'm just hung up on the "it's not really there" aspect. I went looking in the wiki for info about instances, but couldn't really find anything.

    Now to go looking for stuff on geoshells.

    My understanding is (and I may well be wrong), that the main benefit of instancing is that it saves memory. The mesh and related textures need only be held in memory once, and for human figures in particularly this can be very important. A dressed Genesis figure can easily need 1 GB, so if you want 20 of these in the scene, unless you have a lot of memory in your machine this would be difficult, or indeed impossible. However if the figures were instanced, for example you want a line of soldiers, this would reduce the memory requirements drastically.

    Once you are rendering, the renderer has to consider a real instance of each figure in each position for the purposes of shadows on that figure, and shadows it may cast itself, so apart from any preprocessing of the textures, I doubt the render would be much faster if you used instances or not. The exception to this would be if the memory you needed to hold the scene and to render, exceeded the memory you had in your box, then a lot of swapping between main memory and disk would occur during the render, and this would naturally slow down the render.

    I hope this helps

  • crifmer_a3ace2ba16crifmer_a3ace2ba16 Posts: 37
    edited December 1969

    I think I understand. So if the main benefit is memory, would instancing help with working with the scene? For instance, I start running slow when I've got a lot of stuff in the scene and hiding everything I'm not actively working on makes it faster. Would instancing serve the same purpose? You use less memory, so the computer runs faster while working on the scene and you don't have to hide stuff.

    From what you describe, I don't think instancing is really worth it for me for now, but if I can wrap my head around it, it may be useful later on.

  • RGcincyRGcincy Posts: 2,839
    edited March 2015

    You can test it to see if it helps you. Just select an object in your scene, go to menu Create-New Node Instances and put in 10 or 20 instances, See how that affects the speed of moving around your scene and rendering.

    As a quick test, I loaded a prop with 6000 polygons and made 600 instances of it (that's a total of 3.6 million polygons). It took some time for Daz Studio to do the replication and respond (it went white for about 30 seconds, then came back). After that, no problem moving around the scene in the viewport. With no shader added, it took less than 4 seconds to render all 600 shields. With a metallic shader and a ground plane with texture, 18 seconds. See image.

    Shields_instances_2.jpg
    1250 x 750 - 652K
    Post edited by RGcincy on
  • HavosHavos Posts: 5,435
    edited December 1969

    crifmer said:
    I think I understand. So if the main benefit is memory, would instancing help with working with the scene? For instance, I start running slow when I've got a lot of stuff in the scene and hiding everything I'm not actively working on makes it faster. Would instancing serve the same purpose? You use less memory, so the computer runs faster while working on the scene and you don't have to hide stuff.

    From what you describe, I don't think instancing is really worth it for me for now, but if I can wrap my head around it, it may be useful later on.

    For instancing to be of benefit, it would be necessary to have a number of identical objects in the scene. Examples of this include trees in a forest, or maybe small plants covering an area on the floor. For trees you might select 3 different looking trees, instance them 10 times each, and then scatter them around with smaller plants around the base (also instanced). This would get you a nice looking forest which would not be too taxing on your memory resources.

    Of course if your scene consisted of 10 human characters sitting around a conference table, you could instance the chairs, but not the characters, as naturally you want them all to look different. As I mentioned above, the best way to save memory in this case, is to convert the character, and its clothing, to props as soon as you have finalised its pose. You can then load in the next character and so on.

  • FirstBastionFirstBastion Posts: 8,000
    edited March 2015

    I used DAZ instancing functionality with this set. When you need a couple hundred extras in the background computer memory resources become an issue quickly. It works for trees and vegetation props too. Vue, Carrara and Bryce all have that type of functionality too , but significantly more robust.

    http://www.daz3d.com/a-distant-army-approaches

    00-main-a-distant-army-approaches-daz3d.jpg
    960 x 1248 - 263K
    Post edited by FirstBastion on
  • crifmer_a3ace2ba16crifmer_a3ace2ba16 Posts: 37
    edited December 1969

    Thank you for the help, everyone. As my comic will eventually have outdoor scenes, I think instancing will come into play later down the road.

    These first, er... hundred pages or so all take place in a tavern. I've got five lanterns hanging from the ceiling, and over ten of a certain candle. Then I'll have a bunch of coins flying around during a card game.. a few tables, some stools... Iots of tankards... I'll see what I can instance, just for practice, and see if cutting down the number of incidental props helps at all. Can't do much about the people.

    You guys have helped a lot. :)

    I'm sure I'll be back in another thread about geoshells. :) Gonna go look them up shortly.

  • I recent purchased a product that uses Instances to create rock formations (caves, rock piles, ect.) I use a lot of DAZ3D models for compositing in live-action video. So, I got really excited at the possibilities with these rock formations. I use Cinema 4D for my 3D work generally (or sometimes Element 3D for After Effects). So, generally, all I have to do with a model is export it as an .obj. In the case of animations, I'll export as an .fbx. 
     

    The problem I'm having with these rock formations is the Instancing does not carry over in the export. So, for instance, a cave set in DAZ3D exports as only the single rock model that the instancing was used upon. Is there a way to convert something utilizing Instances so that it exports as a the whole Instanced model, rather than the individual element(s)?

  • Not that I am aware of.

  • McGyverMcGyver Posts: 7,075

    Forgive this stupid question, since I haven't really used instancing in DS yet and I'm just now starting to read up on it.

    I'm finding a bunch of threads about it and other instance related plugins, but not finding specific mention of this sort of question...

    Can an instanced scene be saved as such?

    I have an old, rather large model I made (as a freebie), it's an island fortress of sorts and I started adding trees and vegetation, but it became instantly obvious that to get the look I was shooting for it would be a million megabytes pretty quick (probably not really, but still too huge to be practical or fun).

    My intention is not to require someone to own a specific plugin to use the instanced vegetation, hopefully just load the scene. 

    Is that possible?

     

    Thanks in advance, and sorry to dig up an old tread and also sorry if this is a stupid question... I'm not going to be able to use my 3D computer for a couple of days and at the moment I'm reading up on stuff on my iPad in my spare time.

     

    Thanks.

  • kaotkblisskaotkbliss Posts: 2,914

    I have a question on instancing :)

    If you create an instance of an object and then duplicate the instance (edit->duplicate->duplicate node) is it exactly the same as the instance or is it actually a duplicate of the original and adding to the scene's total geometry count?

  • Richard HaseltineRichard Haseltine Posts: 104,121

    Yes, instances are a built-in feature of DS and are saved in scene files. The scripts just make it easier to set a scene up using isntances, they are not needed at render-time. You do need to remember to incoude a preset, or to tell your users, to set Instance optimisation to Memory instead of Performance though (Render Settings with Iray the active engine).

  • HavosHavos Posts: 5,435
    McGyver said:

    Forgive this stupid question, since I haven't really used instancing in DS yet and I'm just now starting to read up on it.

    I'm finding a bunch of threads about it and other instance related plugins, but not finding specific mention of this sort of question...

    Can an instanced scene be saved as such?

    I have an old, rather large model I made (as a freebie), it's an island fortress of sorts and I started adding trees and vegetation, but it became instantly obvious that to get the look I was shooting for it would be a million megabytes pretty quick (probably not really, but still too huge to be practical or fun).

    My intention is not to require someone to own a specific plugin to use the instanced vegetation, hopefully just load the scene. 

    Is that possible?

     

    Thanks in advance, and sorry to dig up an old tread and also sorry if this is a stupid question... I'm not going to be able to use my 3D computer for a couple of days and at the moment I'm reading up on stuff on my iPad in my spare time.

     

    Thanks.

    Yes instances will be saved, and then restored when you reload the scene. Note that even if you created the instances using one of the instance population scripts for sale here, you could still save them, and others will be able to read the scene, even without owning the plug-in you used. They would naturally have to own all the products used in the scene.

    Remember if you are rendering with Iray then it is best to use the optimization type "Memory" rather than "Speed" as this make it use less memory during rendering, and consume less VRAM of the video card.

  • StratDragonStratDragon Posts: 3,253

    Plese dumb this down for McGyver. Thank you.

    Also how do I make this thing do that thing.

  • selias19selias19 Posts: 253

    Instances are very useful. I use them all the time. Books in a bookshelf for example are easily done. Or lamps or candles in a room. Like it was said, just rotating them a bit or, with the books, make them larger or smaller and they look differently. Of course they have to be in the background, the titles should not be readable. I have several scene-subsets saved with for example a filled bookshelf so I can merge it with a scene easily.

  • ArtiniArtini Posts: 9,805

    UltraScatter can randomly spread out instances and allow to use different maps for placement.

    https://www.daz3d.com/ultrascatter-advanced-instancing-for-daz-studio

     

  • McGyverMcGyver Posts: 7,075
    Havos said:
    McGyver said:

    Forgive this stupid question, since I haven't really used instancing in DS yet and I'm just now starting to read up on it.

    I'm finding a bunch of threads about it and other instance related plugins, but not finding specific mention of this sort of question...

    Can an instanced scene be saved as such?

    I have an old, rather large model I made (as a freebie), it's an island fortress of sorts and I started adding trees and vegetation, but it became instantly obvious that to get the look I was shooting for it would be a million megabytes pretty quick (probably not really, but still too huge to be practical or fun).

    My intention is not to require someone to own a specific plugin to use the instanced vegetation, hopefully just load the scene. 

    Is that possible?

     

    Thanks in advance, and sorry to dig up an old tread and also sorry if this is a stupid question... I'm not going to be able to use my 3D computer for a couple of days and at the moment I'm reading up on stuff on my iPad in my spare time.

     

    Thanks.

    Yes instances will be saved, and then restored when you reload the scene. Note that even if you created the instances using one of the instance population scripts for sale here, you could still save them, and others will be able to read the scene, even without owning the plug-in you used. They would naturally have to own all the products used in the scene.

    Remember if you are rendering with Iray then it is best to use the optimization type "Memory" rather than "Speed" as this make it use less memory during rendering, and consume less VRAM of the video card.

    Thank you for the answer. 

    And like I said, I know it was probably a pretty stupid question, but I sort of thought this was possible or sure if it required a special merchant resource script or something like that. 

    Some of the threads I read sort of implied this was possible, but didn't directly say so...but since I wasn't sure, I didn't want to start experimenting with this if it wasn't something simple or costly for others to use. 

    Thank you very much for your patience and time.

  • mavantemavante Posts: 734
    sriesch said:

    you CAN adjust the scale of an instance. This will allow you to make the minor cheat of setting the X scale to -100, allowing you to mirror a pose, which combined with a different position and rotation in your scene may allow you to make it look kind of like a different pose.

    I'm trying to do an animation using two instance of a girl character, so I have three "girls" as background singers. It so far is working great to turn the two instanced girls so each is slightly facing the "real" girl in the middle, and then animate the real girl to different poses. The three of them move in better sync than a Busby Burkeley production! So I tried your trick of making the X scale of one of the instances to -100—and she turned totally black! Anybody have any idea why? It would have been ideal to have "her" mirror-imaging the one across from her. Are there any other ways to mirror-image an instance of a figure while maintaining it as an instance?

    Havos said:

    Another trick I have done to make instances look less alike is to dress them in different clothing. This was done by converting various clothing items (actually it was armour) to props fitting the pose of the instanced figure..

    This sounds great for a still image, but I suppose it will not help me at all in having pose-animated instances wearing different dresses.

    The "gurrells" don't look bad all dressed alike, but I wanted them to at least have different hair. I think I am stuck with having three exact clones (I mean in the traditional sense) moving in exactly the same way, or I am going to have to break down and buy another computer, because there is no way I can fit three decked-out G8 girls into a scene with architecture/scenery. I can smell blue smoke just typing about it.

Sign In or Register to comment.