PDA

View Full Version : Voxelized / Pixelated look


caustikstudio
03-25-2011, 12:05 PM
I'm looking for way to transform animated 3d models into pixelated / voxelized / boxy look
Reference:

http://www.caustik.tv/dropbox/voxel1.jpg

I've come across several scripts: Voxelizer and Voxelator (scriptspot.com) which basically use the same technique: Create an array of planes crossing the object and using Vol Select to delete the faces outside the intersecting area and then Shelling them.
While this method works, its very very slow. Scrubbing becomes impossible. And its not easy to animate the grid resolution ie, i have a teapot which i voxelized inside a 50x50x50 grid and i want to animate the resolution to be 10x10x10 (a bit like patrick jean's pixels piece right at the end).

I did come across this though:
http://www.youtube.com/watch?v=oNhhgUCGzGA&NR=1
and the guy mentions pflow and then i saw this (same guy)
http://www.youtube.com/watch?v=KfbyjOCQRVo

clearly he's using PFlow Toolbox#2 by Orbaz (Birth grid operator)

So i checked the Toolbox#2 docs first and aparently its possible to go for that look using the Birth grid operator. Limitations: My shapes cannot be animated (neither transforms nor subanimation).

So i thought maybe if use a Group selection operator or maybe a Deflector of some sort to send colliding particles to an event where they get a Cube Shape. It works partially because i get a trail for my object.

So does anyone know how it can be done in Pflow?

Thx

Nickolay411
03-28-2011, 06:48 PM
You are on the right track...

Anslem did this effect with animated mesh check it here:

http://vimeo.com/14869572

Basically there is a grid of voxel shapes birthed. And you use a box 3 operator to test whether or not those voxel shapes are inside the object, if they are they stay if they are not they are deleted.

You can check out how to do that here...

http://orbaz.com/forum/viewtopic.php?t=2964

-N

Bobo
03-28-2011, 07:31 PM
The PRT Volume object in the free Krakatoa Evaluation version could be used to produce the particle data for this (it is pretty much real time and dynamic, interpolates texture coordinates and whatnot).

It can be meshed using Particle Flow, or with the new Frost (http://www.thinkboxsoftware.com/frost/)mesher (see Johnny Random's test here:
http://4rand.com/). Of course, Frost costs money, but PFlow does not.

PsychoSilence
03-29-2011, 12:51 AM
if only frost was out at that time...would have been a time saver but we beat the project under par and got even more shots assigned :)

there's another free tool as well that does voxelation:
http://www.luima.com/voxpro.htm

John used prt volumes for 1 shot but it was too slow piping it back into pflow via prt birth and we had the ID issue with constantly changing points.

prt volume and frost is the way to go for future projects to come :) the money it costs you save on the time end.

Ansi

caustikstudio
03-29-2011, 06:27 AM
Thx lostdragon.

@Psychosilence: I managed to do it using Box#2's birthgrid and 2 group selections that check if the particles are inside of the animated mesh. The problem is it's way too slow. I don't think that meshing is the issue as these are just boxes and even if i turn off any shape operators and leave them as dots its as slow. Is it faster using Box#3?
The animated object is also a character like in your 8 bit man actually (thx lostdragon for the link)

@Bobo: Are you saying i should keep doing it in Flow and save my particles and load them using PRT loader? then mesh them either with Pflow or with frost?

Thx all for the input

PsychoSilence
03-29-2011, 06:56 AM
We used Box#3. it's data test with geometry sub-operator set to "Inside Objects" is way faster then any group or collision detection since it calculates a boolean being either true or false. We had severe amounts of birth grid particles for multiple characters and sorted out the outside of mesh particles as first operation using the data test i described and passed the particles into a new event, then we set all the other goodness like inheriting textures and writing it into the vertex color channel as well as shapes etc. sometimes the good old mapping object from the old box#1 did the job just as fine.

with frost you can use a prt volume and feed that straight into frost! then use KCMs to manipulate the data. John did some test he mentions above that it was faster caching the part volume and serveral other channels like textures before passing it on to frost. read his vimeo frost test descriptions for further notes.

-Anselm

JohnnyRandom
03-29-2011, 06:56 AM
@Bobo: Are you saying i should keep doing it in Flow and save my particles and load them using PRT loader? then mesh them either with Pflow or with frost?


Yes, I believe that is what he is saying. Once they are in PRT Format you can reload them into PFlow with PRT Birth/Update and assign a shape operator. Or just simply load the sequence into Frost then shape it.

Ansi, I used it for all my shots plus a couple fixes :p yes it was totally slow but super accurate even with the horrible holey interpenetrating meshes they gave us (with no time to fix) I liked Anselm's Box#3 method, it was quite a bit faster with a good mesh, I got the short end of the stick all of mesh meshes would bleed particles. Anselm, had mostly good meshes :)

caustikstudio
03-29-2011, 01:35 PM
Please have a look.
1. with Box#3 it's lightning fast, but i am getting a trail which i cannot get rid of.

2. I can't use a delete operator or Change amount operator for the simple reason that if the Sphere (my animated object) moves while animating into a position it was before the particles will already be deleted, hence i get voxel look with holes.

3. I tried having 2 data test operators in the same event, one that checks for particles inside and one for outside. The inside test goes to an event with a scale operator (set 100%) and the outside test to a scale operator of 0%. Also not working.

http://www.caustik.tv/dropbox/voxel_flow_01.jpg

caustikstudio
03-29-2011, 02:16 PM
Ok got it working with this flow, but its twice as slow as with a trail.

http://www.caustik.tv/dropbox/voxel_flow_02.jpg

PsychoSilence
03-29-2011, 02:47 PM
Don't do scale average!
Just create a regular data operator with "Inside Object" and pipe that into an OutputStandard set to Visibility Viewport/Render. That will hide and make unendurable what is outside of the mesh.

caustikstudio
03-29-2011, 03:55 PM
Thx Anselm, works great now...performance improved drastically.

Million Dollar Question now: How can we animate the birth grid size (For instance i have a sphere with a grid size of 2 and i want to animate it to size = 10 to give it a more pixelated look). Any ideas? I know it can't be animated, so is there a workaround?

PsychoSilence
03-29-2011, 04:27 PM
Thats a John question, he dis te voxel materialization on BEP.
Prt volume with animated spacing > prt birth > Krakatoa ID test > delete.

I pass to John now, he is the million dollar man!

JohnnyRandom
03-29-2011, 06:23 PM
It was also a million dollar hack :D with fingers crossed that it works for you the first time.

You basically need to animate the spacing value of the PRT Volume sounds easy and it should be but I ran into a bunch of xForm and alignment issues (it scales of of the bounding box x-0, y-0, z-0,or something it is one of the corners, instead of the pivot, which would be epic if is did, hint hint), all I can say is good luck :)

It may be easier (I haven't tried it) to cache to PRT and scale the PRT Loader or adjust via KCM.


Seriously you are jumping not walking into the bounds of Frost now, the amount of time I spent trying to get it all to work flawlessly easily would have bought the plugin. We are talking I can set something like this up in Frost+Krakatoa in 15 minutes, iterations are fast too, as opposed to an hour and a half setup and 5 hours of caching and tweaking, then more hours of re-caching and re-tweaking cus someone didn't like the initial look.

Bobo
04-04-2011, 07:25 PM
Here is a tutorial inspired by this thread:
http://www.thinkboxsoftware.com/frost-geometry-to-voxel-grid-c/

JohnnyRandom
04-04-2011, 09:28 PM
Here is a tutorial inspired by this thread:
http://www.thinkboxsoftware.com/frost-geometry-to-voxel-grid-c/

Hey Cool! and mapping stuff too! Lego Bunny just in time for Easter :) The Shell+Grow is awesome, I wouldn't have thought to use the Selection channel + Value*CurrentTime to select and delete, that has to be faster than a volume select.

Bobo
04-04-2011, 10:00 PM
Hey Cool! and mapping stuff too! Lego Bunny just in time for Easter :) The Shell+Grow is awesome, I wouldn't have thought to use the Selection channel + Value*CurrentTime to select and delete, that has to be faster than a volume select.

Not necessarily faster, but more precise, since you can get every single particle in the XY plane revealed (remove the 100* part and extend your sequence to 10000 frames and you will get ONE LEGO block per frame). With a Vol.Select, you can do one Z row at a time, but it is tricky to reveal pieces within the XY plane...

noouch
04-05-2011, 01:27 PM
You crazy kids with your boxes and your krakatoas. Back in my day we plunked in a script operator and god dammit we liked it :D

Bobo
04-05-2011, 03:35 PM
You crazy kids with your boxes and your krakatoas. Back in my day we plunked in a script operator and god dammit we liked it :D


What is even crazier, when I decided to learn how to write plugins with the SDK 7 years ago, the first thing I wrote was a LEGO Operator for PFlow.
It was fast, but nowhere as powerful as the combination of Krakatoa and Frost...
Now get the F off my lawn (http://www.youtube.com/watch?v=uNBU-tGRTJ4)! :D

CGTalk Moderation
04-05-2011, 03:35 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.