Instancing
Roygee
Posts: 2,247
Hi all :)
I'm making some progress - made a reasonable terrain with a river running through it (water plane intersecting terrain) Now I want to populate it with some trees - the process is straightforward enough - the problem I'm having is how to paint on the terrain without including the underwater part, as there is no 3D view in the instancing lab.
In the video I'm following, he has blank gaps in the terrain mesh where his lake is - see attached, so he can see where not to paint.
How to get those gaps? I thought that by booleaning the terrain with a flat one to match the water plane, this would do it, but it just shows as a square overlaid mesh in the instancing lab.
Instance.jpg
1024 x 768 - 111K
Comments
interesting - never seen this
I would like to know how he made it too
I just make the trees - then delete what I don't want
@Roygee - the Instancing Lab is still a mostly white part on my Bryce map. However, others have mastered it. There are 2 PDF tutorials on my website (see sig). Go to Bryce Documents > Guests > Objects. Start with "How to use the Instancing Lab in Byce 7.1 Pro — A complete tutorial by Rashad Carter" and continue with "Instancing Lab Tutorial Parts 1 to 6 Completed by Kine_magiK". I'm not putting the links here, the 6-part tutorial is 34 MB.
so you can do this ?
@bigh - hehe, no. I only assembled the tutorials and made them available. Of course, I read through them and have an idea, but I haven't experimented in earnest with the IL yet. It's on the 2doList.
I found a bug in Bryce while trying to do what he asked .
After all this time .
You just never know do you .
I haven't actually read any tutorials. I just experiment and play, as is my normal habit.
These are taken form my latest landscape image
Terrain in terrain editor
Terrain in instancing lab
Terrain from above with trees painted
and the finished image. The terrain I put the trees on is the grassy one, it is a duplicate of the beach one just edited around the edge to allow the beach to show and raised by a very tiny tad on the Y axis.
Yes, the way to do it is to use the clip filter in the terrain editor. Bring up the red bracket from the bottom to cut off the lowermost section (in your case, the part of the landscape which is to be below the water. After you have instanced, you can move the bracket back down to reintroduce your lake bed if it's needed.
I think it also shows and works correctly if you have Bryce set to not show what is under the ground plane and you use the ground plane as your water surface. EDITED TO ADD: It looks like that's what Chohole has done in her scene above.
Hope this helps.
Exactly, thanks for adding that Dave, I have my set up as you say, (WireFrame underground off)
And yes my water is the ground plane with David's North sea water mat, came out quite well in this scene.
good show and tell
Thank you all so much - got it sorted, thanks to your help. I'll certainly use Rashad's tut :)
Here's my first effort. Actually trying to re-create a scene I rendered in Carrara, from a heightmap I made in Bryce - coming full circle!
The first is the Bryce render and the second the Carrara one.
I was going to say I've seen that type of result when the terrain, or portions of it, are below ground. Roy, those two scenes are nice.
Thanks, Gussnemo :) It's a start and i am becoming more comfortable, but still a long, long way to go!
Fortunately, there are so many great tuts available - just not enough hours in the day to watch, absorb and still have a life :)
@Roygee: I think been there, done that, am still doing that fits in with your findings, Roy. I more comfortable using a lot of Bryce's features than I once was, but still have so much to learn.
Roygee,
I'm so annoyed right now. I spent well over an hour preparing a response to get you going but the forum ate it, its gone now. and I'm gonna have to rebuild some of it.
I'm so glad to see you are working with Bryce and especially the Instancing Lab. Admittedly, Bryce 7.1 is the first version to implement a feature such as this and for that reason the feature is quite incomplete, still very immature compared to the elegant Surface Replicator system in Carrara. Still with understanding, the Bryce Instance Lab can do great things. A few things to keep in mind as you study:
1. The Preview window of the Instance Lab only displays polygons which have an altitude higher than 0.00 in the Bryce world. Polygons below 0.00 are not displayed, but that does not mean that instances cannot be painted onto those areas, that is why terrain clipping is the only way to be certain no instances end up in areas where they are unwanted. Removing unwanted instances manually has many shortcomings including leading to possible crashes, so its best to avoid painting into unwanted areas in the first place.
2. Grouped Objects don't rotate properly in the Instance Lab due to a nasty bug such that once you finish rendering you come to see that all of the instances of the group are facing in the exact same direction. The only solution is to create multiple versions of your original source object, each rotated slightly differently. You will then simply apply each as a unique brush source and paint away. It is also important to note that single mesh objects rotate just fine. So if you are dealing with OBJ models, it is best to consolidate them into single mesh objects whose material zones do not overlap on the page. If the group is imported as a single material zone, rotation in the IL remains consistent. I should also remind you that you can use instances as source models for further painting. This is a good idea at a time such as when working with groups.
Imagine for example you wanted to populate the Bryce scene with highly detailed (polygonal detail) pine trees you modeled in Carrara. For this example we will assume that Carrara exports this model in obj format with three material zones, base/trunk/leaves. When you import the obj into Bryce you will end up with a grouped model made of the three distinct material zones represented as individual mesh objects. Select the complete tree, then un-group it but keep the separate parts as an active selection. Then scroll down the Edit Menu (Edit next to File) and you will see there is an option near the bottom to Instance the current selection. When you apply this you will see a new instanced version of your original tree, all three parts in the proper relationship to one another. Simply group these instanced pieces together to create a new instanced whole which we will call Sample 1. Remember to go back and re-group your original tree. Now you have two version of the same complete tree. Give the original tree and the subsequent sample tree or trees unique rotation settings. Now when you enter the IL (Instance Lab) you will apply the Original and the Samples as unique source objects. The result when rendered will look like the original tree has properly been rotated by the IL. It is smart that Bryce allows instances as sources, If you would have had to replicate this high polygon tree the traditional way to create the rotated sources, you would waste lots of memory.
As mentioned earlier, single mesh objects rotate just fine so 99% of the time I consolidate my obj models from multiple material zones to a single material zone. When I import the tree into Bryce I will select the top option of Material as my import method, which allows Bryce to import the tree as a single mesh object. Clearly, this approach requires that you get all of your uv mapping completed before exporting from Hexagon. The material zones need to be free from any overlaps. I usually put my trunk materials on the left and my leaf materials on the right. Anyhow, once consolidated, the new single mesh tree will rotate as expected in the IL without any extra steps and hoops to jump through.
3. Careful with clipping. If you alter the clipping of a terrain while it still has a group of instances attached to it, Bryce will surely crash. It seems that Bryce assigns the positions of the instances on the terrain surface by vertex and polygon number, such that each instance knows which polygon number it has been assigned to. If you alter the clipping while the instances are still attached to the terrain, the instances get confused about where they belong so Bryce crashes. It is best to un-group Unnamed as soon as you exit the Instance Lab. Now the link between the instance group and the terrain is broken so you can safely edit your clipping without a crash. Once you are completed with all painting operations it is then safe to re-establish the link between the instance group and the terrain.
4. When the wireframe view gets extremely detailed as it does in cases where there is lots of instancing; the navigation of the camera and the entry into the labs becomes incredibly slow. There is an elegant solution. Before you begin painting you want to prep your source model. In the Attibutes ("A") of the source model you want to enable "Show as Box." This setting will carry over to the child instances, placing a simple box in place of the more complex wireframe representation of the model. With thousands of copies per scene this show as box setting really helps keep the wireframe complexity to a minimum thus keeping the navigation speed acceptable. I also think assigning family colors before you start painting will be a smart move down the line.
Lastly, there is a serious bug with the IL where the linked materials of the source and the child instances can be broken. This break occurs every time you save then re-open the scene. Let me be clear. After a scene with instances has been saved, closed, and re-opened you will notice a huge memory increase. I consider this increase to be a leak. Typically, each object in a scene has its own piece of memory assigned to it which it activates to access the Materials Lab. During the original painting session, the instances do not have their own individual memory allocations for materials, because the software knows to simply reference the memory assigned to the original source, so total memory usage remains quite low as it should. When scenes have been re-opened the link between the material setting of the source and those of the instances becomes broken. This elevates the instances from completely virtual as they were during the original painting session into being partially real. Instead of sharing the same Material Lab memory chunk as the source, now each instance has its own Material Lab memory chunk, which means a huge increase in memory of roughly 500%. If during the original session you had painted 100mb of trees, you will find upon re-opening that the memory usage has jumped by 500mb. This jump is due to the fact that now each instance has its own piece of memory which it needs for its materials. Fortunately the geometry link between source and children never breaks even after saving and re-opening, so memory usage doesnt completely explode even further. Still, a scene that seemed fine before saving could fail to re-open reporting a memory error if you forgot to leave some extra head room. Another consequence of this break in materials referencing is that editing the source no longer updates the instances, you must update them individually which can cost a ton of memory and even lead to out of memory crashes.
This is a much less comprehensive response than what I originally wrote up. But if you read the tutorial Horo mentioned along with this current post it should get you moving in the right direction.
As you continue working with Bryce you will likely observe how desperately we NEED an update to Bryce. The neglect Bryce faces, where bugs such as the group rotations and materials link failure really put the brakes on creativity and usage of features. If only we could get some stuff fixed, life for Bryce users would be so much easier. I'm just tossing that in for some perspective on why so many things seem backward in Bryce, yet we still love it and want it updated, not tossed away as a lost cause.. If Carrara is under-updated, Bryce is in an even worse state. Let's hope that all changes someday. But I doubt it. Both Ds and Carrara are both slated for updates but still nothing for Bryce. By my count we are getting close to 4 years without any real investment from Daz. Arggghhh!!!
I almost forgot to mention that even though the materials link between the source and the instances is broken after re-opening, it isnt fully broken. Any updates you make to the materials of the original need to be manually applied to its instances as well before the scene can be saved otherwise a crash will result. Go figure, the link is broken at the time you need it most, but that doesnt cause a crash. Crash only results if there is a mismatch at the time of saving. Fun fun.
@Roygee - your results encourage me to give it at try, too. Time permitting.
@Rashad - thanks for popping in here. I know what you mean with the forum eating the response. I have long ago resorted to write my replies in a text editor and then paste it. It saves hugely on time and frustration.
using I
Hi Rashad :)
Thank you so much for taking the trouble to give such a comprehensive reply - twice!
I feel for you regarding the forum loosing a reply - what I've learned to do when giving a long reply is to first type it in Word, then post. This also helps when answering multiple posters, so I can see what they wrote while I'm responding.
I've had Bryce for as long as Hex and Carrara, but have only now started to really get into it - me being primarily a modeler, I've only recently got serious about making decent renders and Bryce's terrains and atmosphere beats Carrara hands down! The renders I've seen here are simply stunning.
What I do like about Bryce's Instances Lab is the ability to paint right on the terrain - it may be in infancy, but that is so much better than having to make a distribution map - it gives one direct control.
Such a pity that Daz doesn't pay more attention to Bryce and Hex - they have two serious contenders in-house - but I guess they have decided on their way forward and that lies with e-dolls!
Anyhow, I've saved this right there with your PDF tuts for digestion tomorrow. I earlier on today set up a full terrain scene to get the basics right and all went well, then somehow I lost the plot with the distance haze and got that into the foreground - spent all afternoon trying to get it back, so now is the time to unfocus from the screen and try again tomorrow:)
Cheers
Couldn't agree more.
@bigh: Nice work. Love the reflections on the water and your choice of sky.
thank you
Somehow I don't have those PDFs saved, so I'm downloading them myself as well, thanks for the reminder of their existence. I keep forgetting important bits, and haven't learned everything there is to know about instancing yet.
Which reminds me, some advice about instancing I have: Save your scene right before you try to use instancing. It is very easy to exceed the memory limitations at this point, and saving right now will eventually eliminate a lot of pain and frustration.
Something odd about instances that has been bothering me, maybe somebody knows the answer. If you create an instance, you unfortunately often can't see it in the preview, (sometimes, but not always). A quick test right now shows that the instance is invisible if it is not selected, and if selected (if you can figure out where it was), the bounding box but not the mesh becomes visible. However while you move it, it becomes invisible again, so you have no way of knowing where you moved it until you let go. For this reason I often avoid instances and just create duplicates, even though that's inefficient, because it's almost impossible to exactly position or scale instances. However, I have noticed that SOMETIMES I can suddenly see instances in Wireframe mode, although still not in Texture Shaded mode, but only under certain conditions that don't last that I can't identify. In this screenshot, you see the instance when it's selected (top), the invisible instance but I can still click on where it is when the original is selected (middle) and the render showing it really is there. (I can't get a screenshot while moving it showing that it goes invisible though, and I did actually see the wire mesh for this instance briefly earlier in the test.) If there's a way to make it stay visible, that would help tremendously. Even knowing the rules for why it appears/disappears might help to avoid it or perhaps redraw it.
This bug sounds strangely yet vaguely familiar. I'm pretty sure the solution is to always work in Wireframe mode, skip textured shaded and open gl completely and the problem should never arise. I can imagine this must be a very frustrating thing to deal with. Thanks for the heads up!
@Rashad - appreciating the energy it takes to articulate and post this sort of information, a big thanks from a multi-year lurker (me) who gobbles this stuff up like heroin, saving the zillions of "pages of note" to local PDFs for fear that it may someday be gone/lost in a forum transition or such (see bryce-tech, etc.).
Bottom line, while either immediate, or down-the-line, your contributions are both invaluable, and very appreciated. These pebbles of wisdom are not falling on deaf ears, but rather guiding and insuring the possibility of a future of this amazing tool.
Like you, I have doubt of upgrades due to the economics, but perverse optimism because of the amazing 'thing' that Bryce is. I hope a champion sees the work you folks do and pumps even a small bit of (64bit) life into this gem.
FWIW, I have and use VUE, Poser, DS, Lux/Blender, and I still keep coming back to Bryce, because somehow it 'thinks' the way I do... which, I suppose is could be a vindication of those who think I'm nuts... so be it.
thanks again and cheers,
mindsong
Eventually, it will be lost. A huge amount was already lost when this new forum was set up. Like you, I save important things and if things are so important as Rashad's tutorials, I even have them available on my website under Bryce Documents > Guests (with the authors permission, of course).
Wow. Thanks for the support, it really has made my day!
Eventually, it will be lost. A huge amount was already lost when this new forum was set up. Like you, I save important things and if things are so important as Rashad's tutorials, I even have them available on my website under Bryce Documents > Guests (with the authors permission, of course).
I end up visiting Horo's site all the time for just the reasons stated above. Have you tried to find a link to Bantam 3d Grass lately? Scary stuff without Horo's help.
I thought about my comment above about difficulty in positioning instances that are just loose and not drawn on a terrain, and finally the obvious occurred to me after some delay that can be used under some circumstances; simply copy the object and position it until you are completely happy and done with movements, then Edit > Copy Matrix, create the instance, then Edit > Paste Matrix on the instance to move it right where your copy is. Then you can delete the copy. Pretty painless if you don't plan to keep adjusting it after you get it where you want.
Why is it that you can instance some things via Edit > Instance, but not other things? Just now I ended up instancing a single copy of something onto my ground plane and then moving it to create an instance as I didn't see another way to create the instance.
Terrains cannot be instanced in any way. If I'm not mistaken grouped objects cannot be instanced via the Edit>Instance route.
Edit>Instance isn't the "preferred" method for using instancing, it really is intended for the Instance Lab. Edit>Instance is a good solution when only a few instances are being used but the whole point of instancing is to create lots of duplications. I will try to remember to look into it as I also need to look into caustic filters for Fran. So much to do.