Radiohead 3d-data available

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Radiohead 3d-data available

Post by VilleK »

This is something cool I stumbled upon when trying to set up the ZGE-Subverstion server:

http://code.google.com/creative/radiohead/

It's the latest video by one of my favorite bands Radiohead. It is completely based on 3d-scanning technology.

It's a very nice video to look at, but the most interesting part is that they've made the 3d-data available for download for anyone to play around with!

Perhaps it can be used in a ZGE program if you preprocess in first into a format that can be read by the File-component. Just an idea if anyone have the time to try it out :)
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hej Ville,

I bumped into that subsite on Google Code yesterday as well :) Nice idea, but not that fond of the actual video, almost feels like a showcase of the technology rather then a well directed clip. They should have asked Jonathan Glazer again ( Street Spirit ) .. or Chris Cunningham.

Anyway, the CSV files are quite big ( 400mb in total ) .. which reminds me that it would be a good idea to add a "External" option to the BitmapFromFile and MeshFromFile :wink: components when you don't want the data to be stored in the .zgeproj file.

K
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

HoC

Post by jph_wacheski »

I am a fan of that song, and the way they relased it as a "pay what you want" experiment,. The whole album is quite good.

The video was a bit hard to watch for me, with all that jumping noise around the singing head parts,. and I am often a big fan of noise,. ;) Not sure if it wasn't just the jpg-ing or was intentionally done. The shots of the suburbs desintegrating into particles where very sweet! "Infrastructure will collapse,." quite.

I friend of mine was just telling me about LIDAR. He helped build the one that recently landed on Mars. They are useing it to take mesurments of the atmosphere,. . cool technology,. another set of eyes we will give to our mecha-children..,
iterationGAMES.com
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

...
Attachments
radiohead.png
radiohead.png (46.98 KiB) Viewed 23176 times
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

Ha! nicely done!
How did you do it, is that a bitmap or geomatery? I d/led some of the data yesterday, .however haven't goten around to lookin at the structure,. are you going to make a demo and send it to them ?
iterationGAMES.com
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

It was really simple, only took me an hour. The data is in a comma separated textfile with x,y,z,intensity values of every particle. I wrote a tool that converted the textfile to binary. Then I use the File-component to read the data and spawn models.

There are many limitations:
- fps is around 2 :) But now a sphere-geometry is drawn, it would be faster to use a rendersprite component.
- you can't say "loop until end of file" when reading with the file-component, so currently I loop 12000 iterations which is about all particles for the first frame.
- no animation, this is the first frame only. Perhaps it would be possible to removeallmodels, increase a file-name variable, and read another frame-file every second or so.

The converter tool (with delphi-source) takes the name of a data-file in an edit-control. The file is converted to binary and saved with the same name but without the csv-extension.

I'm posting the stuff here if anyone else wants to play around with it. I'll take a few days vacation now, I'm back tuesday night.
Attachments
ZgeRadiohead.zip
(432.55 KiB) Downloaded 1429 times
StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

this runs well in 2015

Post by StevenM »

There are many limitations: - fps is around 2 Smile
Old Thread - but in 2015 - Not so many limitations.

Animated and working at 30 fps using gl points. I can't figure out a way to do it with a shader, This didn't work in FL Studio 11 (32 bit or 64 BIt). I'll try again when I update to FL12.

Loading the 1000 binary data per frame...There must be a better way - I'm open to any suggestions.

The data files need to be converted to binary and placed in a folder named "bin" in the project folder. The data files are here:

https://code.google.com/p/radiohead/downloads/list


I converted all the data files in one go with a python script:

Code: Select all

import sys, csv
from array import array

numframes=1000

if __name__ == "__main__":
    #inFile = sys.argv[1]
    inFilePath = r"I:\RadioheadPointCloud\HoC_AnimationData1_v1.0"
    for i in range(numframes):
        frame=str(i+1)
        inFile=inFilePath+"\\"+frame+".csv"
        outFile = open(inFilePath+"\\bin\\"+frame+".bin",'wb')
        xyzi=[]
        with open(inFile, 'rb') as f:
            reader = csv.reader(f, delimiter=',') #space-separated csv
            for row in reader:
                for v in range(len(row)):
                    xyzi.append(float(row[v]))
        fArray=array('f',xyzi)
        fArray.tofile(outFile)
        outFile.close()
        f.close()
Attachments
Radiohead_PointCloud.jpg
Radiohead_PointCloud.jpg (71.3 KiB) Viewed 15763 times
Radiohead2.zgeproj
(2.63 KiB) Downloaded 608 times
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Ha, so my project is from 2008, unbelievable how time flies...

Looks nice. When I wrote my project ZGE could not make direct OpenGL calls from scripting, so I understand yours is much faster (even when taking into account more powerful GPUs from today).
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: this runs well in 2015

Post by Kjell »

Hi StevenM,
StevenM wrote:Animated and working at 30 fps using gl points. I can't figure out a way to do it with a shader.
You definetely don't want to use immediate mode for these kind of things. Use a vertex array / buffer instead .. and ideally you want to use a geometry shader.
StevenM wrote:Loading the 1000 binary data per frame...There must be a better way - I'm open to any suggestions.
Load the entire frame to a Array using the TargetArray feature of the File component. Even though this feature doesn't support floats .. simply use a integer Array instead ( the array will contain the floating-point data regardless ).

Your version caps out at around 125 FPS on my system .. and here's 2 seconds of off-screen footage of a similar project ;)

Image

Top value is App.FPSCounter, bottom one is the CSV frame number.

K
StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

Post by StevenM »

VilleK wrote:Ha, so my project is from 2008, unbelievable how time flies...
Yes, It is a bit curious. Just a blink.
StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

Post by StevenM »

Kejell, thanks. Awsome tips as usual - I did try target array at first, but did get an error setting to float. I'll give it try - and I do believe that will run just fine in FL Studio, since the file move component was the source of the error. I want to add some parmeters fx,Music, and export a video.
.. and ideally you want to use a geometry shader
Still have not learned much geometry shaders - also seen another - Compute Shader(or is that just another name for geometry shader)? Would be great to experiment with these in ZGE.
Post Reply