• Welcome to the Community Forums at HiveWire 3D! Please note that our store and forum are on two separate servers so you will require a separate login for each. The store will ask you for your Real Name (WILL NOT BE displayed to the public) and the forum will ask you for a User Name (WILL BE displayed to the public). You may use the same email address and password for both.
  • The 14th Annual Songbird Remix Open Rendering Season Contest is now open! See the contest thread for details.

Instantiation Via (Poser) Geometry Swapping ?

3dcheapskate

Adventurous
Does anybody remember Anton Kiesel's Changing Fantasy suits from way back, Victoria 1/2 time ?
Sixus1's Bunch'O'Props for Behemoth ?
The bit in B.L Render's "Secret's Of Figure Creation With Poser 5" (pp 109-113 in my copy) about how to implement geometry swapping ?

I'd been toying with the idea of using geometry-swapping for bookshelf contents for a year or so without really getting anywhere,and I'd got bored with that and put it aside.

I've recently been playing with abunch-of-things-thrown-in-the-air prop. I was specifically thinking playing cards, casino chips, banknotes, and coins, but somebody asked if it was possible to swap the things for "little asteroids". So I dug out my geometry-swapping bookshelf stuff and had a play...

I've attached my first working test. Simply unzip to whatever Poser runtime you want, start Poser, load the Instantiation Via Geometry Swapping Test.cr2 file and play.

More information tomorrow.

Here's a list of all the files in the zip:

Runtime\Geometries\3DCheapskate\TEMPORARY\GeometrySwapping\54PlayingCardsCoLocated.obj
Runtime\Geometries\3DCheapskate\TEMPORARY\GeometrySwapping\GeomSwapAlt-MONKEY.obj
Runtime\Geometries\3DCheapskate\TEMPORARY\GeometrySwapping\GeomSwapAlt-SIMPLEGRASS.obj
Runtime\Geometries\3DCheapskate\TEMPORARY\GeometrySwapping\GeomSwapAlt-TORUS.obj
Runtime\Geometries\3DCheapskate\TEMPORARY\GeometrySwapping\GeomSwapAlt01.obj
Runtime\Geometries\3DCheapskate\TEMPORARY\GeometrySwapping\GeomSwapAlt02.obj

Runtime\Libraries\character\3DCheapskate\TEMPORARY\Instantiation Via Geometry Swapping Test.cr2

Runtime\Textures\3DCheapskate\TEMPORARY\PlayingCards\English54,6x9,1024x1024.jpg
 

Attachments

3dcheapskate

Adventurous
Okay, more information.

When you load the figure it just looks like a single huge playing card (Jessi included in screenshot purely for scale). But notice that the figure contains 54 bones,each bone being a direct child of the Body.
1 load.jpg
 

3dcheapskate

Adventurous
If you change the "Geometry Variant" dial on the Body the card changes to:

1 Suzanne (the Blender monkey head)

2 geom1.jpg


2 a very simple clump of grass
3 geom2.jpg
 

3dcheapskate

Adventurous
Set "Geommetry Variant"on the Body back to 0 (Playing Cards).

Go to Top View in the preview pane.

Click-drag the card. It'll look similar to the screenshot below while you're dragging, and when you release the mouse button you'llsee that yo've just dragged "bone_54"

4 drag.jpg
 

3dcheapskate

Adventurous
When the "Geometry Variant" dial on the Body is set to zero the whole deck of cards is displayed.

Nothing clever or instantiation-ish going on.

The geometry that's being used is 54PlayingCardsCoLocated.obj ,where each card is a separate mesh with its own vertices, faces, and UV mapping - each card being mapped to a different area of the English54,6x9,1024x1024.jpg texture map shown below


English54,6x9,1024x1024.jpg
 

3dcheapskate

Adventurous
However, when you set the "Geometry Variant" dial on the Body to 1 the geometry for each and every one of the 54 bones is picked up from the GeomSwapAlt01.obj file.

Likewise when you set the "Geometry Variant" dial on the Body to 2 the geometry for each and every one of the 54 bones is picked up from the GeomSwapAlt02.obj file.

The CR2 contains a reference to both of these files as alternate geometry for each and every bone

Each of those files contains a single object - GeomSwapAlt01.obj is the Suzanne Blender monkey head (the same as GeomSwapAlt-MONKEY.obj), and GeomSwapAlt02.obj is a very simple tuft of grass (the same as GeomSwapAlt-SIMPLEGRASS.obj).

Try overwriting the existing GeomSwapAlt01.obj file with a copy of the GeomSwapAlt-TORUS.obj file.

Try overwriting the existing GeomSwapAlt01.obj file with a copy of any OBJ file that you have lying around.

Now I'm not sure how Poser handles this internally, but I'm guessing that, when the "Geometry Variant" dial on the Body is set to 1, Poser has just a single copy of the data from the GeomSwapAlt01.obj file in memory, and has a reference to that data from each of the 54 bones.

Which is my understanding of what 'instantiation' is in 3D terms.
 

3dcheapskate

Adventurous
Notice the question mark at the end of the thread title - "Instantiation Via (Poser) Geometry Swapping ?"

I'm hoping that somebody who knows about the way Poser works, and who understands the details of what 'instancing' is, can actually tell me whether what I'm doing here is, in any way, akin to this 'instancing'.
 

KageRyu

Lost Mad Soul
Contributing Artist
I'm not an expert, but I have used Poser a long time, and have done some ERC coding here and there for hire in the past (ok, not far from an expert). I do of course remember geometry swapping and it is good to see it in use (a few creators still use it but not widely advertised these days despite it's potentially powerful applications). I started Poser with P4, but based on various reading Geometry Swapping dates back to Poser's origins and was initially how open and closed hands were handled. It was used also to have hidden genitalia options for the nude figures (and many 3rd party figures, especially many of Sixus1 fantasy figures). If you happen to have the Sixus1 Goblins and their armor, the helmets use it for varying decorations.
Based on my understanding of proper instancing from other 3d apps, this is not true instancing. It may achieve a similar result in terms of memory usage, and is certainly worth pursuing for such purposes. I could certainly image a fantasy bookshelf with an option for differing books on it to be removed to be mighty handy - especially in animation to have a book removed (obviously the removed book would be a separate part made visible at the same time the swap was active). On the demo images you showed if you attached a few ERC controls linked to dials on the main body and hid the bones until swapped in you could have a great effects prop with scatter and posing ability.
I wish I had more time to answer and weren't so tired. Keep experimenting and expanding what Poser can do for you.
Daz Studio has trouble with Geometry Swapping since one of the post 4.0 versions. I do not remember when exactly it started, but it broke a lot of content even sold by Daz. I do not use any new versions of DS and never will, so I can not help with fixing it there.

Poser has always had the ability to reference external geometry with figures, props, and hair to reduce filesize, so part of what is needed for instancing is already built in to poser. It could be possible to write a script to allow for instancing by someone with good script-fu (not me). There were, at one time, lots of great tutorials for stripping geometry from your home made props or figures, removing unused dials, etc... and their are some great tools out there to automate the process. Maybe if enough of us ask Renderosity they will develop these parts of Poser into full and proper instancing.
 

3dcheapskate

Adventurous
Thanks KageRyu. An answer over on the Renderosity confirms to my satisfaction that this definitely isn't instancing (at least not the instancing I was thinking of) - the OpenGL Instancing link from this post gives the details

However, that doesn't bother me in the least, because...

...On the demo images you showed if you attached a few ERC controls linked to dials on the main body and hid the bones until swapped in you could have a great effects prop with scatter and posing ability....
... I see promise and possibilities with what I'm doing too. :)
 
I'm not an expert, but I have used Poser a long time, and have done some ERC coding here and there for hire in the past (ok, not far from an expert). I do of course remember geometry swapping and it is good to see it in use (a few creators still use it but not widely advertised these days despite it's potentially powerful applications). I started Poser with P4, but based on various reading Geometry Swapping dates back to Poser's origins and was initially how open and closed hands were handled. It was used also to have hidden genitalia options for the nude figures (and many 3rd party figures, especially many of Sixus1 fantasy figures). If you happen to have the Sixus1 Goblins and their armor, the helmets use it for varying decorations.
Based on my understanding of proper instancing from other 3d apps, this is not true instancing. It may achieve a similar result in terms of memory usage, and is certainly worth pursuing for such purposes. I could certainly image a fantasy bookshelf with an option for differing books on it to be removed to be mighty handy - especially in animation to have a book removed (obviously the removed book would be a separate part made visible at the same time the swap was active). On the demo images you showed if you attached a few ERC controls linked to dials on the main body and hid the bones until swapped in you could have a great effects prop with scatter and posing ability.
I wish I had more time to answer and weren't so tired. Keep experimenting and expanding what Poser can do for you.
Daz Studio has trouble with Geometry Swapping since one of the post 4.0 versions. I do not remember when exactly it started, but it broke a lot of content even sold by Daz. I do not use any new versions of DS and never will, so I can not help with fixing it there.

Poser has always had the ability to reference external geometry with figures, props, and hair to reduce filesize, so part of what is needed for instancing is already built in to poser. It could be possible to write a script to allow for instancing by someone with good script-fu (not me). There were, at one time, lots of great tutorials for stripping geometry from your home made props or figures, removing unused dials, etc... and their are some great tools out there to automate the process. Maybe if enough of us ask Renderosity they will develop these parts of Poser into full and proper instancing.
Catamaran made great use of this with his motorcycles. A single dial changed them from bikes to trikes to quads. Skis and tank treads from wheels. Geometry swapping and morphing to the highest level. All in a single dial. A very good pattern to look at for doing work on the book stacks and shelves. To keep from messing too much with the TOS here; there are free Dawn and Dusk poses made for his bikes. His bikes are free stuff so downloading one to take a look at some possibilites shouldn't hurt the budget Cheapskate
 

KageRyu

Lost Mad Soul
Contributing Artist
Sadly Morphography, who hosted those bikes, is gone now. Details can be found here. I am unsure if I had those bikes, and now it looks like I have missed them if I hadn't previously downloaded them.
 

Ken1171

Wise
Contributing Artist
Very interesting read, Kage! I love playing with things like this to see what can be achieved, and your geometry-swapping prop is definitely an achievement. I have to agree with the above that this is not geometry "instancing", though. There was a time when SMS had announced that Poser now supported instancing, I believe in their early days with Poser, around version 7, and I was enthusiastic about it because it would solve a very old problem - running out of memory.

Instancing has to do with the way memory is allocated when we add a copy of a model that is already on scene. Before Poser 7 (I think it was 7), duplicating the figure on scene would equally duplicate the amount of memory it takes, so we could quickly run out of RAM. Now, you can make an experiment by loading a fully clothed figure with hair and everything, and then using Object->Duplicate with the parent figure selected. Pay attention to how much RAM was used before and after, and you will notice this process no longer duplicates the allocated memory. It increases a bit, but definitely not twice as much. Awesome!

Many 3D programs, and especially game engines, use "instancing" to create a vast amount of copies of the same 3D object, like trees in a forest, using barely more RAM that is needed to load a single copy. 3D rendering engines, like Octane, use instancing to do the same - but only during renders, using the GPU to do it instantly - and using very little memory. Depending on how instancing is implemented, it is often possible to create variations of the same model in memory, like different morphs and sizes (so they don't look all the same), while only storing in memory the differences. Octane render does this by default, offering a panel to let you define how the variations will be created in render-time.

Hope this helps clarifying what instancing is all about - and yes, Poser does support it! ^_____^
 

3dcheapskate

Adventurous
Thanks Ken,

It's interesting to see the twists and turns an idea can take. This one started out as a possible way of swapping out groups of books on a bookshelf until I got bored. Hopefully it will still achieve that at some point ! It then resurfaced when I started playing with the idea of tossing a deck of cards and a load of casino chips into the air, which is where the CR2 in the OP comes from.

But I've only just realized why the 'is this instancing' came to mind. The idea of having plants, rocks, trees, etc as alternate geometries must have been in the back of my mind, and there seems to be a lot of stuff on various forums and 3D sites about using instancing to create large numbers of such things.

I remember doing the following picture awhile back, and getting fed up of manually placing each tuft of grass.

remembering-the-fallen_full.jpg


Today I knocked up a simple alternate geometry with several very simple grass clumps.

Render 1.jpg


Lots of work to do, but I think it's showing promise. Even if it isn't instancing. :)
 
Top