I was going to make a 3D mesh viewer, but since images can store four values per pixel, I thought "Why not?"
I don't actually know if this would work if I had any properly formatted meshes, because the one I tried to make failed miserably. Instead, I use some images that I randomly generated instead of carefully plotted actual meshes. My format has one image for textures, one with information about the size and location of the textures, one for events (four-dimensional vertices), one to pair up textures and events to be considered the same object at different events & to interpolate between them, and finally one that describes a set of three event pairs and one texture pair that make up a triangular prism in four dimensions.
I am thinking about making a simpler 3D mesh viewer, because this got a bit out of hand.
I also made some great modular vector and matrix mini-libraries.
Controls:
E&Q = +&- w axis (time)
W&S = +&- z axis
Space&LShift = +&- y axis
D&A = +&- x axis
Y&H = Rotate XW axis
U&J = Rotate YW axis
I&K = Rotate ZW axis
Right click = rotate camera on x and y axis
When the program starts, hold the E key to change the time slice of the random 4D mesh in view (note that it does not exist at t=0).
4D Mesh Viewer [ROTATE THROUGH TIME]
- xXxMoNkEyMaNxXx
- Party member
- Posts: 206
- Joined: Thu Jan 10, 2013 6:16 am
- Location: Canada
4D Mesh Viewer [ROTATE THROUGH TIME]
- Attachments
-
Meshv2.2.love
- Four dimensional objects can get pretty trippy. Beware.
- (8.15 MiB) Downloaded 315 times
Last edited by xXxMoNkEyMaNxXx on Wed Apr 03, 2013 12:29 am, edited 1 time in total.
Re: 4D Mesh Viewer
weird, on my intel gfx card on Linux I see only a black screen, and when randomly hitting WASD keys after a while this error is thrown:
On my NVidia card I see at least the coordinates in the upper left corner of the window but nothing else, no crash occurs.
Code: Select all
Mesa 8.0.5 implementation error: Failed to compile fragment shader: FS compile failed: no register to spill
Please report at bugs.freedesktop.org
Error: [string "graphics.lua"]:1346: Invalid operation:
- Trying to send the wrong value type to shader variable, or
- Trying to send array values with wrong dimension, or
- Invalid variable name.
stack traceback:
[C]: in function 'sendFloat'
[string "graphics.lua"]:1346: in function 'send'
lib/mesh4d.lua:42: in function 'updateCamera'
main.lua:85: in function 'update'
[string "boot.lua"]:407: in function <[string "boot.lua"]:373>
[C]: in function 'xpcall'
On my NVidia card I see at least the coordinates in the upper left corner of the window but nothing else, no crash occurs.
experimental art since 13.75 gigayears
https://github.com/humansarepuppies
http://stardiaries-lab.blogspot.com/
https://github.com/humansarepuppies
http://stardiaries-lab.blogspot.com/
Re: 4D Mesh Viewer
I had the same experience, and then tried pressing the e key for a while when it first starts up, and I see some weird stuff show up. It does appear to move the way the controls suggest, but I have no idea what it's supposed to be.vitaminx wrote:weird, on my intel gfx card on Linux I see only a black screen
Re: 4D Mesh Viewer
looks quite trippy though 

experimental art since 13.75 gigayears
https://github.com/humansarepuppies
http://stardiaries-lab.blogspot.com/
https://github.com/humansarepuppies
http://stardiaries-lab.blogspot.com/
- xXxMoNkEyMaNxXx
- Party member
- Posts: 206
- Joined: Thu Jan 10, 2013 6:16 am
- Location: Canada
Re: 4D Mesh Viewer
It's a bunch of random four dimensional triangular prisms, which when only shown at a certain timeslice, look like polygons 

- xXxMoNkEyMaNxXx
- Party member
- Posts: 206
- Joined: Thu Jan 10, 2013 6:16 am
- Location: Canada
Re: 4D Mesh Viewer [ROTATE THROUGH TIME]
Most recent version.
wasd qe lshift space for axial translation,
right mouse & yuihjk for rotation on time and non-time axes.
numpad 123456 to rotate the model through time.
wasd qe lshift space for axial translation,
right mouse & yuihjk for rotation on time and non-time axes.
numpad 123456 to rotate the model through time.
- Attachments
-
Meshv2.2.love
- (8.15 MiB) Downloaded 183 times
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: 4D Mesh Viewer [ROTATE THROUGH TIME]
Code: Select all
~/Downloads♠ love Meshv2.2.love
Error: [string "graphics.lua"]:1368: Cannot compile shader:
Line 190: error: too little data in initialization
Line 190: error: OpenGL does not allow C style initializers
Line 190: error: too little data in initialization
Line 331: error: ambiguous overloaded function reference "min(int, int)"
Line 339: error: ambiguous overloaded function reference "min(int, int)"
stack traceback:
[C]: in function 'newPixelEffect'
[string "graphics.lua"]:1368: in function 'newPixelEffect'
lib/mesh4d.lua:17: in main chunk
[C]: in function 'require'
main.lua:4: in main chunk
[C]: in function 'require'
[string "boot.lua"]:331: in function <[string "boot.lua"]:227>
[C]: in function 'xpcall'
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Who is online
Users browsing this forum: No registered users and 2 guests