1. Post #1081
    Gold Member
    Jookia's Avatar
    July 2007
    6,768 Posts
    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.
    Fuck off. You changed the line. Don't act like I didn't read it.

    (User was banned for this post ("Flaming" - Orkel))
    Reply With Quote Edit / Delete Linux Australia Show Events Funny x 22Dumb x 2Informative x 1Friendly x 1Winner x 1 (list)

  2. Post #1082
    Philly c's Avatar
    February 2008
    553 Posts
    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.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  3. Post #1083
    Gold Member
    robmaister12's Avatar
    January 2008
    4,969 Posts
    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?
    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:

    http://www.opengl.org/sdk/docs/man4/
    http://www.opengl.org/sdk/docs/man3/
    http://www.opengl.org/sdk/docs/man/

    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:

    http://www.arcsynthesis.org/gltut/
    http://www.swiftless.com/opengltuts/opengl4tuts.html
    http://duriansoftware.com/joe/An-int...-Pipeline.html

    Edited:

    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.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  4. Post #1084
    Mechanical43's Avatar
    July 2007
    774 Posts
    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.
    what a prick.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Friendly Friendly x 8Dumb Dumb x 1Informative Informative x 1Agree Agree x 1 (list)

  5. Post #1085
    garry's Avatar
    September 2001
    12,366 Posts
    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.



    Anyone got the solution? I'm sure it's simple and staring me in the face.
    Reply With Quote Edit / Delete Windows 7 Show Events Funny Funny x 6Programming King Programming King x 2Dumb Dumb x 1 (list)

  6. Post #1086
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    You mean like a bell curve?
    Also, use lookup tables goddamn
    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
    
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Agree Agree x 8 (list)

  7. Post #1087
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,017 Posts
    Don't you just want a sine wave offset by +1?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 3 (list)

  8. Post #1088
    Gold Member
    danharibo's Avatar
    July 2006
    4,462 Posts


    You could use a sin wave:
    Code:
    float r = (f / num) * PI
    return sin( r );
    I think that's right.

    Edit: nope. updated
    Reply With Quote Edit / Delete Linux United Kingdom Show Events Disagree Disagree x 2 (list)

  9. Post #1089
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,017 Posts
    local function FrameCurve( f, num )
        return 1 - math.cos( f * math.pi * 2 / num)
    end

    Something like that, although not tested
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  10. Post #1090
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    Reply With Quote Edit / Delete Mac Australia Show Events Winner Winner x 3 (list)

  11. Post #1091
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    Depends on the shape of oscillation he wants. Pure sinewaves don't produce smooth deltas, especially at the peaks.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events

  12. Post #1092
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    the E has to be a non-capital e, or else it's an exponent as in 10^x
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Agree Agree x 1Disagree Disagree x 1 (list)

  13. Post #1093
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,017 Posts
    Depends on the shape of oscillation he wants. Pure sinewaves don't produce smooth deltas, especially at the peaks.
    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.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  14. Post #1094
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    the E has to be a non-capital e, or else it's an exponent as in 10^x
    it's mathematica, all built-ins are pascal cased

    E, Sin, ContourPlot, etc
    Reply With Quote Edit / Delete Australia Show Events Informative Informative x 5Agree Agree x 1 (list)

  15. Post #1095
    garry's Avatar
    September 2001
    12,366 Posts
    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?
    Reply With Quote Edit / Delete Windows 7 Show Events

  16. Post #1096
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    a 'nice' solution would probably take more effort and be slower at runtime than an ugly hardcoded lookup table

    don't bother
    Reply With Quote Edit / Delete Australia Show Events Agree Agree x 10 (list)

  17. Post #1097
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    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.

    (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.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Artistic Artistic x 1 (list)

  18. Post #1098
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,017 Posts
    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).
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  19. Post #1099
    garry's Avatar
    September 2001
    12,366 Posts
    a 'nice' solution would probably take more effort and be slower at runtime than an ugly hardcoded lookup table

    don't bother
    I think you are right
    Reply With Quote Edit / Delete Windows 7 Show Events Agree Agree x 5 (list)

  20. Post #1100
    Richy19's Avatar
    May 2010
    5,375 Posts
    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
    Reply With Quote Edit / Delete Linux United Kingdom Show Events

  21. Post #1101
    Gold Member
    BlackPhoenix's Avatar
    May 2006
    444 Posts
    Extended my heating model for the aerospace simulator.




    A bit nicer, but low poly:


    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).

    The heating model works in realtime. 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). This is Buran. The vehicle on my pictures is longer than this:
    Reply With Quote Edit / Delete Windows 7 Russian Federation Show Events Programming King Programming King x 45 (list)

  22. Post #1102
    Programming King and Most Patient Member 2013
    r0b0tsquid's Avatar
    December 2008
    1,196 Posts
    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
    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.

    Edited:

    It's bloody messy, but if you like you can search for "bloxelcraft" on github, my code's all public.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Informative Informative x 1 (list)

  23. Post #1103
    Moderator Illuminati
    Hexxeh's Avatar
    June 2006
    5,091 Posts
    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: https://twitter.com/#!/hexxeh/status/202444390046777344
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Friendly Friendly x 8Winner Winner x 1 (list)

  24. Post #1104
    Person
    geel9's Avatar
    June 2008
    5,589 Posts


    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 )

    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.
    Reply With Quote Edit / Delete Windows 8 United States Show Events Winner Winner x 4 (list)

  25. Post #1105
    Gold Member
    Robber's Avatar
    January 2006
    6,073 Posts
    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: https://twitter.com/#!/hexxeh/status/202444390046777344
    Turb should port JSOS to it.
    Reply With Quote Edit / Delete Windows 7 Austria Show Events Agree Agree x 21 (list)

  26. Post #1106
    Gold Member
    Socram's Avatar
    June 2006
    1,835 Posts
    Fuck off. You changed the line. Don't act like I didn't read it.
    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 :(
    Reply With Quote Edit / Delete Windows 7 United States Show Events Friendly Friendly x 3 (list)

  27. Post #1107
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    -snip-
    Reply With Quote Edit / Delete Windows XP United States Show Events Disagree Disagree x 4 (list)

  28. Post #1108
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    Extended my heating model for the aerospace simulator.

    http://i.imgur.com/TfLiy.png
    http://i.imgur.com/TmPBr.png

    A bit nicer, but low poly:
    http://i.imgur.com/kV1Xq.png

    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).

    The heating model works in realtime. 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). This is Buran. The vehicle on my pictures is longer than this:
    http://buran.ru/images/jpg/ter261.jpg
    When can I play this, and where do I send all my money to?
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Agree Agree x 6 (list)

  29. Post #1109
    Gold Member
    BlackPhoenix's Avatar
    May 2006
    444 Posts
    When can I play this, and where do I send all my money to?
    Right now it comes as a plugin for X-Plane: http://forums.x-plane.org/index.php?...&showfile=9115

    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.

    Edit:
    Think this, but with a GUI that fits me better:
    Reply With Quote Edit / Delete Windows 7 Russian Federation Show Events Winner Winner x 7 (list)

  30. Post #1110
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    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?
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Agree Agree x 1 (list)

  31. Post #1111
    Gold Member
    BlackPhoenix's Avatar
    May 2006
    444 Posts
    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?
    No plug and play rocketry. The editor lets you specify any sort of spacecraft/rocket parametrically (this means that you specify the fuselage shape by giving it a few crossections, and you specify wings by telling it what airfoil you want).

    This data is used by simulator for both physics and rendering (the idea similar to X-Plane).

    Docking will be supported. Please take note of this project too: http://vsfl.wireos.com/ Essentially that's an RPG for aerospace engineers - highly realistic one. It's a bit private - you gotta design at least one spacecraft capable of autonomous flight to enter. But this is built in X-Space networking (which can be reused for just multiplayer).

    I was planning to port X-Space (or rather networking part) to Orbiter, so Orbiter could be used with the VSFL network too. Of course the most "native" support would be in my simulator.

    There will be Lua scripting - my engine will be written in C and Lua (excluding Outerra, which is C++ and a bunch of other things). All high-level code is in Lua, so scripting is nearly trivial to implement (X-Space plugin is already built this way).

    IVSS (internal vessels systems simulator) is another big project, which will be part of this. In fact, it's the second most interesting one - it's for simulating complex systems in realtime by specifying them as simple blocks. Essentially a rapid prototyping tool. Say I want a hydraulic system of a nuclear reactor:


    I enter that into simulator, and get a realtime model which describes all transient processes and whatever that happens in my hydraulic system:



    This entire thing should come as a single modular package (simulator, aerodynamics editor, systems editor, and links to other software, e.g. CFD software for getting better aerodynamic solutions). Target goal: should be possible to fully design an aircraft on the preliminary level within months of work. After this first step is done and the design is sufficiently finalized the main engineering work can start.
    Reply With Quote Edit / Delete Windows 7 Russian Federation Show Events Winner Winner x 6Artistic Artistic x 1 (list)

  32. Post #1112
    Ritave's Avatar
    June 2008
    269 Posts

    I don't think my phong shader is working top notch
    Reply With Quote Edit / Delete Linux Poland Show Events Agree Agree x 3Funny Funny x 1 (list)

  33. Post #1113
    Clamp?
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Agree Agree x 1 (list)

  34. Post #1114
    Ritave's Avatar
    June 2008
    269 Posts

    Thanks, added more balls and clamped - but now they're full bright, gonna check out the code for additions.


    Edit:

    Yeah! It works! (Somewhat)
    Reply With Quote Edit / Delete Linux Poland Show Events

  35. Post #1115
    Gold Member
    dije's Avatar
    December 2008
    4,745 Posts


    I've come a long way since the last video I showed.
    The collision is done "per area" which means that the physboxes only check for collisions in their immediate area. Enjoy!
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Artistic Artistic x 10 (list)

  36. Post #1116
    MrTilepy's Avatar
    July 2007
    981 Posts
    I just generated my first Javadoc from a class I've been working on recently. It's an object that handles IPv4 and IPv6 addresses.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  37. Post #1117
    Gold Member
    Hypershadsy's Avatar
    February 2008
    2,407 Posts
    I just generated my first Javadoc from a class I've been working on recently. It's an object that handles IPv4 and IPv6 addresses.

    Looks very organized.

    Although... Am I the only one who likes the look of this type of Java documentation?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 5 (list)

  38. Post #1118
    Icedshot's Avatar
    April 2010
    2,323 Posts
    Not strictly what I'm working on, but If anyone else has been having the annoying Nvidia driver bug where the graphics card underclocks itself (and refuses to put the clocks back again), try this:

    http://dl.dropbox.com/u/33076954/clockFixer.rar

    Essentially it just crashes the driver by timing out the maximum length for clEnqueueNDRangeKernel under opencl

    If anyone particularly wants the source:
    http://dl.dropbox.com/u/33076954/GF.rar
    Reply With Quote Edit / Delete Windows Vista United Kingdom Show Events Programming King Programming King x 1 (list)

  39. Post #1119
    MrTilepy's Avatar
    July 2007
    981 Posts
    FP Programmers group has been compromised.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 4Disagree Disagree x 1Winner Winner x 1 (list)

  40. Post #1120
    AtomiCasd's Avatar
    June 2011
    588 Posts
    :D
    Reply With Quote Edit / Delete Windows 7 Norway Show Events Dumb Dumb x 20Informative Informative x 3Agree Agree x 2 (list)