• What are you working on? January 2012
    3,401 replies, posted
[QUOTE=Mr. Smartass;34286762]What documentation did you use to learn how to use voxels and marching cubes? I've tried for weeks to even begin approaching that.[/QUOTE] I read a few articles, but the most useful one was this: [url]http://paulbourke.net/geometry/polygonise/[/url]
So apparently whatever specific version of OpenGL ES 2 Android uses will optimize out uniforms that aren't used directly in the calculation of gl_Position. I don't see how the hell they expect you to use them in the calculation of varying values.
[QUOTE=Tyco RC;34286791]So apparently whatever specific version of OpenGL ES 2 Android uses will optimize out uniforms that aren't used directly in the calculation of gl_Position. I don't see how the hell they expect you to use them in the calculation of varying values.[/QUOTE] GLSL compilers optimize the shit out of your code. If the varying isn't actually being used it gets optimized out (IIRC) and all the code that sets the varying also gets thrown out. And it's not the version that Android is using, it's whatever drivers your specific phone has.
[QUOTE=robmaister12;34287150]GLSL compilers optimize the shit out of your code. If the varying isn't actually being used it gets optimized out (IIRC) and all the code that sets the varying also gets thrown out. And it's not the version that Android is using, it's whatever drivers your specific phone has.[/QUOTE] Right. I didn't wanna explain the entire scenario but essentially I [I]am[/I] using the varying...extensively. That's what was so bullshit about it. I didn't use the uniform in the one line of code that started with "gl_Position = " so the compiler decided to just completely ignore all the other times that I used the uniform. I solved the problem by reorganizing the code a bit since the entire effect is done in screen space anyway.
[QUOTE=amcfaggot;34282009]I don't understand how you're going to base everything on shader rendering. It doesn't sound practical to me, but I don't know diddly shit about what you're doing so I won't say much. I would assume there is a reason why everything just uses standard 3D primitives otherwise we probably would have heard more about this sort of technique outside of your project.[/QUOTE] There are several games that use ray tracing already. For example [URL="http://voxelstein3d.sourceforge.net/"]Voxelstein 3D[/URL]. It is possible. What enables us to draw such a large world is that since we're only drawing huge cubes, we can use a tailor-made algorithm for tracing rays. [QUOTE=amcfaggot;34282009] This also runs terribly on my system, but it is WebGL, so perhaps that could also play a factor?[/QUOTE]Currently, the shader not only draws the landscape, it also generates it about 500 times for each ray. This will not be the case in the final version, in which each ray will only look up an array instead of generate the landscape itself. The landscape will be generated by the application and transferred to the graphics card by using textures. WebGL is hardware-accelerated, so it shouldn't make a difference. [QUOTE=amcfaggot;34282009] I'm just spewing thoughts here, maybe they're shit, but I simply don't get how you're going to do everything within a shader. Could someone explain this to my feeble brain?[/QUOTE] Don't worry about it. I really think ray tracing is the future as it removes all problems related to refraction/reflection and transparencies in normal polygon rendering.
[QUOTE=Smashmaster;34286597][img]http://img839.imageshack.us/img839/2263/noisec.png[/img] What have I done.[/QUOTE] the award for best wrinkled paper graphics goes to
I think I've pretty much finished up my little sprite program tonight, adding the last feature that I wanted in there, which was the ability to create sprite sheets with the addition of multiple frames. I want to release it but I feel the code is such a mess that it might be a good idea to clean it up, saying anyone can peak at it with it being love2d - but hey it works and I'm happy about that. :v: Here's a video showcasing pretty much everything. (I recommend 720p) [media]http://www.youtube.com/watch?v=-J71klBi5M4[/media] The outputted file: [img]http://puu.sh/dSIb[/img] and the animation: [vid]http://puu.sh/dSIm[/vid]
[QUOTE=Tyco RC;34287288]Right. I didn't wanna explain the entire scenario but essentially I [I]am[/I] using the varying...extensively. That's what was so bullshit about it. I didn't use the uniform in the one line of code that started with "gl_Position = " so the compiler decided to just completely ignore all the other times that I used the uniform. I solved the problem by reorganizing the code a bit since the entire effect is done in screen space anyway.[/QUOTE] You might want to check your in/outs. GLSL is case sensitive and variations between your vertex/frag out/in specifications can cause weird shit to happen
Finished my animation system. It makes it able for you, in a component system, to just add "AnimationPlayer" to the object and it can animate a spritesheet. If you have a "spritename".anim in the same folder as the "spritename".png, then he will play animations based on what you have defined in the .anim file. An example animation for a light that just blinks every 3 seconds. [code] { "Animation" : { "name" : "Game.Anim.Idle", "looping" : true, "frames" : [ { "FrameX" : 0, "FrameY" : 0, "FrameTime" : 3000 }, { "FrameX" : 1, "FrameY" : 0, "FrameTime" : 50 } ] }, .... more animations } [/code] Makes it really easy for the game designer on the project to mess around with animations without me having to hardcode frames into objects. Could probaby add a "FrameRandDiff" to have it +- a random value to the frame time.
[QUOTE=PieClock;34288256]I think I've pretty much finished up my little sprite program tonight, adding the last feature that I wanted in there, which was the ability to create sprite sheets with the addition of multiple frames. I want to release it but I feel the code is such a mess that it might be a good idea to clean it up, saying anyone can peak at it with it being love2d - but hey it works and I'm happy about that. :v: Here's a video showcasing pretty much everything. (I recommend 720p) The outputted file: [img]http://puu.sh/dSIb[/img] and the animation: [/QUOTE] just in case you didn't know you can set photoshops scaling method to nearest neighbor which results in "clean" enlarged images (of course only scale by the power of 2) and if you want to draw pixel art in photoshop just switch from the brush to the pen tool which draws only one pixel at a time without interpolating. but otherwise the program looks nice, gj
[QUOTE=Nighley;34288331]just in case you didn't know you can set photoshops scaling method to nearest neighbor which results in "clean" enlarged images[/QUOTE] Yeah, that's what I meant in the video when I mentioned Photoshop. I'm pretty sure there's programs out there that do what mine does already too, but I was just in the mood for taking a problem and solving it when I started. Thanks though. :smile:
[QUOTE=PieClock;34288354]Yeah, that's what I meant in the video when I mentioned Photoshop. I'm pretty sure there's programs out there that do what mine does already too, but I was just in the mood for taking a problem and solving it when I started. Thanks though. :smile:[/QUOTE] np, I mean we are here because we love programming, even if it's the 100th minecraft clone, we do it because it's fun ;p
[QUOTE=Nighley;34288364]np, I mean we are here because we love programming, even if it's the 100th minecraft clone, we do it because it's fun ;p[/QUOTE] voxel based games are not minecraft clones
[QUOTE=PieClock;34288354]Yeah, that's what I meant in the video when I mentioned Photoshop. I'm pretty sure there's programs out there that do what mine does already too, but I was just in the mood for taking a problem and solving it when I started. Thanks though. :smile:[/QUOTE] Take a look at [URL="http://www.aseprite.org/"]aseprite[/URL]. I'm sure there's more than a few features you can [del]steal[/del] take inspiration from.
[QUOTE=BlkDucky;34288449]Take a look at [URL="http://www.aseprite.org/"]aseprite[/URL]. I'm sure there's more than a few features you can [del]steal[/del] take inspiration from.[/QUOTE] More like glance at thinking "I wish I could do that". :v: Thanks though, I'll take a look around it.
[QUOTE=AtomiCasd;34288378]voxel based games are not minecraft clones[/QUOTE] i wasn't referring to any projects being posted here right now, just a random example.
[QUOTE=Nighley;34288522]i wasn't referring to any projects being posted here right now, just a random example.[/QUOTE] ah
[QUOTE=Smashmaster;34286142]A torus, generated implicitly out of voxels, and then rendered using marching cubes: [img]http://img560.imageshack.us/img560/3601/marchingcubes.png[/img] God I feel smart today. [editline]18th January 2012[/editline] For those of you who don't know what marching cubes does, it turns something like this: [img]http://img190.imageshack.us/img190/1020/cubesb.png[/img] Into this: [img]http://img402.imageshack.us/img402/2893/notcubes.png[/img] Think Minecraft, except 1000% cooler.[/QUOTE] Is that ray casted?
Is there a plugin for vs that autoformats your code so that for example variable names, function names and declarations are just below eachother in header files, giving you a nice slick overview?
[QUOTE=Smashmaster;34286142]A torus, generated implicitly out of voxels, and then rendered using marching cubes: [img]http://img560.imageshack.us/img560/3601/marchingcubes.png[/img] God I feel smart today. [editline]18th January 2012[/editline] For those of you who don't know what marching cubes does, it turns something like this: [img]http://img190.imageshack.us/img190/1020/cubesb.png[/img] Into this: [img]http://img402.imageshack.us/img402/2893/notcubes.png[/img] Think Minecraft, except 1000% cooler.[/QUOTE] Is there like a public domain or BSD lookup table out there somewhere? Because I started writing out all the cases by hand and got to like 32/256 before I quit.
[QUOTE=ROBO_DONUT;34288957]Is there like a public domain or BSD lookup table out there somewhere? Because I started writing out all the cases by hand and got to like 32/256 before I quit.[/QUOTE] There should be a way to generate them automatically...
[QUOTE=ROBO_DONUT;34288957]Is there like a public domain or BSD lookup table out there somewhere? Because I started writing out all the cases by hand and got to like 32/256 before I quit.[/QUOTE] There are a couple on [url=http://paulbourke.net/geometry/polygonise/]the link[/url] from a few pages back
[QUOTE=Dlaor-guy;34289405]There should be a way to generate them automatically...[/QUOTE] Care to enlighten me? If you're talking about the symmetry trick, you still need an LUT, and you end up adding a whole mess of ugly conditionals. [editline]19th January 2012[/editline] [QUOTE=bean_xp;34289442]There are a couple on [url=http://paulbourke.net/geometry/polygonise/]the link[/url] from a few pages back[/QUOTE] Excellent!
I found this while searching for marching cubes on an octree (sound is very quiet): [video=youtube;pqBSNAOsMDc]http://www.youtube.com/watch?v=pqBSNAOsMDc[/video] The paper on [URL="http://gamma.cs.unc.edu/DenseCrowds/"]http://gamma.cs.unc.edu/DenseCrowds/[/URL] has a detailed description of the algorithm. [editline]19th January 2012[/editline] Not working on this, just thought it would be interesting. The saving routines for MarsMiner are taking shape slowly. [editline]19th January 2012[/editline] What's faster: Queueing writes so there's only one at a time or writing into all files at the same time? Individual writes would be relatively small.
Before I go to school, have some surreal terrain: [img]http://img267.imageshack.us/img267/8210/terrainr.jpg[/img]
This is only rendered right? How would you actually put this to use in term of collision and whatnot? Does it only exist on the GPU?
[QUOTE=AtomiCasd;34288291]Finished my animation system. It makes it able for you, in a component system, to just add "AnimationPlayer" to the object and it can animate a spritesheet. If you have a "spritename".anim in the same folder as the "spritename".png, then he will play animations based on what you have defined in the .anim file. An example animation for a light that just blinks every 3 seconds. [code] { "Animation" : { "name" : "Game.Anim.Idle", "looping" : true, "frames" : [ { "FrameX" : 0, "FrameY" : 0, "FrameTime" : 3000 }, { "FrameX" : 1, "FrameY" : 0, "FrameTime" : 50 } ] }, .... more animations } [/code] Makes it really easy for the game designer on the project to mess around with animations without me having to hardcode frames into objects. Could probaby add a "FrameRandDiff" to have it +- a random value to the frame time.[/QUOTE] Do you mind me taking this and using it in my own games? (modified, though) I think you should rename the "Animation" object to the name of the animation.
[QUOTE=AtomiCasd;34291577]This is only rendered right? How would you actually put this to use in term of collision and whatnot? Does it only exist on the GPU?[/QUOTE] Seems like collision would be easy.. You'd just check for blocks around the block it's hit and check for collisions with the triangles they produce.
Been away a bit with exams and stuff, but no more exams now until Monday, so I've given myself the night off :) finally got my phone controlling my NXT over Bluetooth. It's actually really cool - I can access all of the sensors and stuff directly via Bluetooth, so my phone's basically now got wheels and sensors and stuff. I can think of so many camera/web based robot ideas for this :D small things first though. [editline]19th January 2012[/editline] I know you guys like pictures, so here's a crappy photo of my phone tied to the robot: [quote][img]http://i.imgur.com/1HqAw.jpg[/img][/quote] [editline]19th January 2012[/editline] Had to rebuild it to keep the centre of gravity over the wheels :S
Lemme just comment this out real quick... [img]http://dl.dropbox.com/u/11093974/Junk/errors.png[/img] Oh... oops
Sorry, you need to Log In to post a reply to this thread.