Radiohead 3d-data available

All topics about ZGameEditor goes here.

Moderator: Moderators

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

Radiohead 3d-data available

Postby VilleK » Wed Jul 16, 2008 5:05 pm

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: 1599
Joined: Sat Feb 23, 2008 11:15 pm

Postby Kjell » Wed Jul 16, 2008 5:29 pm

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

Postby jph_wacheski » Thu Jul 17, 2008 10:45 am

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: 1844
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Postby VilleK » Fri Jul 18, 2008 2:48 pm

...
Attachments
radiohead.png
radiohead.png (46.98 KiB) Viewed 10044 times

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

Postby jph_wacheski » Fri Jul 18, 2008 2:56 pm

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: 1844
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Postby VilleK » Fri Jul 18, 2008 3:11 pm

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 894 times

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

this runs well in 2015

Postby StevenM » Wed Jan 07, 2015 2:17 pm

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
Radiohead2.zgeproj
(2.63 KiB) Downloaded 100 times
Radiohead_PointCloud.jpg
Radiohead_PointCloud.jpg (71.3 KiB) Viewed 2631 times

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

Postby VilleK » Wed Jan 07, 2015 5:49 pm

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: 1599
Joined: Sat Feb 23, 2008 11:15 pm

Re: this runs well in 2015

Postby Kjell » Wed Jan 07, 2015 6:02 pm

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

Postby StevenM » Wed Jan 07, 2015 8:55 pm

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

Postby StevenM » Wed Jan 07, 2015 9:17 pm

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.


Return to “General discussion”

Who is online

Users browsing this forum: No registered users and 0 guests