Search the Community
Showing results for tags 'Technology'.
-
I've finished the Crysis campaign today. Amazing game, really. Until you reach the aliens. I'll not to give out any spoilers, but don't read the following if you want to be sure. Ok, so I decided to try something today. Mess around with my motherboard. ^_^ You see, I have a MSI Neo2-FR right now, but I've got another defect one lying around which I mess around with. A little introduction; there's three motherboards in that series. The P35 Neo2-FR (which I have), the P35 Neo2-FIR (same as mine but has firewire) and P35 Platinum. The Platinum is the full featured board, and supposedly the 'best' overclocker because of its slightly larger heatsink. So, basically, my Neo2-FR is the cheap version of the Platinum. BUT, what's my deal here? There's this sticker, with 'P35 Neo-FR' on it, it's fugly, so I removed it. Guess what was under the sticker? A line of text, which said, maybe you've already guessed it: "P35 Platinum" So basically, I have a P35 Platinum board, with a sticker and slightly different heatsink. (which don't differ in performance) The Platinum costs ~60 dollars more, and the Neo2-FR is (in theory) exactly the same board, but you don't have to pay that extra 60 dollars. :D I'm happy I got this motherboard, it's fantastic, and I definitely recommend it. That's all. :P
-
I've done some more overclocking attempts, and broke my 3DMark06 record. :s I had to increase my CPU voltages to 1.675V, NB to 1.5, FSB to 1.45 and memory to 2.3 but it ran 3DMark stable on yet another record overclock. :P (3952 MHz, 8x494) Memory latencies we're out of the roof (5-8-8-18, couldn't change the 5 to 6 and boot for some reason), and it's what's limiting my FSB to a max of ~2080 MHz, but the CPU won't handle a FSB that fast anyways without going into the extreme voltages area. So I'll settle for 3952 MHz, for now. NB voltage was 1.8 and I/O got a lousy 0.1V increase (to 1.1), but it allowed me to run the PCI-E slots on 135 without stability issues. Temperatures were fine, ~55 C stressed, which I think is reasonable. On the GPU side, I also managed a new record overclock. The core managed to finish 3DMark at 820 MHz, and the memory was stable at 2150 MHz. Shaders were linked to 2050 MHz, since Rivatuner modding finally let me overclock those aswell. The fan was set to 99%, which was needed to keep everything stable. (Closing my roof window made the system crash) 3DMark06 screenshot: System stock specs: CPU: E6750 2667 MHz VGA: G92 8800 GTS 512 MB (Core: 650 MHz, Memory: 1960 MHz, Shaders: 1650 MHz) Memory: 2 GB 800 MHz, CL 4-4-4-12 Motherboard: MSI P35 Neo2-FR HDD: 7200 RPM 250 GB SATA Overclocked specs: CPU: 3952 MHz (+1285 MHz) VGA: Core: 820 MHz (+170 MHz), Memory: 2150 MHz (+190 MHz), Shaders: 2050 (+400 MHz) Memory: 988 MHz CL 5-8-8-18 PCI-E bus: 135 MHz (+35 MHz) Final 3DMark06 score: 14937 (Don't worry if you don't understand a damn about this. :P)
-
Sometimes, it can be worth it.
-
I don't know why people think Alienware is so great. They base all their products on looks, and you could get the exact same specs for about 1/2 the price. It's basically paying way too much, for way too little. If you're going to spend 6000$USD on a machine, then get the most you can get. Plus I find them to be ugly, and use quite a bit of power.
-
I've finally got the first person camera to work properly in my engine, and it's very simple to use, too! If you want to enable first person camera mode, you can simply do this: cam->SetType(CT_FirstPerson); There's a so-called 'flying' mode, which allows the camera to also move vertically. To turn this off, simply add: cam->SetFlying(false); This took ages to get working, so I'm happy. Again, a few changes have been made to how everything is handled, so here's an example program source: #include <TGE.h> #pragma comment(lib, "TGE.lib") Interface( MyInterface ) { Window * win; Renderer * renderer; Scene * scene; Camera * cam; Light * light; Object * pyramid; void Initialise() { win = pRoot->CreateWindow("Test Window"); renderer = pRoot->CreateRenderer(Direct3D9); WindowParams winParams; winParams.width = 640; winParams.height = 480; winParams.posX = 50; winParams.posY = 50; win->SetParams(winParams); win->AttachRenderer(renderer); } void CreateScene() { scene = renderer->CreateScene(); cam = scene->CreateCamera(); light = scene->CreateLight(); cam->SetType(CT_FirstPerson); cam->SetPosition(Vector(35, 3, 0)); cam->SetRotation(Vector(0,-90,0)); light->SetPosition(Vector(8,3,-5)); pyramid = scene->CreateObject(); pyramid->SetType(OT_Pyramid, 6, 10); } }; Main() { pRoot->RegisterInterface(MyInterface); } I'm pretty happy with how this is turning out.
-
Ok, I've tried to do this now for a while, and it's finally working! What is it? Per-pixel diffuse lighting. Now, what is this? If a scene is rendered, it is done point-per-point, meaning every point in the scene is processed individually. Normally, this would also involve calculating which color the point has (based on lights, etc.). This has only one disadvantage; precision. If, for example, I had a plane and this plane consited of four points: X---X | | X---X (X denotes a point) Placing a light right inbetween these points would normally result in a bright spot in the center, fading towards the edges, right? But because we can only calculate the color for every point, the plane will be one solid color. (I'm not going to go over explaining why in depth, that'd bore you even more) But, there's another way of doing it. This is so-called 'per pixel phong lighting', which means that you calculate the color for each pixel, resulting in much more 'natural' lighting. This is an example of per-vertex diffuse lighting: Now compare that to this per-pixel diffuse lighting example, the scenes are completely identical: You can see easily on the per-pixel example where the light source is located, but on the per-vertex example this is very hard to tell. Also note that the lighting looks very stale on the per-vertex example, compared to the more natural lighting of the per-pixel example. Here's the HLSL .fx file for anyone who is interested: float gamma = 1.0f; float contrastMul = 1.0f; float contrastMid = 0.5f; float4x4 matWorldViewProj : WORLDVIEWPROJECTION; float4 pointLights[8]; float4 cameraPos; int pointLightCount; bool noLighting = false; struct VS_Out { float4 position: POSITION; float4 normal: NORMAL; float4 color: COLOR0; float4 pos: TEXCOORD0; }; struct VS_In { float4 position: POSITION; float4 normal: NORMAL; float4 color: COLOR0; }; struct PS_In { float4 color: COLOR0; float4 normal: NORMAL; float4 pos: TEXCOORD0; float2 vPos: VPOS; }; void Gamma_VS( in VS_In In, out VS_Out Out ) { Out.position = mul(In.position, matWorldViewProj); Out.pos = In.position; Out.normal = In.normal; Out.color = In.color; } void Gamma_PS(in PS_In In, out float4 outColor: COLOR0 ) { if(!noLighting) { float4 viewDir = normalize(-In.pos); outColor = 0; float4 light, normal, refl, diffuse, specular; normal = normalize(In.normal); float nDotL, rDotV; for(int i=0; i<pointLightCount; i++) { light = normalize(pointLights[i]-In.pos); nDotL = max(0,dot(normal, light)); refl = normalize(((2*normal)*nDotL)-light); rDotV = max(0,dot(refl,viewDir)); diffuse = nDotL; specular = pow(rDotV,32); outColor += (diffuse+specular); } outColor = saturate(outColor*In.color); if(gamma != 1) { outColor = outColor * gamma; } if(contrastMul != 1) { outColor *= 1/contrastMid; outColor += (1-outColor)*contrastMul; } } else { outColor = In.color; } } technique Default { pass P0 { VertexShader = compile vs_3_0 Gamma_VS(); PixelShader = compile ps_3_0 Gamma_PS(); } } Pretty proud of this myself.
-
I've finally removed both memory leaks from my engine that were still present! >.< One was located in the vertex buffer class for Direct3D 9, I was using a static sized array, and it was overflowed. In English; I had a buffer for new polygons, however, the buffer was not large enough to hold all the new polygons. This resulted in C++ going outside the 'borders' of the memory allocated for the buffer, and writing to other memory. I fixed it by switching to my memory-safe Array template class, which makes sure that there's always enough memory allocated for the buffer. :/ The other memory leak was in the Direct3D 9 renderer, in the D3D9_Renderer::RenderLight function, a new D3DLIGHT9 object was created each time, but never deleted. So now it runs stable again, and I can finally go on with some more testing + feature development!
-
Diffuse lighting is calculated pretty easily and fast. Take vector N, point P and point O. P is the position of a point light source, N is the normalized normal of a polygon and O is the position of a vertex. Now create a vector L = normalize(P - O) Then calculate L · N and you have your diffuse lighting coeffecient. For multiple lights, take two colors; a black color B and the color V of the vertex you're shading. For each light, if (L · N) > 0, then B' = B + V * (L · N) Now, why is this useful? Because I can slam it right into a shader program and add my own little things to it! Like this: // snippet struct VS_Out { float4 position: POSITION; float4 normal: NORMAL; float4 color: COLOR0; }; struct VS_In { float4 position: POSITION; float4 normal: NORMAL; float4 color: COLOR0; }; void Gamma_VS( in VS_In In, out VS_Out Out ) { Out.position = mul(In.position, matWorldViewProj); Out.normal = In.normal; for(int i=0; i<pointLightCount; i++) { Out.color += dot(normalize(pointLights[i]-In.position), normalize(In.normal)) * In.color; } } Feeling a bit mathematical today. :P Oh, and diffuse lighting is one of the two basic forms of lighting. Take this orb: The blue bit of the orb is diffuse lighted. No matter what way you look at it, it will always be the same intensity of blue. The white dot is specular lighted, which changes depending on the ratio between the eye point and the light sources.
-
This is exactly why effects rule: http://toungeweb.com/uploads/TGE/effects.png The right window has a gamma of 0.5 (half the normal gamma) and a contrast of 150%, the left has no effects at all. I like right better. Source code for this: #include <TGE.h> #pragma comment(lib, "TGE.lib") Interface( MyInterface ) { Window * win; Renderer * renderer; Scene * scene; Camera * cam; Light * light1, * light2; Object * pyramid, * plane, * obj3; Primitive * tri7; void Initialise() { win = pRoot->CreateWindow("Test window"); renderer = pRoot->CreateRenderer(Direct3D9); WindowParams winParams; winParams.width = 640; winParams.height = 480; winParams.posX = 50; winParams.posY = 50; win->SetParams(winParams); win->AttachRenderer(renderer); } void CreateScene() { renderer->SetGamma(0.5f); renderer->SetContrast(150); scene = renderer->CreateScene(); cam = scene->CreateCamera(); light1 = scene->CreateLight(); light2 = scene->CreateLight(); light1->SetPosition(Vector(0,5,0)); light2->SetPosition(Vector(5,2,0)); cam->SetPosition(Vector(12, 3, -35)); cam->SetLookAt(Vector(0, 0, 0)); SimpleGeom(); } int Rand(int min, int max) { return (rand()%max)+min; } void SimpleGeom() { pyramid = scene->CreateObject(); plane = scene->CreateObject(); obj3 = scene->CreateObject(); pyramid->red = true; // Shader debug setting, not final plane->SetPosition(Vector(0,-5,0)); tri7 = obj3->CreatePrimitive(); pyramid->SetType(OT_Pyramid, 6, 10); plane->SetType(OT_Plane, 20, 20); tri7->Create(Triangle, Vector(-1, -1, 0), Vector(1, -1, 0), Vector(0,1,0)); obj3->noLighting = true; } void HandleEvent(Event * evt) { float light1X = 5*cos(timeGetTime()/350.0f); float light1Z = 5*sin(timeGetTime()/350.0f); float light2Y = 15*sin(timeGetTime()/550.0f); float light2Z = 15*cos(timeGetTime()/550.0f); light1->SetPosition(Vector(light1X, 5, light1Z)); light2->SetPosition(Vector(0, 5, 5)); obj3->SetPosition(Vector(light1X, 5, light1Z)); if(evt->GetType() == WM_KEYDOWN) { switch(evt->GetWParam()) { // Press D to disable effect case 'D': renderer->SetGamma(1.0f); renderer->SetContrast(0); break; // Press E to enable effects case 'E': renderer->SetGamma(0.5f); renderer->SetContrast(150); break; } } } }; Main() { pRoot->RegisterInterface(MyInterface); }
-
Managed to push my processor to 3.6 GHz and my memory to 900 MHz, pretty nice I think. I also set my graphics card back to 750 core, 1100 memory because of some smaller instability issues. 775/1125 wasn't causing much problems, though. Also, Pi to 1 million places in 14 seconds. =] Screenshot with some Prime95 and CPU-Z too: link Max. processor heat was ~25 degrees, GPU is around 45-50 on 45% fan. (First Prime95 test failed at 3.65 GHz, used the MSI panel to set it to 3.6)
-
After much customization of my Ubuntu Laptop, I get this error that won't go away... *Pounds fists on desk*
-
I've finally gotten my new graphics card, popped it into the system, and it works! Quite a hassle, but anyways.. Damn, it is amazing. Current highest 3DMark06 is 13609, with an E6750 @ 3.4GHz, GPU Core 750 MHz and GPU memory 1150MHz (2300 effective). I'll edit this and post which settings were playable on Crysis, too. Plus a 3DMark06 when I finish finding the best overclock. :)
-
My card was delayed AGAIN, to 22 December.. I just told them to go screw themselves, cancelled the order. This other site sells them for more, but atleast they have a stock. Heh, I might even pick a 8800 GTS 512 MB up if I'm lucky. It seems pretty decent, though the GT is probably the best option now.
-
This is something I whipped up today, and forgot to post an entry about. :P Previously, if you wanted to make an object you'd have to manually code every triangle used to compose it. With this new feature, you can simply give up a type for the object and some parameters, and it'll be created. Enough with the rambling, on with the code! :closedeyes: Snippet: Object * obj; obj = scene->CreateObject(); obj->SetType(OT_Pyramid, 6, 10); // Creates a pyramid with a base width of 6, and a height of 10
-
Impressive, Apple! This motherboard looks like it has a lot of expandability options and amazing cooling. I'm also amazed by the quality of the processor cooler! Passive cooling for a Core 2 Duo processor has to be the best idea ever! Especially when it comes to stability, which is exactly why everyone loves Macs. Right, Jobs?
-
I've been doing some more work on my engine, mainly implementing a very nice DirectX feature; shaders. Shaders allow you to modify vertices (points in the scene) and pixels on the fly, during rendering. But, I'm pretty excited, because I've finally gotten to implement it within the engine! :D Here's an example of a very simple effect, called fullscreen gamma: And here is a screenshot of a picture without gamma: The difference here is the color, not the position of the object. The second screenshot uses a different camera angle. :D On a side note: this baby ran at an average of 370 frames per second on a low-end graphics card, shooting up to an amazing 1400 frames per second without the 8x anti-aliasing. :P
-
I've got cameras, lights and geometry (with correct normal calculation, culling, etc.) up and running, and I thought I'd give you all a screenshot! :glasses: (Just to show off :glasses:) Source code for this: #include <TGE.h> #pragma comment(lib, "TGE.lib") Interface( MyInterface ) { Window * win; Renderer * renderer; Scene * scene; Camera * cam; Object * obj, * obj2, * obj3, * obj4; Primitive * tri1, * tri2, * tri3, * tri4, * tri5, * tri6, * tri7, * tri8; Light * light1, * light2; void Initialise() { win = pRoot->CreateWindow("Test window"); renderer = pRoot->CreateRenderer(Direct3D9); WindowParams winParams; winParams.width = 640; winParams.height = 480; winParams.posX = 50; winParams.posY = 50; win->SetParams(winParams); win->AttachRenderer(renderer); } void CreateScene() { scene = renderer->CreateScene(); cam = scene->CreateCamera(); light1 = scene->CreateLight(); light2 = scene->CreateLight(); cam->SetPosition(Vector(12, 5, -35)); cam->SetLookAt(Vector(0, 0, 0)); obj = scene->CreateObject(); obj2 = scene->CreateObject(); obj3 = scene->CreateObject(); obj4 = scene->CreateObject(); obj2->SetRotation(Vector(-90,0,0)); obj2->SetPosition(Vector(0,-5,0)); obj3->noLighting = true; obj4->noLighting = true; tri1 = obj->CreatePrimitive(); tri2 = obj->CreatePrimitive(); tri3 = obj->CreatePrimitive(); tri4 = obj->CreatePrimitive(); tri5 = obj2->CreatePrimitive(); tri6 = obj2->CreatePrimitive(); tri7 = obj3->CreatePrimitive(); tri8 = obj4->CreatePrimitive(); tri1->Create(Triangle, Vector(-3.3f, -5, -3.3f), Vector( 3.3f, -5, -3.3f), Vector( 0, 5, 0)); tri2->Create(Triangle, Vector(-3.3f, -5, 3.3f), Vector( 3.3f, -5, 3.3f), Vector( 0, 5, 0)); tri3->Create(Triangle, Vector( 3.3f, -5, -3.3f), Vector( 3.3f, -5, 3.3f), Vector( 0, 5, 0)); tri4->Create(Triangle, Vector(-3.3f, -5, -3.3f), Vector(-3.3f, -5, 3.3f), Vector( 0, 5, 0)); tri5->Create(Triangle, Vector(-10, -10, 0), Vector( 10, -10, 0), Vector(-10, 10, 0)); tri6->Create(Triangle, Vector( 10, -10, 0), Vector(-10, 10, 0), Vector( 10, 10, 0)); tri7->Create(Triangle, Vector(-1, -1, 0), Vector(1, -1, 0), Vector(0,1,0)); tri8->Create(Triangle, Vector(-1, -1, 0), Vector(1, -1, 0), Vector(0,1,0)); } void HandleEvent(Event * evt) { float light1X = 5*cos(timeGetTime()/350.0f); float light1Z = 5*sin(timeGetTime()/350.0f); float light2Y = 15*sin(timeGetTime()/550.0f); float light2Z = 15*cos(timeGetTime()/550.0f); light1->SetPosition(Vector(light1X, 5, light1Z)); light2->SetPosition(Vector(0, light2Y, light2Z)); obj3->SetPosition(Vector(light1X, 5, light1Z)); obj4->SetPosition(Vector(0, light2Y, light2Z)); } }; Main() { pRoot->RegisterInterface(MyInterface); } The white triangles demonstrate the 'noLighting' state, in which they are always lit 100%. The triangles are at the same position as the two lights at the scene, for indication purposes.
-
After a long, long job of getting 3D rendering possible (through vertex buffers, DirectX, etc.) I've finally got it working! >.< While it doesn't look that impressive, I can tell you, it's pretty cool (engine wise). I give you, a triangle: Here's the source code, not including the engine ofcourse, which built this app: #include <TGE.h> #pragma comment(lib, "TGE.lib") Interface( MyInterface ) { Renderer * renderer; Window * win; Scene * scene; Object * obj; Primitive * tri; void Initialise() { win = pRoot->CreateWindow("Test window"); renderer = pRoot->CreateRenderer(Direct3D9); WindowParams winParams; winParams.width = 640; winParams.height = 480; winParams.posX = 100; winParams.posY = 100; win->SetParams(winParams); win->AttachRenderer(renderer); } void CreateScene() { scene = renderer->CreateScene(); obj = scene->CreateObject(); tri = obj->CreatePrimitive(); tri->Create(Triangle, Vector(-5, -5, 0), Vector( 5, -5, 0), Vector( 0, 5, 0)); } }; Main() { pRoot->RegisterInterface(MyInterface); } And incase you're wondering, this is ofcourse a 3D triangle.
-
I've finally installed my bigger, better cooltower for my processor, since the standard Intel ones don't really perform that good. It took some time, and my fan broke just as I finished installing the cooler. But it was a crappy fan, anyways, so I'd have to get a better one anyways. I had to actually mod my case (break the fan out and reapply it outside) for this thing to fit. Haven't gotten to trying it out, since my darn graphics card isn't here yet. :glasses: Pics: (Warning: large images) Picture 1 Picture 2 They're blurry, I know. But I'm happy that it fits now, since this is just about the best air cooler you can get for your computer's processor! :lol: (My cables are so neat now! ) PS: It's a Thermalright Ultra 120 eXtreme.
-
Just thought I'd put an update on the TGE up. I've implemented exceptions a while ago, which is turning out to be amazingly good! Instead of having to check everytime for errors, you can just 'throw' an error, without having to write condition statements all the time.. For example: void Test() { /* If an error occurs, it is dealt with automatically, you don't have to worry about checking it or displaying a message box */ OtherFunction(); } Instead of: void Test() { if(Failed(OtherFunction())) { /* This part would have to be repeated every time an error could occur */ char buf[256]; sprintf_s(buf, 256, "An error has occured! Message: %s", GetRoot()->GetError()->GetMessage()); MessageBox(NULL, buf, "A fatal error has occured", MB_OK); } } Pretty sweet, innit? :] Also made it even easier to create interfaces: Interface(MyInterface) { void Initialise() { } } Main() { pRoot->RegisterInterface(MyInterface); }
-
I'm selling my GTS so I can buy a GT. Just sent the order, got someone who's buying my GTS and now I'll just have to wait until it arrives. Looking forward to playing Crysis on it. :D Can't use my desktop, since it's got no onboard solution, so I'll switch to a laptop, temporarily. Shame to have to sell such a great card, but the GT is better, and it won't cost me a dime, so I'm happy. I'm getting MSI's, cuz it's hawtest. (And cheapest)
-
I've always wanted to open a technology forum, but just haven't had the time for it. Now that I've got to have something to publish, the engine I'm working on, I decided I could combine making a site for that and making a technology forum. So, I downloaded phpBB 3, did the set-up in a couple of hours and now it's kind of ready to use. Link Mac fanboys are welcome too. (That means you, Definition) :P Needs a better theme, I know. :glasses:
-
I've finally got some basic macros working for my engine! Here's an example .cpp file with macros: #include "TGE.h" Interface( MyInterface ) { Result Initialise() { Success(); } }; Main() { pRoot->RegisterInterface(MyInterface); Success(); } And an example file without macros: #include "TGE.h" class MyInterface: public TGE::Interface { public: TGE::Result Initialise() { return TGE::Success; } }; TGE::Result Main() { TGE::Root * pRoot = new TGE::Root(); pRoot->RegisterInterface<MyInterface>(); return TGE::Success; } Took some time to make, but it sure made the code more readable! :P
-
This: (Totally ripped from Definitions blog, but you just HAVE to see this)
-
They are amazing, and allow you to lots of cool stuff. But, the source code doesn't look pretty, at all. :mad: Here's my .cpp file from the Array class I'm working on: #include "array.h" namespace TGE { template<typename _TN> bool Array<_TN>::ReAllocate() { if(vp != NULL) delete [] vp; vp = new _TN[size]; if(vp == NULL) return false; return true; } template<typename _TN> bool Array<_TN>::IncreaseSize(int s) { size += s; return ReAllocate(); } template<typename _TN> bool Array<_TN>::AddValue(_TN v) { if(size == values && !IncreaseSize(1)) return false; vp[size-1] = v; values++; return true; } template<typename _TN> Array<_TN>::Array() { size = 0; values = 0; IncreaseSize(1); } template<typename _TN> bool Array<_TN>::Copy(Array<_TN> a) { Clear(); size = a.size; values = a.values; vp = new _TN[size]; *vp = *a.vp; return true; } template<typename _TN> bool Array<_TN>::Clear() { delete [] vp; } template<typename _TN> int Array<_TN>::GetSize() { return size; } template<typename _TN> int Array<_TN>::GetValues() { return values; } template<typename _TN> _TN* Array<_TN>::GetMemPtr() { return vp; } /* template<typename _TN> void Array<_TN>::func { } */ }