Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 7 developers from Canada and 18 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


Member Since 31 Jul 2005
Offline Last Active Feb 22 2014 09:31 AM

Topics I've Started

Indie Royale

28 October 2011 - 01:30 AM

I haven't seen any mention of it around here so I thought I'd share.

The first of the Indie Royale bundles is on sale right now: http://www.indieroyale.com/

It's similar to the humble bundle except that there's no charity involved. It has a minimum price that goes up each time someone buys a bundle, but you can pay more to reduce the price for everyone.

Of UIs and placement

04 December 2007 - 12:53 AM

Hi there, I'm in the middle of developing the UI system of my engine and I need some feedback. Free Image Hosting at www.ImageShack.us (Yeah, I really need some textures) As it stands I can place UIs in the scenegraph and they appear correctly. They are prerendered with their internal resolutions (similar to Doom 3, the one in the image is first rendered in 240x80 and then applied). All the widgets have 9 "hooks" in the corners, sides and middle so it's resolution independent. But I'm having troubles when I want a fullscreen UI. I've considered several options: 1. Place the UI in front of the camera. Not really an option. There are issues with widescreen displays or even changing the fov. Also remains the problem of losing the UI if you change to a different camera. 2. Have a boolean indicating the UI needs to be drawn fullscreen. Not too elegant. Why should it exist in the scene graph then? 3. Change the concept of rendering. I mean, instead of drawing the UI in front of the scene, change it so that there's a main UI and nothing else. This UI would then include widgets for camera feeds. This would allow interesting effects such as split-screen or PiP, but I think it's overkill. So, what do you think?

Of temporary files and folder structure

07 November 2007 - 11:33 PM

Hi there. I 've got a simple little problem with Visual C++ 2005. Let me explain: In my project I distribute source files into folders like this:
   |   |-image
   |   |-model
   |   |   |-MS3DLoader.h
   |   |   |-MS3DLoader.cpp
   |   |-body
   |       |-MS3DLoader.h
   |       |-MS3DLoader.cpp
(For the record, I'm calling a collision shape 'body') Now the problem lies with those 2 MS3DLoader. They both define a class named MS3DLoader but there's no problem since I'm using namespaces, but when I try to compile the project, I'm getting linker errors (unresolved external symbol). Apparently the temporary folder does not preserve this structure and outputs all the files into a single folder. Both of them produce a MS3DLoader.obj, one of them gets overwritten and the other gets linker errors. If I rename the file everything works fine, but this is a little annoying. So, Is there any way to tell Visual Studio 2005 Pro to preserve the folder structure? Thank you for your time.

Incorrect bump mapping problem (solved)

31 July 2005 - 05:46 AM

Hi, (hey, first post :D) I'm trying to add bump mapping to my engine, and it basically works, but it looks like light position is displaced from its place. This gets worse when I add the attenuation, as you can see that the brightest spot is not in the middle. Here's a screenshot without attenuation: Clicky The white sphere is the light and, as you can see, the light is displaced. I once saw a thread regarding this same topic, but after some hours searching i couldn't find it. The code I'm using to calculate the light vector is this:
	Light& light = lighting->GetLight(i);
	Vector3D pos = *light.GetPosition();
	float radius = light.Get_Radius();

		for(unsigned int j = 0; j<numTriangles; j++)
				EXENGINE_TRIANGLE& tri = triangles[j];
				for(int k = 0; k<3; k++)
					Vector3D lightVector = Vector3D(tri.v[k]->x, tri.v[k]->y, tri.v[k]->z) - pos;

					// S = sTangent.DotProduct(lightVector);
					tri.v[k]->s = lightVector.Dot_P(Vector3D(tri.v[k]->sTangent[0], tri.v[k]->sTangent[1], tri.v[k]->sTangent[2]));

					// T = tTangent.DotProduct(lightVector);
					tri.v[k]->t = lightVector.Dot_P(Vector3D(tri.v[k]->tTangent[0], tri.v[k]->tTangent[1], tri.v[k]->tTangent[2]));

					// R = normal.DotProduct(lightVector);
					tri.v[k]->r = lightVector.Dot_P(Vector3D(tri.v[k]->normal[0], tri.v[k]->normal[1], tri.v[k]->normal[2]));

And this is the code that generates the tangents:
		Vector3D normal = GetNormal(*tri->v[0], *tri->v[1], *tri->v[2]);

		Vector3D side0(tri->v[0]->x - tri->v[1]->x, tri->v[0]->y - tri->v[1]->y, tri->v[0]->z - tri->v[1]->z);
		Vector3D side1(tri->v[2]->x - tri->v[1]->x, tri->v[2]->y - tri->v[1]->y, tri->v[2]->z - tri->v[1]->z);

		// Calculate S tangent
		float deltaS0 = tri->v[0]->tv - tri->v[1]->tv;
		float deltaS1 = tri->v[2]->tv - tri->v[1]->tv;
		Vector3D sTan = side0*deltaS1 - side1*deltaS0;

		// Calculate T tangent
		float deltaT0 = tri->v[0]->tu - tri->v[1]->tu;
		float deltaT1 = tri->v[2]->tu - tri->v[1]->tu;
		Vector3D tTan = side0*deltaT1 - side1*deltaT0;

		// Make sure their cross product faces the same direction as the normal
		Vector3D tangentCross = sTan.Cross_P(tTan);
		if(tangentCross.Dot_P(normal) < 0.0f)
			sTan = -sTan;
			tTan = -tTan;

// ... add them to the vertex's tangents and normal
// ... later all the vectors are normalized

I'm sorry to ask for help in such a way, but I've ran out of ideas. [Edited by - Gaenor on August 1, 2005 12:10:22 PM]