fogleman / fauxgl

Software-only 3D renderer written in Go.
MIT License
865 stars 70 forks source link

files used in the examples missing #8

Open ghost opened 6 years ago

ghost commented 6 years ago

for example the teapot is dependent on the teapot-ply existing.

mesh, err := LoadPLY("examples/ply/teapot.ply")

If they are too big maybe you can add a reference in the readme to where you got it and the others failing example from.

I found one here, but not sure if this is the right one https://people.sc.fsu.edu/~jburkardt/data/ply/teapot.ply

Hope this is not too much bother.. Its just alot of run playing around with this.

ghost commented 6 years ago

I got the teapot working and wrote a make script for it.

dep-examples-ply:
    # some exampples need source files
    mkdir -p ./examples/ply
    # teapot
    cd ./examples/ply && curl -O https://people.sc.fsu.edu/~jburkardt/data/ply/teapot.ply

dep-examples-ply-clean:
    rm -rf ./examples/ply

wondering where you got the dragon from :) mesh, err := LoadOBJ("examples/dragon.obj")

ghost commented 6 years ago

also the voxel source files for magica ?

// load a mesh
done = timed("loading vox file")
voxels, err := LoadVOX(os.Args[1])
ajeecai commented 6 years ago

I download the teapot.ply into correct place, and run $go run examples/teapot.go 1.206229528s

Only shows this 1.206229528s, without the graphic show up. Why? Try with MacOS and Ubuntu, the same result.

fogleman commented 6 years ago

@ajeecai It writes a file to the current working directory called out.png

ajeecai commented 6 years ago

Oh, how stupid I am, I didn't take a look into the code to find it out. Thank fogleman