• What are you working on? May 2012
    2,222 replies, posted
  • [QUOTE=Socram;35963087]Read the first line please. I'm looking mostly at ease of use/support comparing directx and opengl. I've heard documentation for openGL is pretty flaky for example.[/QUOTE] Fuck off. You changed the line. Don't act like I didn't read it. [highlight](User was banned for this post ("Flaming" - Orkel))[/highlight]
  • Use direct3d11 with feature levels. Easier to use, really helpful debug output, great debug programs, loads of samples. Can't go wrong for windows only.
  • [QUOTE=Socram;35962821]Any opinions from you guys on OpenTK vs SlimDX, when cross-platform development is NOT a factor I care about? Is there any advantage to using OpenGL over DirectX or vice versa?[/QUOTE] Besides OpenGL being cross platform, they both expose the same GPU functionalities. I haven't used DirectX before, but IIRC it has an optional higher-level API which could make things easier for you if you haven't done any graphics programming yet. As for OpenGL's documentation, it's excellent if you know what you're doing and just need a reference. There are quick reference cards and online manuals for OpenGL 4.2, 3.3, and 2.1: [url]http://www.opengl.org/sdk/docs/man4/[/url] [url]http://www.opengl.org/sdk/docs/man3/[/url] [url]http://www.opengl.org/sdk/docs/man/[/url] You can also read the specification if you need an answer to a specific question. As for guides to help beginners learn modern OpenGL, there isn't a whole lot. You could buy the OpenGL SuperBible and learn with that, or use one of these guides: [url]http://www.arcsynthesis.org/gltut/[/url] [url]http://www.swiftless.com/opengltuts/opengl4tuts.html[/url] [url]http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Chapter-1:-The-Graphics-Pipeline.html[/url] [editline]15th May 2012[/editline] OpenGL debugging is actually pretty poor compared to DirectX though, assuming you're going with pure OpenGL and pure DirectX and not some wrapper or game engine.
  • [QUOTE=Socram;35963087]Read the first line please. I'm looking mostly at ease of use/support comparing directx and opengl. I've heard documentation for openGL is pretty flaky for example.[/QUOTE] what a prick.
  • I got some stupid code. I need to call it with a frame number, and the number of total frames, and have it return a value that is higher in the middle frame, and lower in the bottom frame. The kicker is that all added together - the returned values should be exactly equal to the number of frames. I couldn't get it working properly - so I ended up with this kind of yucky stuff. [img]http://puu.sh/uQFi[/img] Anyone got the solution? I'm sure it's simple and staring me in the face.
  • You mean like a [url=http://en.wikipedia.org/wiki/Gaussian_function]bell curve[/url]? Also, use lookup tables goddamn [lua]local fr16 = { [0] = 0.3, 0.4, 0.6, -- ... 0.6, 0.4, 0.3 }; -- ... local function FrameCurve(f, num) if (num == 16) then return fr16[f]; end -- ... end [/lua]
  • [img]http://i.imgur.com/Wisrx.gif[/img] You could use a sin wave: [code] float r = (f / num) * PI return sin( r ); [/code] I think that's right. Edit: nope. updated
  • [lua]local function FrameCurve( f, num ) return 1 - math.cos( f * math.pi * 2 / num) end[/lua] Something like that, although not tested
  • Depends on the shape of oscillation he wants. Pure sinewaves don't produce smooth deltas, especially at the peaks.
  • [QUOTE=swift and shift;35964691][img]http://i.imgur.com/3auLS.png[/img][/QUOTE] the E has to be a non-capital e, or else it's an exponent as in 10^x
  • [QUOTE=Lexic;35964697]Depends on the shape of oscillation he wants. Pure sinewaves don't produce smooth deltas, especially at the peaks.[/QUOTE] I'm not sure what you mean. Would one cosine and one divide be slower to compute than the square root, exponents and divisions used in a bell curve? If you knew that frame counts were always powers of 2 you could build a high resolution lookup using either method (say 256 entries) and get values from there.
  • [QUOTE=DrLuke;35964746]the E has to be a non-capital e, or else it's an exponent as in 10^x[/QUOTE] it's mathematica, all built-ins are pascal cased E, Sin, ContourPlot, etc
  • I tried using sin, that was the first thing I tried. I don't think it works properly because of the frame numbers. Although thinking about it again - it seems like it should work, because the complete curve balances out - so as long as the frames are spaced out evenly it should work?
  • a 'nice' solution would probably take more effort and be slower at runtime than an ugly hardcoded lookup table don't bother
  • [QUOTE=Ziks;35964755]I'm not sure what you mean. Would one cosine and one divide be slower to compute than the square root, exponents and divisions used in a bell curve? If you knew that frame counts were always powers of 2 you could build a high resolution lookup using either method (say 256 entries) and get values from there.[/QUOTE] [IMG]http://i.imgur.com/ehuJm.png[/IMG] (Dotted line = sinewaves, red = deltas) I was referring more to the distribution of changes in value, probably using the wrong words. I don't know what Garry's using these for, but depending on the curve used to generate the values, you can get completely different effects while leaving the overall result the same.
  • I assumed this would be for an oscillating animation, and using a bell curve would be weighted too much towards 0 whereas a sine has equal weighting between 0 and the max (2).
  • [QUOTE=swift and shift;35964863]a 'nice' solution would probably take more effort and be slower at runtime than an ugly hardcoded lookup table don't bother[/QUOTE] I think you are right
  • Im trying to make a voxel rederer ala minecraft, but I was wondering, how should I manage the optimisation? I thought of: add each cube's triangles to a chunks VBO, then go through all cubes and check if there are other cubes on/under/next to the current one, if so go on to check the next one. if not add the index of that given side of that cube. Then ofcourse only update when the player has deleted/created a new cube
  • Extended my heating model for the aerospace simulator. [IMG]http://i.imgur.com/TfLiy.png[/IMG] [IMG]http://i.imgur.com/TmPBr.png[/IMG] A bit nicer, but low poly: [img]http://i.imgur.com/kV1Xq.png[/img] It has basic simulation of shockwave boundary layer (at least the shockwaves formed by leading/trailing edges of wings, also shockwaves formed by fuselage). On the picture that's the large green area/streaks on the fuselage side (increased heating due to shockwaves iteracting with fuselage). Ignore the very hot tail - that's a limitation of calculations (it doesn't work well for surfaces which cast shockwaves on themselves yet). [B]The heating model works in realtime[/B]. It is not CFD (as in solving equations of flow), but it's an approximation of CFD (it accounts for geometry and gives sufficiently nice results). Compare to real result (some heating components like thermal radiation from plasma around the spacecraft are not accounted for but general trend is OK). [B]This is Buran. The vehicle on my pictures is longer than this[/B]: [IMG]http://buran.ru/images/jpg/ter261.jpg[/IMG]
  • [QUOTE=Richy19;35966701]Im trying to make a voxel rederer ala minecraft, but I was wondering, how should I manage the optimisation? I thought of: add each cube's triangles to a chunks VBO, then go through all cubes and check if there are other cubes on/under/next to the current one, if so go on to check the next one. if not add the index of that given side of that cube. Then ofcourse only update when the player has deleted/created a new cube[/QUOTE] Something like that, yeah. In my code each chunk has an updateMesh() method, which rebuilds the mesh (as an index buffer) and reuploads it to video memory. The vertex buffer (with positions and normals and stuff) is left unchanged; in fact, I only have one buffer which is shared by all of the chunks, but that's not really an important optimisation. In terms of culling faces, which I think you were asking about, you need to run through each block in the chunk, and check for a neighbouring block in each direction - if not, push that face to your index buffer. For faces on the edge of the chunk you're best off assuming that the adjacent block is unoccupied, until you add cross-chunk culling; otherwise you'll have missing faces at chunk boundaries. Another thing to think about is putting each set of faces (for each direction) into a separate buffer: this means you can render only faces pointing towards the player, which cuts the transform cost significantly. That's more of a fiddly thing though, you're better off getting it mostly working first before you go all-out on the optimization. [editline]15th May 2012[/editline] It's bloody messy, but if you like you can search for "bloxelcraft" on github, my code's all public.
  • I've got a spare Pi, so I've decided to give it to a good (developer) home. Tweet me a reason why you should get a Pi, and I'll pick one within the next day or two and get a Pi out to you within the next week or so: [url]https://twitter.com/#!/hexxeh/status/202444390046777344[/url]
  • [vid]http://dl.dropbox.com/u/4093439/projectiles.webm[/vid] Working on Minor Destruction again. I've teamed up with a seasoned game designer who worked on Homefront (and he quit because they wouldn't listen to him when he said it was going to be shit :v:) This is projectile networking that I've just finished. The game can handle 256 projectiles at any one time (due to the projectile ID being a byte for network speed), and the projectiles' positions are predicted clientside; the server doesn't tell the client where the projectiles are at all.
  • [QUOTE=Hexxeh;35967372]I've got a spare Pi, so I've decided to give it to a good (developer) home. Tweet me a reason why you should get a Pi, and I'll pick one within the next day or two and get a Pi out to you within the next week or so: [url]https://twitter.com/#!/hexxeh/status/202444390046777344[/url][/QUOTE] Turb should port JSOS to it.
  • [QUOTE=Jookia;35964000]Fuck off. You changed the line. Don't act like I didn't read it.[/QUOTE] I had changed it prior to your post though, which was why I said that, it isn't my fault you didn't refresh, I just thought you had read it quickly and legitimately missed it. Sorry for the misunderstanding. I'm not a prick, or at least I wasn't trying to be :(
  • [QUOTE=BlackPhoenix;35966752]Extended my heating model for the aerospace simulator. [url]http://i.imgur.com/TfLiy.png[/url] [url]http://i.imgur.com/TmPBr.png[/url] A bit nicer, but low poly: [url]http://i.imgur.com/kV1Xq.png[/url] It has basic simulation of shockwave boundary layer (at least the shockwaves formed by leading/trailing edges of wings, also shockwaves formed by fuselage). On the picture that's the large green area/streaks on the fuselage side (increased heating due to shockwaves iteracting with fuselage). Ignore the very hot tail - that's a limitation of calculations (it doesn't work well for surfaces which cast shockwaves on themselves yet). [B]The heating model works in realtime[/B]. It is not CFD (as in solving equations of flow), but it's an approximation of CFD (it accounts for geometry and gives sufficiently nice results). Compare to real result (some heating components like thermal radiation from plasma around the spacecraft are not accounted for but general trend is OK). [B]This is Buran. The vehicle on my pictures is longer than this[/B]: [url]http://buran.ru/images/jpg/ter261.jpg[/url][/QUOTE] When can I play this, and where do I send all my money to?
  • [QUOTE=DrLuke;35968247]When can I play this, and where do I send all my money to?[/QUOTE] Right now it comes as a plugin for X-Plane: [URL]http://forums.x-plane.org/index.php?app=downloads&showfile=9115[/URL] That version only has a capsule, not this shuttle, and not the more advanced heating model. Just a rocket that flies, and a little bit of stuff to make own designs (with X-Plane Plane Maker). If you want to help... I want to write my own flight dynamics and make my own free aerospace flight simulator. I'm thinking of Outerra for rendering (photo-realism/HDR is required). So I guess I could use money to buy a license from them or something - but they didn't really give any detailed information on licensing yet. I mean if you're serious about the money and the Outerra guys are serious about selling their engine, then I could build an aerospace simulator akin to X-Plane, though more oriented on making own spacecraft. [b]Edit:[/b] Think this, but with a GUI [i]that fits me better[/i]: [img]http://soportealainformatica.files.wordpress.com/2012/02/vomf.png[/img]
  • This is amazing, I wish I had xplane to try it out. When you really move this to your own engine, will you support some sort of scripting similar to Orbiter? Will you implement docking? What about some sort of plug and play rocketry like kerbal space program?