Voxelizer by Peter Richardson
Posted by Jeremy YeoKhoo on Sunday, July 11, 2010 Under: Related
Arrgh, I knew someone was going to get this. Ive done something similar and so Im going to showboat before anyone accuses me of plagarising.
First Method: I had some help from a couple of friends (namely Beau Garcia and Sam Loxton) from work to help me access Maya's API with python. This method uses a geometryObject that does 2 bounding box detection for slightly more efficiency. Basically i have an array of cubes within the workspace that is unhidden. When a vertex of my geometry object is within the bounding box of one of the cubes (pixel) it grabs the colour information and stores the visibility of that particular cube/pixlein an python.array This method does the animation frame range. I had an object with 40,000 verts and 50 frames. And by calculation it was going to take 11 days to compute!!
Second Method Does only a frame render of a particular frame of a geometry object. Draws a cube for every vertex. Grabs colour information of that vertex from its texture inputed shader. Applies a unique lambert shader for each one. After going through all the vertices of the geometryObject it does a final cull to avoid flickering and repeated cubes/pixels. This method was alot faster by about 16 times! But it was alot less accurate, and would not be able to save the pixelation into a file. Both was only able to render in mentalRay at the moment If anyone is interested in getting access to the script, Ill be more than willingly, however it is in a big mess and horribly inefficient, and I should probably leave my scripting signature in my code somewhere so it will take me a few days to compile it together. Will post it up in properly in the next coming months on my blog and/or website. Would like to hear from anyone for any input, Realised I will need to do a proper webpage next month
Voxelizer 1.0 from Peter Richardson on Vimeo.
I basically use 2 methods of pixelating my geometryObjects and is alot simpler than his method which I think does raycasting. I created it using python as well.First Method: I had some help from a couple of friends (namely Beau Garcia and Sam Loxton) from work to help me access Maya's API with python. This method uses a geometryObject that does 2 bounding box detection for slightly more efficiency. Basically i have an array of cubes within the workspace that is unhidden. When a vertex of my geometry object is within the bounding box of one of the cubes (pixel) it grabs the colour information and stores the visibility of that particular cube/pixlein an python.array This method does the animation frame range. I had an object with 40,000 verts and 50 frames. And by calculation it was going to take 11 days to compute!!
Second Method Does only a frame render of a particular frame of a geometry object. Draws a cube for every vertex. Grabs colour information of that vertex from its texture inputed shader. Applies a unique lambert shader for each one. After going through all the vertices of the geometryObject it does a final cull to avoid flickering and repeated cubes/pixels. This method was alot faster by about 16 times! But it was alot less accurate, and would not be able to save the pixelation into a file. Both was only able to render in mentalRay at the moment If anyone is interested in getting access to the script, Ill be more than willingly, however it is in a big mess and horribly inefficient, and I should probably leave my scripting signature in my code somewhere so it will take me a few days to compile it together. Will post it up in properly in the next coming months on my blog and/or website. Would like to hear from anyone for any input, Realised I will need to do a proper webpage next month
In : Related