Thread: Harha's programming projects

Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 35
  1. #21  
    Banned

    Join Date
    Nov 2014
    Posts
    611
    Thanks given
    180
    Thanks received
    156
    Rep Power
    0
    Looks good!
    Reply With Quote  
     

  2. #22  
    Renown Programmer
    Harha's Avatar
    Join Date
    Jul 2006
    Age
    30
    Posts
    433
    Thanks given
    3
    Thanks received
    31
    Rep Power
    339
    Quote Originally Posted by Thrallix View Post
    Looks good!
    Thanks.

    I'd really like to work more on my hobbyist projects but I am currently programming 7,5h a day at work which really just is.. enough.. for a day. So I can only work like few hours a weekend on my own projects nowadays, which sucks tbh.

    Here's something that I've very slowly been working on; rewriting that whole 3D game engine of mine using C++. It was written in Java with the help of LWJGL3, I hit a point at which I started wondering why I chose Java and decided that it's just the best to write the whole thing from scratch using C++, not only will it enable it to be very, very portable across different platforms but also it'll be slightly more efficient, it will be easier to talk to the GPU than it is from a Java program and the whole thing will be way more efficient because I can very clearly debug and monitor the code to see the exact bottlenecks. Also I like the syntax better, operator overloading, the freedom to choose whether to pass things by reference or value, etc. Many, many reasons to not use Java for this kind of purposes.

    I'm using GLFW3 for windowing, Glad for OpenGL bindings and GLM for math (In the Java engine I used my own math classes, but this time I had to choose GLM because there's no reason to try and compete with it's speed, GLM is very highly optimized). Currently the C++ version is in a very early stage, I've only implemented most of the required math functions / classes and a bit of the OpenGL side of things. I can render a GUI and do some fancy math stuff, that's pretty much it. Next step will be writing classes for shaders / textures / framebuffers / cubemaps / whatever and this time I'm going to put a lot more thought into abstracting those things, since my Java engine had a lot of issues in the ways I modeled things, especially the way I handled multiple texture attachments for single framebuffer objects was very sloppy.

    https://dl.dropboxusercontent.com/u/...09-2247-39.mp4

    I'm quite tired so my english writing may be sloppy, sorry about that.
    Reply With Quote  
     

  3. #23  
    Registered Member
    Join Date
    Apr 2016
    Posts
    124
    Thanks given
    14
    Thanks received
    21
    Rep Power
    37
    Quote Originally Posted by Harha View Post
    .
    Is it open-source? Would be interesting to see the structure and design

    edit: Just saw the edit in your post. Good luck on development. One thing I'm going to advice is that if you did switch over from Java because of the potential in better performance, you don't automatically get better performance just for using it. It's a big misconception that C++ is faster than Java. C++ gives you the ability to manage performance, something you don't get with Java.

    Having said that, making an abstract/OOP design will most definitely be one of the biggest bottlenecks you'll notice because of the way you'll be sending data over to the CPU. Also, virtual functions are basically analyzed at run-time (late/dynamic-binding), which means a hard hit on performance as the hardware has to figure out which derived class the virtual function should be called from.

    Hardware doesn't understand objects, but loves linear data.

    If this is just to learn more about OpenGL, then go for it. However, if you're going to use this engine regularly I would advice against the design you mentioned.

    edit 2: To back up my claim on the linear data statement, you can easily benchmark this by measuring the difference between matrix math with row-major vs column-major.
    Reply With Quote  
     

  4. #24  
    Renown Programmer
    Harha's Avatar
    Join Date
    Jul 2006
    Age
    30
    Posts
    433
    Thanks given
    3
    Thanks received
    31
    Rep Power
    339
    Quote Originally Posted by NeedDump View Post
    Is it open-source? Would be interesting to see the structure and design
    I will release the project repository as a public github repository once I feel like it's an actual game engine of some sorts.

    Don't know what I'll do with the Java version, I guess I could put it on github as is.
    Reply With Quote  
     

  5. #25  


    Major's Avatar
    Join Date
    Jan 2011
    Posts
    2,997
    Thanks given
    1,293
    Thanks received
    3,556
    Rep Power
    5000
    Quote Originally Posted by Harha View Post
    Thanks for the comments btw.

    I haven't done any 3D programming in ages, so I decided to clean up the Mirage project / optimize it / implement something new. What I did was that I implemented a simple SSAO kernel, so now there is an illusion of self-shadowing that adds a lot of realism to the outcome. It is very GPU-heavy though and difficult to optimize...




    Next steps I think will be; 1.) optimizing the rendering pipeline as-is to the fullest 2.) making the whole system more modular / moddable 3.) implementing reflective shadowmapping to achieve global illumination for diffuse surfaces 4.) implementing screen-space reflections

    Also I have to add FXAA as a post-process step at some point. Things look very ugly without any antialiasing.
    Is this realtime?
    Reply With Quote  
     

  6. #26  
    Renown Programmer
    Harha's Avatar
    Join Date
    Jul 2006
    Age
    30
    Posts
    433
    Thanks given
    3
    Thanks received
    31
    Rep Power
    339
    Quote Originally Posted by Major View Post
    Is this realtime?
    Yeah, in that particular scene FPS is around 120-25 on my GTX 970, fps drops for obvious reasons if you try to look at surfaces very closely. It could be a lot better though, there isn't really even any kind of view-frustum culling going on in that old renderer of mine, I didn't see the point of blindly just culling whatever in my rendering buffer isn't visible and instead was going to implement a proper bounding box hierarchy and cull not-visible geometry out using that. I just never got to the point of actually implementing that.

    SSAO Is heavy and while it can be made to look quite good it still is a screen-space effect and because of that it has some visual flaws that depend on camera -> surface normal angles and so on...
    Reply With Quote  
     

  7. #27  


    Major's Avatar
    Join Date
    Jan 2011
    Posts
    2,997
    Thanks given
    1,293
    Thanks received
    3,556
    Rep Power
    5000
    Quote Originally Posted by Harha View Post
    I just never got to the point of actually implementing that.
    Are you still working on this then? I'm keen to see the actual code, should you ever release it
    Reply With Quote  
     

  8. #28  
    Renown Programmer
    Harha's Avatar
    Join Date
    Jul 2006
    Age
    30
    Posts
    433
    Thanks given
    3
    Thanks received
    31
    Rep Power
    339
    Quote Originally Posted by Major View Post
    Are you still working on this then? I'm keen to see the actual code, should you ever release it
    No, I quit working on it months ago. I may release it, sure, but if I do so I have to prepare the whole repository first (give credits of some things to articles/papers I've read, etc...).

    Anyways, I'll post a link here when I publish it. It's not that good though, it has lots of design flaws which made me quit it in combination with the poor language choice.
    Reply With Quote  
     

  9. #29  
    Renown Programmer
    Harha's Avatar
    Join Date
    Jul 2006
    Age
    30
    Posts
    433
    Thanks given
    3
    Thanks received
    31
    Rep Power
    339
    Well whatever, here it is as a zip package: http://harha.us.to/java_projects/Mirage_Java.zip

    I didn't use git while developing this so there is no repository, I could create a new repo for it on github or something but that would be kinda pointless. The interesting bits are probably RenderingEngine, GLSLShader, Framebuffer, KDTree (I didn't get to the point of actually using this), WavefrontFile (Well it's a simple file format) and all the shaders in res/glsl/. It's an eclipse project and you need LWJGL3 to compile it. Also it's only tested to work on GTX 9xx GPU's, my friend tried it on his Ati card and got a huge mess of random triangles flying around his screen.
    Reply With Quote  
     

  10. #30  
    Renown Programmer
    Harha's Avatar
    Join Date
    Jul 2006
    Age
    30
    Posts
    433
    Thanks given
    3
    Thanks received
    31
    Rep Power
    339
    Started working on Mirage Render again, it's been a while. I have lots of correcting to do in this project, I was quite inexperienced with C++ back when I initially created the project (and I still am tbh...).

    Wrote a better model loading system and separated the Mesh shape class from any kind of model loading stuff, improved the Makefile a bit and now it should be able to compile and link the project on Windows and Linux with both GCC or LLVM, you can use the ENV variable for selecting your toolchain and the output goes to a directory named after it. Did a bunch of other small improvements as well.

    Attached image

    Theres some quick test render of a fairly simple scene. I still haven't added support for textures, the model loader supports UV-mapping though so basic diffuse/specular texture map support shouldn't be too difficult to implement now. It's just depressing to think how much it will affect performance since ray -> shape intersection tests will be much more heavy then.

    Edit:

    Added support for texture mapping. It isn't as slow as I thought it'd be, it comes partially for 'free' because I am already calculating barycentric coordinates of ray hit points on triangle surfaces anyways so I can just reuse those for texture coordinate interpolation.

    Attached image
    Reply With Quote  
     

Page 3 of 4 FirstFirst 1234 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Programming anything for Project Insanity
    By `Josh in forum Selling
    Replies: 3
    Last Post: 08-17-2011, 07:54 PM
  2. Beginning Java Programming: Import Projects to Eclipse IDE
    By Ed in forum Application Development
    Replies: 2
    Last Post: 02-01-2010, 12:37 AM
  3. 4 week college programming project took 5mins
    By Martin in forum Application Development
    Replies: 6
    Last Post: 12-25-2009, 01:03 AM
  4. Project board inside programming
    By iPhoneGuy in forum Suggestions
    Replies: 0
    Last Post: 11-15-2009, 10:34 AM
  5. [C#][Project]Movie/Media Program
    By I am Areo8 in forum Application Development
    Replies: 4
    Last Post: 08-23-2009, 02:31 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •