1. Post #1641
    open.gl
    Overv's Avatar
    February 2007
    7,431 Posts
    I've started working on the drawing chapter of open.gl. You can expect it to be finished this weekend.

    Sneak preview:

    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Winner Winner x 19Funny Funny x 9Optimistic Optimistic x 2Late Late x 1 (list)

  2. Post #1642
    I've started working on the drawing chapter of open.gl. You can expect it to be finished this weekend.

    Sneak preview:

    Is that South-America you're drawing?
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Funny Funny x 17 (list)

  3. Post #1643
    Map in a box's Avatar
    July 2009
    7,413 Posts
    No, its obviously Orion's Nebula
    Reply With Quote Edit / Delete Windows XP United States Show Events Dumb Dumb x 1Informative Informative x 1Agree Agree x 1 (list)

  4. Post #1644
    itty-bitty pretty kitty
    Dennab
    September 2008
    9,837 Posts
    holy shit when did you start working on open.gl again
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 14Funny Funny x 5 (list)

  5. Post #1645
    Gold Member
    ZenX2's Avatar
    February 2009
    5,119 Posts
    Aww no more WAYWO Drama
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 7 (list)

  6. Post #1646
    Aww no more WAYWO Drama
    How about open.gl/drama because it was funning
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Dumb Dumb x 5 (list)

  7. Post #1647
    Gold Member
    Parakon's Avatar
    November 2008
    8,520 Posts


    suddenly swimming

    Edited:

    my shitty walking animation is so incomprehensible i made it the swimming one aswell, it kinda works.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Funny Funny x 24Winner Winner x 1 (list)

  8. Post #1648
    Gold Member
    Hypershadsy's Avatar
    February 2008
    2,422 Posts


    I've checked and rechecked to make sure nothing lossy is going on (like converting a float to an int and THEN multiplying by amplitude), and I've come to the conclusion that Processing's implementation of 1D Perlin noise is a bit flawed.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1Informative Informative x 1 (list)

  9. Post #1649
    Gold Member
    Parakon's Avatar
    November 2008
    8,520 Posts


    this was suppose to be where he attacks.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Funny Funny x 41Informative Informative x 1 (list)

  10. Post #1650
    Gold Member
    HiredK's Avatar
    November 2006
    435 Posts


    this was suppose to be where he attacks.
    Looks like he's having a seizure
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Agree Agree x 8Funny Funny x 3 (list)

  11. Post #1651
    itty-bitty pretty kitty
    Dennab
    September 2008
    9,837 Posts
    Should I work on my game? No! I'll work on .

    I'm procrastinating by doing something equally hard. That's new.

    Edited:

    In other news, I decided that I didn't need a whole GUI system like GWEN for my game. Then I wrote a GUI system like GWEN for my game.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Dumb Dumb x 8Informative Informative x 1Optimistic Optimistic x 1Funny Funny x 1 (list)

  12. Post #1652
    Putting Perlin Noise map generation in my game



    Edited:

    And different textures

    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Programming King Programming King x 2Artistic Artistic x 1 (list)

  13. Post #1653
    Gold Member
    Dr Magnusson's Avatar
    July 2008
    2,695 Posts
    I've started working on the drawing chapter of open.gl. You can expect it to be finished this weekend.

    Sneak preview:

    What is this, a website for ANTS? That website is gonna need to be at least... Three times bigger than this!
    Reply With Quote Edit / Delete Windows 7 Denmark Show Events Funny Funny x 11Dumb Dumb x 10Late Late x 1 (list)

  14. Post #1654
    Gold Member
    jack5500's Avatar
    November 2007
    106 Posts
    That awesome moment, when you got HLLIb working and can now support mods that need original game content (i.e. Modular Combat, Obsidian Conflict)
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Winner Winner x 7 (list)

  15. Post #1655
    Player + collisions!



    I know from the code I wrote there are some minor bugs with the collisions that have a chance of +/- 0.4% of happening, but when I try to fix them, they only get worse.

    I'm proud
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Agree Agree x 1 (list)

  16. Post #1656
    WHY WHEN WHY
    Krizzu's Avatar
    June 2011
    176 Posts
    Player + collisions!



    I know from the code I wrote there are some minor bugs with the collisions that have a chance of +/- 0.4% of happening, but when I try to fix them, they only get worse.

    I'm proud
    Love2d? :D
    Reply With Quote Edit / Delete Windows 7 Poland Show Events Agree Agree x 2 (list)

  17. Post #1657
    SHADERS
    Legend286's Avatar
    October 2008
    10,024 Posts
    Creating (or trying to create)

    an SSAO shader using the source shader editor.


    Anyone come accross the material override input having no affect on brush/lightmapped geometry?
    //Just drawing models... works fine


    //With world geometry turned on, still works but not for the brush geometry.


    Ideas? 5 hours later I'm stumped :/

    I'm attempting to create an RT with the scene geometry normals in it. If there's an easier way to do that I'd also be all ears :)
    You can't override world geometry, there simply isn't any support for it in the engine. You should instead create a custom shader which writes to COLOR0 and COLOR1 (albedo & depth in 0, pre-transformed & packed normals in 1) and render it with MRTS in the actual client dll code.

    You could also just use depth for your ssao, but you would have to render the scene a second time to an RGBA32F RT in order to get 32 bit depth, which you can then scale by dividing and saturating (as it's scaled already, but RGBA32F RTs can store any float value, which means you get the whole near-far range, it just looks like it's scaled.

    I made a shitty outline shader ages ago to test 32 bit depth.




    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Artistic Artistic x 7Winner Winner x 1Funny Funny x 1 (list)

  18. Post #1658
    Casual Bananas
    E X C L's Avatar
    February 2011
    1,716 Posts
    I finally got my camera moving.
    Reply With Quote Edit / Delete Mac Netherlands Show Events Programming King Programming King x 1 (list)

  19. Post #1659
    I finally got my camera moving.
    Good, now remake RollerCoaster Tycoon

    Edited:



    Forests =D
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Informative Informative x 1 (list)

  20. Post #1660
    Casual Bananas
    E X C L's Avatar
    February 2011
    1,716 Posts
    Good, now remake RollerCoaster Tycoon
    But somebody already did that.

    Edited:

    Also it's for an iOS game.
    Reply With Quote Edit / Delete Mac Netherlands Show Events Disagree Disagree x 2 (list)

  21. Post #1661
    Gold Member
    Fetret's Avatar
    December 2006
    1,390 Posts
    I am not exactly sure if it has been posted yet, and it isn't strictly something I am working on but;

    Farb-rausch made all their demo tool and demo source codes public!

    Here is the link:

    https://github.com/farbrausch/fr_public

    Simply amazing! And all the readme's and diaries make it kind of a historical archive.
    Reply With Quote Edit / Delete Windows 7 Turkey Show Events Late Late x 2 (list)

  22. Post #1662
    Richy19's Avatar
    May 2010
    5,411 Posts
    Is phong shading noticeable with just a cube? or do you need something more smooth to really notice it?

    I have this lighting:
    drawable2->setAmbientLighting( glm::vec4( 50, 60, 125, 230) );
        drawable2->setDiffuseLighting( glm::vec4( 0.6f, 0.4f, 0.2f, 0.8f) );

    which produces this effect:
    Reply With Quote Edit / Delete Linux United Kingdom Show Events

  23. Post #1663


    A pause screen, introducing the first shader I've ever made!
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Programming King Programming King x 19Artistic Artistic x 1 (list)

  24. Post #1664
    SHADERS
    Legend286's Avatar
    October 2008
    10,024 Posts
    Is phong shading noticeable with just a cube? or do you need something more smooth to really notice it?

    I have this lighting:
    drawable2->setAmbientLighting( glm::vec4( 50, 60, 125, 230) );
        drawable2->setDiffuseLighting( glm::vec4( 0.6f, 0.4f, 0.2f, 0.8f) );

    which produces this effect:
    Phong works on anything, you only need correct surface normals.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  25. Post #1665
    Richy19's Avatar
    May 2010
    5,411 Posts
    Phong works on anything, you only need correct surface normals.
    Does this look correct for phong shading?


    I think my code is correct but theres something buggy about it
    Reply With Quote Edit / Delete Linux United Kingdom Show Events

  26. Post #1666
    SHADERS
    Legend286's Avatar
    October 2008
    10,024 Posts
    Does this look correct for phong shading?


    I think my code is correct but theres something buggy about it
    Post your code, I don't see any phong what so ever in that video.

    Blinn-phong is pow( saturate( dot( normal, h ) ), hardness ); where h is lightvec + view direction.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  27. Post #1667
    ben1066's Avatar
    August 2009
    1,101 Posts

    That awesome moment when your shader actually works.
    Reply With Quote Edit / Delete Windows 8 United Kingdom Show Events Winner Winner x 1Programming King Programming King x 1 (list)

  28. Post #1668
    Gold Member
    jack5500's Avatar
    November 2007
    106 Posts

    That awesome moment when your shader actually works.
    The awkward moment, when you don't see any in the picture
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Dumb Dumb x 16Funny Funny x 2Useful Useful x 1 (list)

  29. Post #1669
    Jvs
    PENISCorp's First Employee
    Jvs's Avatar
    June 2009
    1,613 Posts
    The awkward moment, when you don't see any in the picture
    Pretty sure he refers to the shader being used in the hud to bend it.
    Reply With Quote Edit / Delete Windows XP Italy Show Events Agree Agree x 1 (list)

  30. Post #1670
    Gold Member
    jack5500's Avatar
    November 2007
    106 Posts
    Pretty sure he refers to the shader being used in the hud to bend it.
    Ah Okay, that would make sense
    Reply With Quote Edit / Delete Windows 7 Germany Show Events

  31. Post #1671
    Richy19's Avatar
    May 2010
    5,411 Posts
    Post your code, I don't see any phong what so ever in that video.

    Blinn-phong is pow( saturate( dot( normal, h ) ), hardness ); where h is lightvec + view direction.
    using http://ogldev.atspace.co.uk/www/tuto...utorial18.html

    this is to calculate the normals of the vector:
    void Drawable::phongNormals()
    {
        int amount = vertex_data.size();
    
        std::vector<glm::vec3> vecsToCheck;
        for(int i = 0; i < amount; i++)
        {
            bool foundIt = false;
    
            for(int j = 0; j < vecsToCheck.size(); j++)
            {
                if(vecsToCheck[j] == vertex_data[i]) foundIt = true;
            }
    
            if(!foundIt) vecsToCheck.push_back(vertex_data[i]);
        }
    
    
        for(int i = 0; i < vecsToCheck.size(); i++)
        {
            const glm::vec3 ver = vecsToCheck[i];
            std::vector<glm::vec3> norms;
            std::vector<unsigned int> indexs;
    
            for(int j = 0; j < amount; j++)
            {
                if(ver == vertex_data[j])
                {
                    norms.push_back(norm_data[j]);
                    indexs.push_back(j);
                }
            }
    
    
            glm::vec3 norm = glm::vec3(0.0f);
            for (unsigned int j = 0; j < norms.size(); j++)
            {
                norm += norms[j];
            }
    
            norm = glm::normalize(norm);
    
            for (unsigned int j = 0; j < indexs.size(); j++)
            {
                norm_data[indexs[j]] = norms[j];
            }
    
        }
    
    }

    this is the frag shader:
    #version 120
    varying vec2 uv;
    uniform sampler2D myTexture;
    uniform bool DrawLines;
    varying vec3 normals;
    uniform vec4 AmbientLight;
    uniform vec4 DiffuseLight;
    
    void main(){
        vec4 color;
    
        if(DrawLines)
        {
            color = vec4(1,1,1,1);
        }
        else
        {
            color = texture2D( myTexture, uv ).rgba;
    
            vec3 ambLight = AmbientLight.xyz * AmbientLight.w;
    
            float DiffuseFactor = dot(normals, DiffuseLight.xyz);
    
            vec3 diffLight = vec3(0, 0, 0);
            if (DiffuseFactor > 0) {
                diffLight = DiffuseLight.xyz * DiffuseLight.w * DiffuseFactor;
            }
    
            color.xyz = color.xyz * (ambLight + diffLight);
        }
    
        gl_FragColor = color;
    
    }
    

    and the vert shader:
    #version 120
    uniform mat4 MVP;
    uniform mat4 Model;
    attribute vec4 Position;
    attribute vec2 UV;
    attribute vec3 Normals;
    varying vec2 uv;
    varying vec3 normals;
    
    void main(){
        normals = normalize((Model * vec4(Normals.x, Normals.y, Normals.z, 0.0f)).xyz);
        uv = UV;
        gl_Position =  MVP * Position;
    }
    
    Reply With Quote Edit / Delete Linux United Kingdom Show Events

  32. Post #1672
    Icedshot's Avatar
    April 2010
    2,361 Posts
    Try it on something like a sphere. Itll be immediately obvious if it isn't working properly

    I can't see anything which doesn't look like phong
    Reply With Quote Edit / Delete Windows Vista United Kingdom Show Events

  33. Post #1673
    ben1066's Avatar
    August 2009
    1,101 Posts


    That equally awesome moment when you are told mat_hdr_level 3 enables floating point HDR allowing for a better depth buffer and DoF. Just noticed I had DoF enabled on the r_depthoverlay. Also the shader is yes for the HUD, it doesn't just bevel it also adds the glow and scanlines, they are quite subtle but any more obvious and it starts to become unreadable.
    Reply With Quote Edit / Delete Windows 8 United Kingdom Show Events Artistic Artistic x 5 (list)

  34. Post #1674
    Eudoxia's Avatar
    July 2009
    6,009 Posts
    My original compiler emitted LLVM IR for the input, until I thought "but I'll end up repeating a lot of the stuff that's already in the LLVM API", so naturally I had the great idea of branching the code. Needless to say the one using the API was a billion times harder to code, until I saw this great method I'd somehow overlooked -- ParseAssemblyString. It takes LLVM IR and returns a module containing the result of parsing, but not only that: It doesn't just create standalone modules, you can give it a module to add the IR to, and the machine will use that to be conscious of previous definitions.

    For example, you define a function in one module, then as you create another module from IR, the machine will be aware of the previous definition in that other module, it won't bitch about how type X or function Y has not been defined. This is cool as shit.
    Reply With Quote Edit / Delete Linux Uruguay Show Events

  35. Post #1675
    SHADERS
    Legend286's Avatar
    October 2008
    10,024 Posts
    using http://ogldev.atspace.co.uk/www/tuto...utorial18.html

    this is to calculate the normals of the vector:
    I don't see any phong code though, only regular diffuse lighting.

    Oh that article is stupid, it describes phong as the normal interpolation which is done REGARDLESS of which lighting model you are using.

    For the actual specular reflection, known as blinn-phong you should try the code I said. http://en.wikipedia.org/wiki/Blinn%E..._shading_model

    Or you could do it the more inefficient, accurate way:

    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  36. Post #1676
    Richy19's Avatar
    May 2010
    5,411 Posts
    So is it phong shading that gives it that smooth effect? or is it normal interpolating? because atm this is what my code produces:

    Reply With Quote Edit / Delete Linux United Kingdom Show Events

  37. Post #1677
    Gold Member
    AaRoNg11's Avatar
    May 2005
    564 Posts
    Just got pathfinding working in our group assignment :D

    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Funny Funny x 1 (list)

  38. Post #1678
    Team Hamster
    Mordi's Avatar
    January 2012
    312 Posts
    Got freetype to draw somewhat correctly, although the alphas are not working as intended...
    Reply With Quote Edit / Delete Windows 7 Norway Show Events Funny Funny x 1 (list)

  39. Post #1679
    Gold Member
    Robber's Avatar
    January 2006
    6,204 Posts
    Added global vars to Phyzicle which can be set via a command console which appears when you touch the screen with 5 fingers. These are useful for power users who want to tweak internal simulation/render/etc. settings.
    Make sure to also include this in the menu because not every device supports 5 fingers.

    Edit:
    Whooops, got ninja'd by nearly 20 hours. :(
    Reply With Quote Edit / Delete Windows 7 Austria Show Events Late Late x 1 (list)

  40. Post #1680
    SHADERS
    Legend286's Avatar
    October 2008
    10,024 Posts
    So is it phong shading that gives it that smooth effect? or is it normal interpolating? because atm this is what my code produces:

    Phong is the reflection model, what you're referring to is phong interpolation. I don't understand why you are having to set this up manually, doesn't opengl have automatically interpolated normals in pixel shaders like dx?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1 (list)