Page 12 of 13

Re: Oysi's 3D Rendering & Physics Engine

Posted: Fri Jul 18, 2014 8:46 pm
by Ranguna259
Awesome sauce, don't 3D engines use filters on meshes to smooth polygons and to make objects more realistic ? (like this)

Re: Oysi's 3D Rendering & Physics Engine

Posted: Sun Jul 20, 2014 6:23 pm
by Oysi
Ranguna259 wrote:Awesome sauce, don't 3D engines use filters on meshes to smooth polygons and to make objects more realistic ? (like this)
They do indeed. It works by using a different normal for every vertex of the polygon, and then have it interpolated per pixel. I did actually do this, right after I made the texturing (very early on in this thread), as they both work off the same concept. You can see it here. You will also be able to see it my newest video:

TERRAIN!


Re: Oysi's 3D Rendering & Physics Engine

Posted: Sun Jul 20, 2014 8:56 pm
by LiquidDandruff
I've just read the entire thread. This is amazing stuff, Oysi! I can't wait for your tutorials; you really are a god!

Re: Oysi's 3D Rendering & Physics Engine

Posted: Mon Jul 21, 2014 7:25 pm
by Scratchthatguys
LiquidDandruff wrote:I've just read the entire thread. This is amazing stuff, Oysi! I can't wait for your tutorials; you really are a god!

Code: Select all

function love.load()
    now = os.time
    videos = {}
    people = {}
    people["god"] = oysi93
end
function love.update(dt)
    if os.time() >= now then
        videos[#videos + 1] = video.new()
        love.event.quit()
    end
end

Re: Oysi's 3D Rendering & Physics Engine

Posted: Fri Jul 25, 2014 8:16 pm
by Oysi
Haha.

Here's me having fun with my "engine", showing some of the stuff it's capable of:

I almost feel bad doing this, seeing as I haven't uploaded the thing.
almost =P


Re: Oysi's 3D Rendering & Physics Engine

Posted: Mon Jul 28, 2014 1:20 am
by Oysi
So with the previous optimizations I discovered, I've been rewriting my engine. But I got sort of stuck when I came to the shaders, because there are so many different ways of doing it. At first I used different shaders for different effects. One for texture mapping, one for texture mapping with normal mapping, one for texture mapping with normal mapping with some other effect, and so on. It was very tedious to have more than one, mainly because of all the extra code in each shader that is necessary to make it work. After that I swapped to a more unified system, where instead of using different shaders, I just put everything into one shader, but I could enable and disable features as I wanted. This is of course very nice for demonstration purposes, because I can change stuff at runtime with a simple function call. But the problem with this is that even though I turned things off, it would still send all the information, so turning everything off would change the output image, but not the performance.

Now I've sort of gone back to my first system, but I've changed it around a bit. Instead of adding in all that extra code, I created an include preprocessor directive. Currently it only works with 3 different things, GL_UNIFORMS, GL_LIB, and GL_MAIN, but I could of course make it work with filenames and such as well. Uniforms is the one with the uniforms (duh), sent from the lua code, having the projection information and such. Lib has a library of handy functions to make life easier, including the 'uv' function you see. And Main does all the main things, reverse projection, raycasting, uv mapping, all the good stuff to get the proper information you need. With all of this, I can create easy shaders:

Image

That shader effectively takes in the 3 vertex positions, 3 vertex colors, interpolates the color, and scales it by the depth to the pixel, giving this result:

Image

Here's a different shader, which also does texture mapping along with the per vertex color:

Image

And its result: (I pushed the camera further ahead, and reduced the intensity on the depth for a better image)

Image

Here is one last shader, where I took out the per vertex color, and added per vertex texture. =O

Image

And the result: (I left only one cube alive, and I rearranged the vertices for a better image)

Image

What do you guys think?

Re: Oysi's 3D Rendering & Physics Engine

Posted: Mon Jul 28, 2014 6:02 am
by HugoBDesigner
It looks really, really good, Oysi. It's smaller, so it'll be faster, and it's easier for you to add in new features. Good work! Your engine is the best 3D engine after Löve that I've seen so far!

Re: Oysi's 3D Rendering & Physics Engine

Posted: Sun Oct 12, 2014 12:33 pm
by Oysi
Hi again, I have a new update. A haxy haxy sphere thingy (they're not actually real spheres, but then again, they behave just like normal spheres, so it really comes down to how you would define a real sphere, and whether you are philosophical enough to discuss this at length)...



Which is done by this neat little shader:

Image

It's incredibly fast, and I can't wait to implement optimized physics for spheres, so I can see how many of them I can have at once. =o

Although I am in the process of rewriting the whole thing, again. More to come later. =)

Re: Oysi's 3D Rendering & Physics Engine

Posted: Mon Oct 13, 2014 2:42 pm
by Positive07
Oysi I may be dumb of course your 3D is amazing but I'm far more interested in that console of yours... it's awesome! can you post it or give me many hints on the workings of it?

Re: Oysi's 3D Rendering & Physics Engine

Posted: Tue Oct 14, 2014 12:25 pm
by veethree
Positive07 wrote:Oysi I may be dumb of course your 3D is amazing but I'm far more interested in that console of yours... it's awesome! can you post it or give me many hints on the workings of it?
As far as i can tell it uses loadstring to run lua code. I've made one of those myself, There's a version of it hidden (in plain sight) in the source of my calculator if you want to check it out. If i remember right that version of it is completely self contained, so you can drop it into any project and it'll work.