Ready - The return of mcjIsosurface plugin for PC-Win and DS 4.X

2

Comments

  • mCasualmCasual Posts: 4,607
    jag11 said:

    Awesome! Video at 0:16 seems like a heart beating. Please post the script to do that.

    i called it the boiling surface effect

     it's metaballs bouncing up and down

    one of the problems with those scripts is that i was adjusting them "by hand" and you need to be a daz script programmer to do that

    but the plan was to make them usable by anyone and maybe have 1 script for all effects

    if it's not too much work, i'll post the boilingplate effect script,

    but it may have to wait untill i complete the task at hand:  the mcjIsoSurface for IRay update

     

  • mCasualmCasual Posts: 4,607
    edited August 2015

    i found the (2011) script for the boiling-plate effect and it works well with the mcjIsosurface4

    it's not adjustable but someday will be

     

    see if your daz studio 4.8 Preferences/Interface/Pixel Shading" option is ON and the Reflection Map of a surface has an image applied to it, you get Real-Time Display of the chrome/mirror effect

    though now if i remember well you get the same effect by applying it to the diffuse channel --- because the isosurface uses a spherical UV map

    param.jpg
    724 x 700 - 148K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited August 2015

    first animated blob ( it's just paint !!! ) rendered with IRay

     

    oh now i understand why the metaballs are not jumping !

    i prevented them from reaching the floor !

    contrary to initial intent, i'll release the script for this effect with a User Interface

    so you'll be able to adjust things

     

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited August 2015

    it's more complicated than just running the script,

    but, you get to tailor the effect to your liking

    the script will be posted on a different page than the isosurface plugins ( because they have other uses! )

    here we'll make a 30 frames long effect

    checking the metaballs paths through a 30 frames "cycle" and we can see it's not looping

    Since it uses parabolas and random initial speed and directions, it's understandable that we dont get bounces with very predictable durations

    but but but i could weed out the bounces that are not fully encompassed by the looping animation-range

     

    so instead of Y.O.L.O. it would be YOLAINOTWTAR You Only Live An Integral Number Of Times Within The Animation Range

     

    But ah HA! back in 2011 i wrote the looping version!

    boil.jpg
    800 x 664 - 171K
    pathscheck.png
    800 x 800 - 32K
    itloops.png
    800 x 800 - 38K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited August 2015

    n

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited August 2015

    mcjFXBoilerPlateB

    The first mcjFX script which creates animated metaballs ... so that the Isosurface looks like this

    was posted a moment ago !

    https://sites.google.com/site/mcasualsdazscripts6/mcjfx

     

    there may even be a manual tomorrow

    in the meantime you'll have to figure the settings or leave them un-modified ( and there's a reset button ... which i didnt test actually )

     

    Post edited by mCasual on
  • jag11jag11 Posts: 885

    Thanks for the mcjFX.

  • mCasualmCasual Posts: 4,607
    edited August 2015

    someday someday i'll rewrite the polygonizer part of the plugin and get rid of the mataAnnoyingLines

    in other isosurface news, - next version will have the visible domain box and sane transforms handling

    annoying.png
    800 x 450 - 356K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited August 2015

    but but but

    as we can see here upon a close inspection

    is that the lines are not only due to the variable spacing between edges

    there's vertex positioning imperfections ... possibly due to a loss of precision somewhere ..

    maybe if i fix that, the appearance will be acceptable!

     

    annoying2.png
    800 x 450 - 6K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited August 2015

    this weekend i'll work on the more-iRay-Friendly mcjIsosurface4

    since i didnt remove the code for it, the mcjIsosurface node still renders itself in 3Delight mode

    the top sphere is the mcjIsosurface node, as you can see, the plugin does a better job, because it uses computed normals instead of facet normals

    the bottom sphere is the "it" node which was hijacked by mcjIsosurface and is rendered by Daz Studio and/or iRay, like any normal primitive

    --

    changes i expect to do this weekend

    - make the mcjIsosurface and "it" node positions, rotations and scaling conform to one another

    - make sure it's possible in 3Delight mode to turn on/off the mcjIsoSurface old but good rendering

    - fix the imprecision in vertex positioning

    - possibly add a decimation option where the plugin merges all the vertices that have a distance smaller than a certain distance

     

    i did a test, i created an isosurface sphere

    exported the isosurface using Daz Studio's obj exporter

    imported it back in Daz Studio

    ran a script that measures the radius at each vertex

    and i can report that the radii were

    Executing Script...min max = 9.995745658874512 10.013422966003418

    that's in centimeters

     

     

     

    workonit.png
    1148 x 1004 - 1M
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited August 2015

    i'm not there yet, but if all goes well the result will be like the ball on the right

    instead of the one on the left

    but you could say this was fixed "manually" i still didnt find what's wrong with mcjIsosurface3 and 4 

    maybe it's something that appeared in DS4.5 or 4.7 ... tests to do

    willbefixed.png
    800 x 450 - 482K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited August 2015

    this post was a duplicate

    Post edited by mCasual on
  • hphoenixhphoenix Posts: 1,335

    The ball on the left looks like the marching-cubes aren't smoothing properly....the one on the right has some normal issues, but appears smooth.

     

  • mCasualmCasual Posts: 4,607
    edited August 2015

    note that this was using the "metanuball" 

    i tested mcjisosurface3 in DS3-64 bit and it's the same

    the "metaball" primitives seem to look similar to the ball on the right

    by stepping up the resolution of the mcjIsosurface ( in the parameters tab ) the defects become less apparent

    ----

    dont know yet if there will be anything i can do to improve the looks other than changing the polygonizer

    note that my reference for all this is http://paulbourke.net/geometry/polygonise/

    ----

    one thing i may do is reduce the number of edges by not triangulating the quads

    this should smoothen the meshes a bit

    http://mathematica.stackexchange.com/questions/80669/integrating-a-function-over-a-surface-integral

     

     

     

     

    hphoenix said:

    The ball on the left looks like the marching-cubes aren't smoothing properly....the one on the right has some normal issues, but appears smooth.

     

     

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited August 2015

    laboratory "monster" while trying the repair the metanuball primitive

     

    today's conclusion is that i'm not certain what i was trying to accomplish with the metanuball primitive

    but until i do, you can get good results using the metaball and metasphere primitives

    i probably left the metanuball in the mcjMetaConsole palette for backward compatibility

    --

    tomorrow i'll study other ways to improve mcjIsosurface

    i did a few modifications on my copy that do help, and at a minimum you'll get those tomorrow

    or if you're really really insisting, here's the nightly build for 64-bit

    mcjIsosurface4 64 bitearly 08292015 Morning zip 

     

    monster.png
    800 x 450 - 211K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607

    the laboratory "monster" has some cuteness , mathematically speaking i mean, no quasi-degenerate thin-sliver-triangles,

     

  • hphoenixhphoenix Posts: 1,335

    Hmm.  And have you considered an octree traversal algorithm instead of marching cubes?  There's plenty of info on variations used for isosurface reconstruction, and can easily result in considerable speedups from the brute-force marching cubes.  As an example:  https://users.soe.ucsc.edu/~avg/Papers/oct92.pdf

     

  • RAMWolffRAMWolff Posts: 10,212

    Interesting project.  Cool too!  cool

  • mCasualmCasual Posts: 4,607

    i think i'm using marching tetrahedrons, but i dont want to spend more than this weekend on the isoSurface plugin

    i actually have projects on the backburner goiung back to oh about 2010 .... that's a lot of baccklog to tend to

     

    my mcjCollider plugin and some scripts would benefit from speedups offered by spatial partitioning

     

    it's all free/hobby/toy gizmos so i'm happy with them as they are

     

     

     

    hphoenix said:

     

    Hmm.  And have you considered an octree traversal algorithm instead of marching cubes?  There's plenty of info on variations used for isosurface reconstruction, and can easily result in considerable speedups from the brute-force marching cubes.  As an example:  https://users.soe.ucsc.edu/~avg/Papers/oct92.pdf

     

     

  • mCasualmCasual Posts: 4,607
    edited September 2015

    good news, our research team ( thinks it ) has located the source of the isosurface4 (and 3 i guess) banding defects
    there was a line in the code that looked like d += 0.0001;
    i was adding a small tweak to avoid zero division or some "fence" issues
    but apparently 0.0001 is not small enough of a tweak to go unnoticed visually
    so i changed it to d += 0.000001 and looks like that does the trick
    the updated version will be posted in the daz3d freepository forum later today
    i want to improve the domain vs isosurface  relations
    iRay render here
    the red ball is the isosurface, since it exceeds the "domain" it gets truncated
    the Utah teapot ( 4 pieces ) is a free prop on my web site

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited September 2015

    for a moment there i had doubts !

    the defects were so small

    but in this extreme closeup of a small metaball

    you see in red an mcjIsosurface4 ( with the corrected code )

    and in white an mcjIsoSurface3 ( with the old code )

    and there is a difference

    so we indeed fixed that issue

     

    fig 2 - the 'metaball' primitive is one of the few primitives which given a negative radius give us a subtractive effect

     

    fig 3 the red metaball on the left is a "metanuball", the one on the right is a standard metaball

    the banding on the metanuball is not due to a problem with the isosurface,

    the metanuball was an experimental thing and in fact i dont quite remember what was the goal

     

    yesssss.png
    1920 x 1080 - 175K
    dig.jpg
    976 x 601 - 633K
    inherent.png
    1920 x 1080 - 304K
    Post edited by mCasual on
  • RAMWolffRAMWolff Posts: 10,212

    I have no idea about any of this but as usual your brilliant and thanks  to your team for their discovery!

  • mCasualmCasual Posts: 4,607

    well actually the metacylinder still exhibit the problem ... the case continues

    drawthat.jpg
    976 x 601 - 299K
  • hphoenixhphoenix Posts: 1,335

    I think the original vertex interpolation code you are using was based on using float and double type elements, back on old hardware.  And it was based around a domain that was fairly large compared to the isolation value (0.0001) to avoid NaN issues.  The double type values were used to give 'room' for division/multiplication results.

     

    However, either way, with modern hardware (32-bit/64-bit) a double is a LOT bigger for most compilers.  Instead of using a numeric 0.0001 (or 0.000001), #define a constant in your header files like 

    #define MINIMUM_DIV 0.000001

    so that you can just change it there, and have all those comparisons use the identifier instead of the direct value.  And since a modern 64-bit double (IEEE 754 standard) can go as low as

    0.0000000000000002

    in representing fractional parts, you could use a much smaller value (though give a few orders of magnitude above that limit, so that if you scale up the domain, it doesn't become an issue).

    Now, depending on which C++ compiler you are using, the "long double" is an option (on just about everything but MS Visual Studio) as it extends the double to a 80-bit field.  In MSVC, a "long double" is the same size as a "double".

     

    I'm still working on my algorithm for dynamic octree spatial partitioning so that it works with continuous functions (as most implementations are designed to work with point sets, so it's just a lookup for containment, rather than evaluation a scalar field, which seriously complicates determining if a octant should be subdivided or if it should be considered 'empty'.....) but when I get it worked out, I'll pass you a copy of the sample implementation.  Might be a good optimization for a few of your plugins!

     

    Keep up the good work!

     

    (and the metacylinder image.....is that TWO metacylinders meeting, or what?  That banding looks to be localized to the extreme curvature region.....)

     

  • mCasualmCasual Posts: 4,607
    edited September 2015

    it was a birdeye view of a metatube showing a dent

    the mataballs now seem to look good

    but other metashapes like the metatubes still have the problem

    note that when you increase the resolution, or animate the iso or add a texture the problem becomes less visible

    i'll give it another go in the next days

     

    about the precision, i think using the small number like 0.0000001 was helpful, but in the end i changed the method and dont need it anymore

    i did as ... probably Paul Bourke ... did here around line 00508

     

    http://www.ks.uiuc.edu/Research/vmd/doxygen/Isosurface_8C-source.html

     

     

     

     

     

     

     

    hphoenix said:

     

    (and the metacylinder image.....is that TWO metacylinders meeting, or what?  That banding looks to be localized to the extreme curvature region.....)

     

     

    Post edited by mCasual on
  • mCasualmCasual Posts: 4,607
    edited September 2015

    well ... i seem to have improved the softness of the mataballs primitives but other metashapes like the metaspheres still suffer from ripple/bands defects

    tomorrow or next weekend i'll give it another go

    i may post the slightly improved plugin later this evening

    https://sites.google.com/site/mcasualsdazscripts5/mcjisosurface4-beta-20150802-plugin-for-ds4-8

    the current development version 64 bit plugin in a zip file 

     

     

    Post edited by mCasual on
  • MythmakerMythmaker Posts: 606
    edited July 2016

    I just tried the isosurface4 all 3 versions, only the latest beta 03/09/15 version will have the wireframe show up in the viewport.

    But wireframe yes/no options didn't show up under Parameters, just Geometry: 'resolution x32' and 'show doman box' only.

    I've set default wiremap Reflection map to 100%, diffuse/ambient 0. Metaconsole metaball/cubes etc still don't show in viewport or actual render.

    Changing the engine to 3DL did nothing. Changing shader to iray uber base, no change. 

    Same with boilerplate. Both the isosurface object and boilerplate do exist in the scene as shown.

    Most likely a 4.9 issue....?

    In any case, no hurry. Just thought I put the report here for 4.9.2.7.

    This is my first attempt at isosurface anyway so let me know if I missed specific steps... Cheers

     

    isosur.png
    516 x 390 - 40K
    Post edited by Mythmaker on
  • mCasualmCasual Posts: 4,607

    looks like it's broken for earlier versions of Ds4.9 too

    worked last summer but ...

    i suspect the isosurface doesnt "see" the meta-objects 

    i think the isosurface plugin scans the scene for objects with specific names like "metaball"

    i'f i'm lucky it's just a matter of renaming them ( which is different from re-labeling them )

    i'll check this after supper which is now !
     

     

     

    Mythmaker said:

    I just tried the isosurface4 all 3 versions, only the latest beta 03/09/15 version will have the wireframe show up in the viewport.

    But wireframe yes/no options didn't show up under Parameters, just Geometry: 'resolution x32' and 'show doman box' only.

    I've set default wiremap Reflection map to 100%, diffuse/ambient 0. Metaconsole metaball/cubes etc still don't show in viewport or actual render.

    Changing the engine to 3DL did nothing. Changing shader to iray uber base, no change. 

    Same with boilerplate. Both the isosurface object and boilerplate do exist in the scene as shown.

    Most likely a 4.9 issue....?

    In any case, no hurry. Just thought I put the report here for 4.9.2.7.

    This is my first attempt at isosurface anyway so let me know if I missed specific steps... Cheers

     

     

  • mCasualmCasual Posts: 4,607

    end of 2015 following a hardware disaster i lost the DS4.8 / 2015 version source code for this plugin

    i still have older DS3 versions and can probably remember how i made it DS4.8 then iRay compatible

    but it will take some time before i have time to work on this

     

  • mtl1mtl1 Posts: 1,507

    @mCasual, have you considered hosting your code on an online repository to prevent such hardware disasters? :) Aside from your own website, of course!

Sign In or Register to comment.