Page 1 of 17 12311 ... LastLast
Results 1 to 20 of 327

Thread: Micropoly Script & Tests

  1. #1
    Member Kai Kostack's Avatar
    Join Date
    Jun 2006
    Location
    Berlin, Germany
    Posts
    901

    Micropoly Script & Tests

    hi,

    i had another strange idea. now it's the implementation of micropolygons via python. it's probably the worst implementation of micropolygons ever made, because it's so slow and needs unbelievable amounts of memory but at least it works.

    here are some examples with different settings originally rendered in DVD resolution:



    this is the base mesh, a plane and a low poly icosphere. i just added a material with a procedural displacement texture to it and ran the script.



    division rate of 16 pixel/poly, average of 10 seconds per frame calculation time, up to 250 mb memory use



    division rate of 8 pixel/poly, average of 45 seconds per frame calculation time, up to 500 mb memory use



    division rate of 4 pixel/poly, average of 2:30 minutes per frame calculation time, up to 1 gig memory use

    highres videos

    unfortunately you can't reach very high detail for instance 1 pixel/poly in higher resolutions, it simply cost to much memory and will crash blender.

    i still need to do some improvements then i'll release it.



  2. #2
    Member ibkanat's Avatar
    Join Date
    Nov 2005
    Location
    Montana
    Posts
    688
    Hey great work....



  3. #3
    You are saying that you was able to code python script for micropoly rendering? You are really genius man !!!



  4. #4
    that looks very interesting! :O
    please, release the python script as soon as you can, so others could take a look at it and add a few optimisations.
    simply incredible! wow!
    just to clarify: this is true micropoly and not just simple cc-subdivision, right?



  5. #5
    Member meschoyez's Avatar
    Join Date
    Dec 2006
    Location
    Córdoba, corazón de mi país ;) Argentina
    Posts
    1,187
    Kai, you're really a mad man... micropolygons, demolition... wooooow, man.... i've no words...



  6. #6
    Member ideasman42's Avatar
    Join Date
    Mar 2004
    Location
    Australia
    Posts
    5,338
    Gosh, even Brecht didnt have the balls to finish micropoly rendering!
    I hope your able to refine this into something faster
    Ideally you will only subdivide polys for a 32x32 bucket at a time, then render them and throw it away.
    You could use the render api's border render access for that.
    Podcast * dotfiles * My Wiki * Blender/Stackexchange
    ideasman42<at>gmail.com



  7. #7
    Member Kai Kostack's Avatar
    Join Date
    Jun 2006
    Location
    Berlin, Germany
    Posts
    901
    @gaalgergely:
    no cc, we have this already.
    this kind of subdivision depends on the camera position, lens, render resolution etc.



    @ideasman42:
    at the moment it works very simple and wasteful regarding memory consumption.
    as you can see it simply subdivides everything around the camera.
    do you know of a fast way to check if a 3d point or edge is within the viewfield of the camera? and i mean really fast, otherwise it would probably become even slower.



  8. #8
    Member migius's Avatar
    Join Date
    Mar 2005
    Location
    Berlin, Germany
    Posts
    817
    Kai, i am happy to see you again with this innovative idea.
    Really amazing that you get it working in python.
    respect
    migius



  9. #9
    Member Ace Dragon's Avatar
    Join Date
    Feb 2006
    Location
    Wichita Kansas (USA)
    Posts
    28,157
    You probably can start to do major optimizations because that way it would be a lot more usable, Ideasman is a genious at python, he can help you.

    A good thing would be to greatly optimize the script then port it to C to have it hardcoded into Blender.
    Sweet Dragon dreams, lovely Dragon kisses, gorgeous Dragon hugs. How sweet would life be to romp with Dragons, teasing you with their fire and you being in their games, perhaps they can even turn you into one as well.
    Adventures in Cycles; My official sketchbook



  10. #10
    Member J09's Avatar
    Join Date
    Jan 2007
    Posts
    1,486
    I know that (at least in the GE) the command for checking if a camera can see [something] is something about the frustum. Real helpful, I know. I looked in the API for general python (not limited to GE) and only came up with this:
    http://www.blender.org/documentation...html#glFrustum
    I have little idea how to use it, but I'm hoping it might help.....



  11. #11
    Yay for finally getting micropoly into Blender! Even if it's just a start!



  12. #12
    Member Anthony's Avatar
    Join Date
    Jan 2006
    Location
    Hamilton
    Posts
    595
    Isn't this basically just LOD?



  13. #13
    Member Michael W's Avatar
    Join Date
    Nov 2007
    Location
    UK
    Posts
    4,992
    Originally Posted by Anthony View Post
    Isn't this basically just LOD?
    Lod takes a high poly mesh and decimates(removes polygons) it as it gets further away.

    This seems to take a mesh and tessellates (adds polygons) as it gets closer. In this case those extra polygons are then displaced by a procedural to add geometry detail.

    Looks like a cool thing!

    On optimising...
    I guess it'd be really tough to figure out localised subdivision based on the displacement "rate of change"... probably take the calculation time through the roof! might help memory though.
    Mike Williamson
    www.cowtoolsmedia.co.uk



  14. #14
    Member Kai Kostack's Avatar
    Join Date
    Jun 2006
    Location
    Berlin, Germany
    Posts
    901
    i could imagine this being a modifier in blender. it'd need just two inputs, the preview subdivision rate and the render division rate in pixel/poly. the preview rate would be useful to tweak possible following displacement modifiers etc. with a low poly rate.

    the idea behind this script is that simple, that i can quick explain it in pseudo-code here:

    Code:
    repeat:
        for all edges in the mesh do:
            if lengthOfEdge > (((16 /lensInMM) *distanceOfEdgeCenterToCamera *2) /renderResolutionMaxX) *divisionRate then:
                subdivideEdge()
    do this until no more edges are found to be subdivided
    that's the central (although simplified) algorithm, nothing very complicated. i think a good coder could make such a modifier ready in a really short amount of time. if i could be sure it would make it into the main trunk, maybe then i'd do it myself.


    btw, i thought about the viewfield/bucket problem. an assumed subdivided vertex which would be outside of this window could be pushed into it by a displacement anyway, so you can't basically say everything outside of the viewfield isn't needed. another thing are mirrors, you'd have to check also what can be seen in reflective surfaces. this could become a coding nightmare. so viewfield dependend subdivision should only be an option, it depends strongly on your scene if it can be used without glitches.
    Last edited by Kai Kostack; 13-Mar-08 at 22:23. Reason: corrected the code



  15. #15
    Member Meta-Androcto's Avatar
    Join Date
    Aug 2006
    Location
    australia
    Posts
    4,043
    congrats.
    great work, very useful.
    i had another strange idea.
    have as many as you like!
    m.a.



  16. #16
    Member Kai Kostack's Avatar
    Join Date
    Jun 2006
    Location
    Berlin, Germany
    Posts
    901
    i did some optimizations for motion blur and another example:




  17. #17
    Member Surt's Avatar
    Join Date
    May 2004
    Location
    Brisbane, Australia
    Posts
    313
    Really impressive stuff.

    Any plans to add interpolated transitioning between subdivision levels to minimise popping/banding?
    "...oppression and happiness...not necessarily mutually exclusive." - Cessen



  18. #18



  19. #19
    Kai. I'm loving the Star Trek 2 feel of your test.



  20. #20
    I'm not a coder, but could it be possible to adapt the code to 'C' so it could be rolled into the Blender core and speeded up?



Page 1 of 17 12311 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •