Author Topic: Joncom2000's attempt at Opengl  (Read 32942 times)

0 Members and 1 Guest are viewing this topic.

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #40 on: March 18, 2009 »
Jon had sent me his model conversion code earlier tonight and based on what Hellfire writes I took another look at it. Once I reversed the z coordinates, the z normals and the winding order of the faces, then his model loads correctly. B3D has these things reversed compaired to opengl. I have sent him the updated conversion code and he will probably be able to confirm that this works tomorrow. I will still work on getting my .obj model loader working correctly since Jon found that there were some issues with it.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Joncom2000's attempt at Opengl
« Reply #41 on: March 18, 2009 »
It's looking great :)

Nice one!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #42 on: March 18, 2009 »
 :updance:

Just got zawrans email with the changes he made to the conversion code and it does work, the taxi is drawn correctly and textured correctly, so a big thankyou to zawran for looking over my code, and a big thanks to hellfire who pointed zawran were to look.  :cheers: to you both, you made my day :)
« Last Edit: March 18, 2009 by TinDragon »

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #43 on: March 18, 2009 »
No problem, I am happy that it finally works.

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #44 on: March 19, 2009 »
Well done Tin Dragons on your development. Sorry for being a nosey sod, but do you have plans beyond the engines, or is it early days or going to be a surprise. I like surprises :D
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #45 on: March 19, 2009 »
Well my goal is to one day have a powerful graphics engine that can do all the fancy eyecandy, but I dont expect to get there on my first go. Much like ID didnt go from castle wolfenstein straight to Doom3, I plan on building a small engine and then slowly work up to a powerful one as I learn how all these things work together. At the moment with this engine I am learning how opengl works, how blitzmax differs from b3d, how to do things in a more OOP style and of course how to build an engine.

I dont know how far this will get, my approach is build it in sections until it becomes difficult to add something new. So far the only real problem I have encounter is understanding how opengl lights work, which I now sort of get but need to experiment more with, and model loading, which is more due to there being so many formats and variations within those formats as well.

I would say that what I have as far as entity/mesh control goes that the engine could do any of the demos/intros a version of the ttdvectorlib did, which itself is a good basic 3d engine but of course software rendered. It would of course surpass the amount of polygons that could be render and the framerate due to hardware acceleration. It also handles textures, something we never got in the old lib. Only area it might currently struggle is glenz type effects since I havent coded for them ;)

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: Joncom2000's attempt at Opengl
« Reply #46 on: March 19, 2009 »
Quote
Well my goal is to one day have a powerful graphics engine that can do all the fancy eyecandy, but I dont expect to get there on my first go.
You'll quite certainly trash the first 2-3 engine-designs when at some point handling different rendering-methods and -passes became just a big and buggy mess of special-case handling.
But don't worry, it's always that way with incrementally growing projects and it gets better with every try  ;D

Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #47 on: March 19, 2009 »
Well it appears my approach is already different to zawrans in some areas, he also has some features in, such as multi texturing, that I dont yet, will be interesting to see were we both end up. :)

[EDIT] New exe attached, correct texture display in this one with 3 versions of the car spinning independantly :)


« Last Edit: March 19, 2009 by TinDragon »

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #48 on: March 19, 2009 »
It looks great, and congrats on your progress.  :carrot:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #49 on: March 24, 2009 »
 Well some small progress on my 3d engine, created some code to make a multipart mesh surface, which at first wasnt working right but with some changes and a nudge from zawran pointing out were I had missed calculated a variable it worked as intended, then I added code to turn one of my surface type meshs, which are rather slow to render when there's alot of tris invloved, into a displaylist to improve rendering speed. Having got that working I then set about making a terrain mesh generator from a heightmap and have that coded in as well. So here's a little test showing a terrain created from a heightmap and then textured with a colormap. It runs fairly well here so hopefully it will for others :)

cheers
Jon

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #50 on: March 24, 2009 »
Nice looking terrain you got there :)  Congrats on getting it working, you are making progress every day, its inspiring.

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: Joncom2000's attempt at Opengl
« Reply #51 on: March 25, 2009 »
Neat terrain really, I got around 880 fps on GF 8800 GTS

Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #52 on: March 25, 2009 »
Was talking to some friends and they asked me about what sort of game I want to make with my engine, while I have no idea tbh but I thought it might be nice to get an oldskool doom1 style camera going so I had a quick mess about this afternoon and made this little test, no collision checks yet but you can rotate and wlk about in the 3d cube maze thing which has a floor and ceiling, lighting isnt that hot at the moment but it was more a little test of my camera/movement code :)

Feedback welcome:)


Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #53 on: March 26, 2009 »
Not the most interesting maze, but I am sure you already knows that :)  It seems to work ok, although the turning speed is on the slow side, it would be ok to increase that. Since all walls are done using cube shapes, with the same width and length, you could probably get away with using a two dimensional array for storing the location of the walls and then move the player around in that array and get you wall collisions from checking against the array and prevent the player from moving into a wall. And being that it is made to be like the old games, it would be an acceptable control scheme I would think.

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #54 on: March 26, 2009 »
No its not the most interesting maze but it served its purpose for testing the camera, I had some difficultly at first, rotating the view was easy but then moving in the direction your facing was more difficult to get right than I thought, but with some correct sin/cos maths I got it going :) I am probably going to setup my camera class to have different modes, such as normal & fps, then when I send rotation or movement information into it the camera either acts like in this demo, or it acts on just position and rotation so it sort of orbits a scene. I should make it possible to do some scripted scene fly thru's and stuff like that if I do it right :)

Cheers
jon


Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #55 on: March 26, 2009 »
It sounds promising, and something like fly throughs would be cool for demos as well. I'm looking forward to see how this part of you engine comes along.

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #56 on: March 27, 2009 »
Had a little mess around this afternoon with a couple things in opengl and got a reflection going, It's given me a couple thoughts about doing an update to one of the routines in an old ttd demo. Its been awhile since I have done any sort of demo/intro and it might be nice to see what I can currently get out of my engine beyond a few tests. In the meantime here's a shot of the reflection effect with some sphere  :)

Posted it because it reminds me of some of the first raytraced pictures I made on the amiga, use to wait for ages for renders to appear back then ;D

« Last Edit: March 27, 2009 by TinDragon »

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #57 on: March 27, 2009 »
It looks good, are you using the stencil buffer?

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #58 on: March 27, 2009 »
Nope its not using the stencil buffer, I am doing it the same way blitz3d does its mirror plane entity  ;)

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #59 on: March 27, 2009 »
Well it looks great no matter how it was done :)