Comments (1)
I use "go run examples/gopher.go"
It's looking for relative path "examples/gopher.obj", not "gopher.obj"
On Mon, Feb 16, 2015 at 7:34 AM, Alexander F Rødseth <
[email protected]> wrote:
Hi,
When trying the examples, the cornell box works fine:
...t/pt/examples% ./cornell
Building k-d tree (8 shapes)... OK[Iteration 1 of 10]
512 x 512 pixels, 1 x 16 = 16 samples, 4 bounces, 2 cores
44 / 512 ( 8%) [=== ] 0:00:02 1.0M ^C%However, the cube fails:
...t/pt/examples% ./cube
Loading STL (Binary): examples/cube.stl
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x44183c]goroutine 1 [running]:github.com/fogleman/pt/pt.(*Mesh).FitInside(0x0, 0x0, 0x0, 0x0, 0x3ff0000000000000, 0x3ff0000000000000, 0x3ff0000000000000, 0x3fe0000000000000, 0x3fe0000000000000, 0x3fe0000000000000)
/home/alexander/go/src/github.com/fogleman/pt/pt/mesh.go:105 +0x82c
main.createMesh(0x3fa473f4a209de04, 0x3fb943b1fbe850e5, 0x3fc28e725522c76e, 0x0, 0x0, 0x0, 0x3ff0000000000000, 0x0, 0x0, 0x3ff8000000000000, ...)
/home/alexander/checkout/pt/examples/cube.go:11 +0x16c
main.main()
/home/alexander/checkout/pt/examples/cube.go:18 +0x18egoroutine 2 [runnable]:
runtime.forcegchelper()
/usr/lib/go/src/runtime/proc.go:90
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1goroutine 3 [runnable]:
runtime.bgsweep()
/usr/lib/go/src/runtime/mgc0.go:82
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1goroutine 4 [runnable]:
runtime.runfinq()
/usr/lib/go/src/runtime/malloc.go:712
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1So does the gopher:
2...t/pt/examples% ./gopher
Loading OBJ: examples/gopher.obj
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x43fb9b]goroutine 1 [running]:github.com/fogleman/pt/pt.(*Mesh).SmoothNormals(0x0)
/home/alexander/go/src/github.com/fogleman/pt/pt/mesh.go:84 +0x98b
main.main()
/home/alexander/checkout/pt/examples/gopher.go:13 +0xa4egoroutine 2 [runnable]:
runtime.forcegchelper()
/usr/lib/go/src/runtime/proc.go:90
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1goroutine 3 [runnable]:
runtime.bgsweep()
/usr/lib/go/src/runtime/mgc0.go:82
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1goroutine 4 [runnable]:
runtime.runfinq()
/usr/lib/go/src/runtime/malloc.go:712
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1And the cylinder:
...t/pt/examples% ./cylinder
Loading STL (Binary): examples/cylinder.stl
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x44018c]goroutine 1 [running]:github.com/fogleman/pt/pt.(*Mesh).FitInside(0x0, 0xbfb999999999999a, 0xbfb999999999999a, 0x0, 0x3ff199999999999a, 0x3ff199999999999a, 0x4059000000000000, 0x3fe0000000000000, 0x3fe0000000000000, 0x0)
/home/alexander/go/src/github.com/fogleman/pt/pt/mesh.go:105 +0x82c
main.createMesh(0x3fc633401672b92a, 0x0, 0x3fadcab5b09790d5, 0x0, 0x0, 0x0, 0x3ff0000000000000, 0x0, 0x0, 0x3ff999999999999a, ...)
/home/alexander/checkout/pt/examples/cylinder.go:7 +0x16c
main.main()
/home/alexander/checkout/pt/examples/cylinder.go:15 +0x18egoroutine 2 [runnable]:
runtime.forcegchelper()
/usr/lib/go/src/runtime/proc.go:90
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1goroutine 3 [runnable]:
runtime.bgsweep()
/usr/lib/go/src/runtime/mgc0.go:82
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1goroutine 4 [runnable]:
runtime.runfinq()
/usr/lib/go/src/runtime/malloc.go:712
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1This is on 64-bit Arch Linux, kernel 3.18.6, go 1.4.1.
Wonderful project, btw!
Best regards,
Alexander F Rødseth—
Reply to this email directly or view it on GitHub
#9.
from pt.
Related Issues (17)
- Where's the readme?
- Is pt suitable for simple real-time rendering? Can this be implemented? HOT 10
- Transformed triangle mesh render incorrectly HOT 4
- Will OpenGL version of this PT? HOT 3
- bunny example fails, no "bunny.obj" file HOT 2
- Crytek sponza not working :'( HOT 2
- Scene.RayCount crashes on 32bit systems with cgo
- Intel Embree support HOT 2
- Efficiency of Marching Cubes. HOT 3
- freestyle
- Submit gopher rendering to golang-graphics repository HOT 2
- SDFShape support for ClearMaterial HOT 1
- Any pointers for docs?
- Light baking
- what does "pt.Renderer.IterativeRender" do? no documentation?
- Would you consider a rename? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pt.