Posts Tagged ‘OpenGL’

h1

famous last words…confirmed

January 8, 2009

So I’m REALLY starting to freak out that maybe won’t get in to college.  Because while I’m certainly eligible, I got this crappy email that tells me: “yeah, you want a student loan?  this is your student ID, which you’ve had since before you were even sudo admitted.”  thanks for being clear, assholes.  I only have ONE WEEKEND to register for classes and get my fukken act together if I’m even in, which I don’t know, because they AREN’T BEING CLEAR.

Okay, thank you for your cooperation in terms of listening to a rant.  WAIT!  IT’S NOT OVER!  Some drunk fucker wandered in to our garage and started knocking things over!  Full story here.

But anyway.  Those it-should-be-easy-to-get-depth-targets-to-work-in-Direct3D last words?  Yeah.  Apparently, it can’t handle rendering to a depth texture, so you have to create a depth stencil render target.  But you can’t just use that.  Ohhh, no.  Apparently depth components can’t be reinterpreted without shaders.  This makes no sense, as OpenGL has had this capability FOREVER.  So it actually takes a simple pixel shader to copy from the depth target to a usable texture, a red only format texture.  Talk about clumsy and stupid.

So the long and short of it is that I now have to have two classes of rendertarget, (yes, even for OpenGL as I can’t break unified API,) one for color and the other for depth.  In OpenGL, it’s actually the same class with two settings.  In Direct3D, it’s two seperate classes.  pfft.  I don’t like it, but I’m pleased to say that the actual API needs only ONE outwardly apparent change.  The CreateRenderTargetTexture() method now has a new argument: targetmode, which can be RAVEN_RENDER_TARGET_COLOR or RAVEN_RENDER_TARGET_DEPTH.  The rest is transparent.

Sooo… yeah.  Workin’ on it.

Advertisements
h1

WOOOOOOO GDB WINS!

January 6, 2009

So, I managed to isolate EVERY KNOWN BUG in RAVEN so far, and fixed them.  I feel good about that.  In addition, rendertargets are working in Direct3D.  I will add a depth target texture  for Direct3D rendertargets soon.  I also fixed the font not pixel perfect issue with Direct3D.  I had to shift the X,Y coordinates by -0.5, because apparently even untransformed vertices in Direct3D are not mapped directly to pixels.  Stuuuuuupid.  And I also added an alpha argument to the material constructor because having to set it after the fact is just plain hackish.  That also solved the fact that alpha wasn’t explicitly initialized, causing consistency problems.  Big time.  Another bug that was fixed.

All thanks to my l337 programming sk1lz and GDB.  Is there anything GDB can’t do?  Excellent debugger AND payload delivery system if you happen to be a hacker!

All I have to do at this point is get the Direct3D rendertarget working with a depth texture and stick in HLSL support.  It shouldn’t be too difficult (famous last words…lol) so stick around.  Then I can maybe add bitmap font support!  I’ll probably take an Irrlicht approach on that one, I really like their method.  I feel like this project is seriously trucking along!

And… I really hope I get my ACT results back soon enough to register for classes.  I feel somewhat worrisome.  If I can’t follow through, I’ll have to wait ’till next year.  And then I’ll have to wait and feel bad about myself… sigh.  Here’s hoping.

EDIT!

Seeing as how no one has commented yet, I feel fine just editing this post.  Here are some screenshots of the rendertargets working in Direct3D!  OpenGL is exactly the same in appearance, so really no need to post them.

If that isn’t just balling, I don’t know what is.  Next up:  HLSL support!

h1

wooo, fonts! and materials! and manga?

January 5, 2009

FONTS ARE FINALLY WORKING IN DIRECT3D!!!

They are!  There’s kind of a texture sampling issue with it, but that’s insignifigant, and they look fine.  It might just be shitty Direct3D texture coordinate precision I can’t do a damn thing about.  So here’s the screenies:

Direct3D 9 Test (fonts aren’t quite pixel perfect):

OpenGL Test (fonts are pixel perfect):

It may be a fencepost error on pixel ratio calculation that causes the font pixel precision problem in Direct3D.  I’ll fix that.  But hey, I can now finally get rendertargets working in Direct3D.  Then I’ll implement HLSL support with the same shader object class interface, and I’ll be up to snuff.  I’ll finally be able to start expanding the functionality again.  One thing I want to do is to add a streaming mode for vertex buffers so I can do dynamic vertex stuff.

Hey, did you notice the tasty per vertex alpha there?  The backface culling is disabled for this test, as it would keep us from getting this cool semi-transparent cube effect.  I have a boolean material setting in the material class that lets you switch between using material and vertex colors.  This is clearly vertex colors.

As you can see, I’ve also separated the specular component in OpenGL (using the extension, no multiple pass techniques unless it’s REALLY neccesary) in order to mimic the behavior which is default and usually used for 3D games in Direct3D.  The applications I develop for this should have as consistent and standard an appearance across platforms as much as possible, and this is really the best specular look (fixed pipeline wise anyway) for most surfaces.  If it’s otherwise, there’s always a shader for that.

I’ll have it all caught up on the Direct3D end soon.  At which point, further feature development begins.  Here’s something I want to add: Windows builds will use DirectInput for input.  This will allow me to code for my gamepad, yay! 🙂  GNU/Linux will use xorg devices for gamepads, same as all devices on GNU/Linux.  I may need to borrow a friend’s joystick to code for that.  We’ll see.

But hey!  I just recently started drawing manga again, which was my original art style.  I used to only draw manga, which I shifted out of at one point.  But I thought I’d make  another crack at it, and let me tell you.  NOT like riding a bicycle.  I’m just getting back in to it, this is a doodle I did just  a while ago:

I made this in The GIMP.  All tablet, no paper.

Yeah, I know.   Her shoulders are a bit too broad.  I don’t mind it though, the super feminized look is kind of rediculous to see in EVERY female character.  It starts to get redundant and unrealistic if overidealized.  Just saying.  But cool, no?

That’s about it.

h1

lighting problems: resolved

December 27, 2008

Just a quick post: lighting issues are RESOLVED.  When you set the ambient source to color for Direct3D it multiplies and OpenGL adds.  So I just have to do that part manually for Direct3D and everyone’s happy as a clam.

h1

RAVEN materials + inhuman art + freaky art

December 26, 2008

I have to say it’s quite awesome that my Grey fanart wound up on the Inhuman site’s fanart page.  I did a thing with grey killing people/trees with a menorah.  That’s because he loves the slaughter portion of the holiday season.  heah yo go my buddayo…

Okay then.  Now that that’s over with, let me tell you about a sweetass development with the engine.

I got simple materials and lighting to work in Direct3D and OpenGL!  Transparent in terms of which API of course.

This next screenshot is simple proof you can choose which:

u can choose d3d or gl zomg

u can choose d3d or gl zomg

NOW.  Direct3D:

Direct3D 9 HW L&T in RAVEN

Direct3D 9 HW L&T in RAVEN

And in OpenGL.  OpenGL’s glColorMaterial(GL_AMBIENT_AND_DIFFUSE) appears to give me a slightly brighter ambiance than Direct3D’s D3DRS_COLORVERTEX and D3DRS_AMBIENTMATERIALSOURCE / D3DRS_DIFFUSEMATERIALSOURCE set to the first vertex color FVF.  Not sure why, maybe it has to do with how D3D mixes the ambient color?  Or is that part of the HW L&T pipeline?  I can’t remember T_T.  Whatever, I’ll get this figured out.

opengl_hwlt

OpenGL HW L&T

Oh hey.  I made another art picture yay!

Gynophobia by ~ninjarat1 on deviantART

h1

omg done lol

December 23, 2008

YOU CAN READ THE ARTICLE BECAUSE IT IS DONE I WANT COOKIES NOW BUT RUSTY NAILS WILL SUFFICE

FAAAALLLCOOOON PUUUUUUNNNNNNCH!!!111!1!!!!1!

so, yeah, read the article.

h1

straight up hdr for shizzle

December 15, 2008

Here’s one I came up with this morning: reality is to the mind as television is to the eyes.   Oh man, I know that shit was too deep for you.  Sucker.  Seriously though, ponder that.  You should read about the psychological registers of reality.

Yeah. Yeah. I’ve got this HDR under control. The test app is kinda hacked together, but that’s okay, when I add the option to the scene manager to turn HDR on/off, it will be much better. But there is a totally balling video (oh yeah, I said balling. I went there. Yep. Oh. Yes.) on ye grande olde intarwebs, and it may be enjoyed via eyeballs at the location below this text type symbol cluster. Hya!

There is a text line in the video (a bit blurred by compression sorry for quality) that should say when HDR is enabled and when it isn’t. It’s exaggerated for this example, but will be done in more moderation for a game. It shows non HDR first and at the very end so you can compare.

It really adds to the feeling of being extremely bright!  But, unlike in many games, to be truly convincing it must be used IN MODERATION.  I can’t stress this enough.  And while I bash over-use of bloom,  I might as well point out that not everything in the whole world is gloss shiny.  Especially not dirt.  Seriously, just because it’s a new graphics technique doesn’t mean you have to use it on everything.  The only one that counts for is multisampling.  That DOES make everything look better.