• What are you working on? V10
    2,002 replies, posted
I just learned about lighting in OpenGL. I think I died after reading that I have to specify normals for every vertex I place. How am I supposed to do that for really complex shapes? And also, how do I work out normals for shapes such as gluSolidSphere and so on?
[QUOTE=Chris220;21961773]I just learned about lighting in OpenGL. I think I died after reading that I have to specify normals for every vertex I place. How am I supposed to do that for really complex shapes? And also, how do I work out normals for shapes such as gluSolidSphere and so on?[/QUOTE] There are ways to calculate normals based on neighboring vertices but most of the time for models they are exported from the modeling package.
Set every normal to (0, 0, 0), then loop over all faces and for each vertex assigned to it add the surface-normal (simply do Cross(v1 - v2, v1 - v3)). I'm not sure if it's faster to normalize right away or do another loop to normalize the normals after all values are added together. I'd guess the latter one.
-snip- I seemed to have fixed this error. Now to work on making the data actually upload...
I am working on a small XNA tank shooter game
Ugh, uploading on iPhone is very hard. I am using the ASIHttpRequest library, and cant seem to get the request to upload NSData from UIImagePNGRepresentation() to anyhub (with [url]http://anyhub.net/api/upload[/url]). If you think you can help, please do. Im stumped :\
I added pattern editing for the inequalities: [img]http://img80.imageshack.us/img80/16/booleanpatterns.png[/img] This way you can draw different inequalities with different patterns to distinguish them.
Just learned that I can use C# as a scripting language.
[QUOTE=Stickmoose;21961864]There are ways to calculate normals based on neighboring vertices but most of the time for models they are exported from the modeling package.[/QUOTE] Which format(s)?
[QUOTE=r4nk_;21955024]<image> screenshot of progress. This is our least-favored project this semester (we are more interested in the game engine project), so we left this shit till last minute, and we have an extension until monday, and are coding our pants off. Blue platforms disappear when you walk on them.[/QUOTE] You might want to think about applying the bloom effect [i]before[/i] drawing the HUD.
[QUOTE=Xerios3;21964358]Just learned that I can use C# as a scripting language.[/QUOTE] Any good guide on how to do that?
[QUOTE=nullsquared;21963741]I added pattern editing for the inequalities: [img]http://img80.imageshack.us/img80/16/booleanpatterns.png[/img] This way you can draw different inequalities with different patterns to distinguish them.[/QUOTE] dude your grapher is getting way too awesome :D
Currently working on the BananaLAND game [url]http://spamtheweb.com/ul/upload/150510/53627_Core_engine_1.php[/url] [IMG]http://i869.photobucket.com/albums/ab255/Yournameisinvalid21/BananaMan.png[/IMG]
Ha, that's cool.
[QUOTE=windwakr;21966093]If you go all the way to the right, then press down, your character slides backwards.[/QUOTE] AWESOME! never noticed that before
[QUOTE=Garb;21966342]AWESOME! never noticed that before[/QUOTE] It's not a bug...it's a feature :D
update [img]http://filebox.me/files/6fgpb6hrj_screenshot.png[/img]
[quote=r4nk_;21966833]update [img]http://filebox.me/files/6fgpb6hrj_screenshot.png[/img][/quote] needs more bloom!
[QUOTE=r4nk_;21966833]update [img]http://filebox.me/files/6fgpb6hrj_screenshot.png[/img][/QUOTE] Self deprecation win.
[QUOTE=r4nk_;21966833]update [img]http://filebox.me/files/6fgpb6hrj_screenshot.png[/img][/QUOTE] needs more brown
Ugh. This AnyHub app is killing me. The uploading process is hell. Some times it will query, other times it wont. I would appreciate some help. [code] // IMAGE PICKER DONE METHOD FOR DELEGATE -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { imageData = UIImagePNGRepresentation([info objectForKey:@"UIImagePickerControllerOriginalImage"]); if (imageData) { [imageLabel setText:@"Image selected!"]; } uploader.enabled = YES; [picker dismissModalViewControllerAnimated:YES]; } // CALLED WHEN UPLOAD BUTTON IS CLICKED -(IBAction)upload:(id)sender { uploader.frame = buttonShape; uploader.enabled = NO; pickerButton.enabled = NO; [spinner startAnimating]; [NSThread detachNewThreadSelector:@selector(doUpload) toTarget:self withObject:nil]; } // METHOD FOR UPLOADING ON ANOTHER THREAD -(void)doUpload { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSURL *uploadURL = [NSURL URLWithString:@"http://anyhub.net/api/upload"]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:uploadURL]; [request setPostValue:imageData forKey:@"Formdata"]; [request startSynchronous]; //response = [NSString stringWithString:[request responseString]]; [self performSelectorOnMainThread:@selector(uploadDone) withObject:nil waitUntilDone:YES]; [pool drain]; [pool release]; } // IS CALLED WHEN UPLOADING IS DONE -(NSInteger)uploadDone { NSLog(@"DONE UPLOADING\nERROR RETURNED: %@", response); [spinner stopAnimating]; uploader.frame = origShape; uploader.enabled = NO; pickerButton.enabled = YES; [imageLabel setText:@"Select an image"]; imageData = nil; NSInteger http = 200; // Replace when done with uploading return http; } [/code]
[QUOTE=r4nk_;21966833]update [img]http://filebox.me/files/6fgpb6hrj_screenshot.png[/img][/QUOTE] where are the men with arms thicker than their heads
What does every generic work your way up the corporate ladder flash game need?
[QUOTE=r4nk_;21966833]update [img_thumb]http://filebox.me/files/6fgpb6hrj_screenshot.png[/img_thumb][/QUOTE] [img]http://www.impactlab.com/wp-content/uploads/2008/04/fast-internet2.jpg[/img]
so many quotes :psyduck:
[QUOTE=i300;21967257]Ugh. This AnyHub app is killing me. The uploading process is hell. Some times it will query, other times it wont. I would appreciate some help. [code] // IMAGE PICKER DONE METHOD FOR DELEGATE -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { imageData = UIImagePNGRepresentation([info objectForKey:@"UIImagePickerControllerOriginalImage"]); if (imageData) { [imageLabel setText:@"Image selected!"]; } uploader.enabled = YES; [picker dismissModalViewControllerAnimated:YES]; } // CALLED WHEN UPLOAD BUTTON IS CLICKED -(IBAction)upload:(id)sender { uploader.frame = buttonShape; uploader.enabled = NO; pickerButton.enabled = NO; [spinner startAnimating]; [NSThread detachNewThreadSelector:@selector(doUpload) toTarget:self withObject:nil]; } // METHOD FOR UPLOADING ON ANOTHER THREAD -(void)doUpload { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSURL *uploadURL = [NSURL URLWithString:@"http://anyhub.net/api/upload"]; ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:uploadURL]; [request setPostValue:imageData forKey:@"Formdata"]; [request startSynchronous]; //response = [NSString stringWithString:[request responseString]]; [self performSelectorOnMainThread:@selector(uploadDone) withObject:nil waitUntilDone:YES]; [pool drain]; [pool release]; } // IS CALLED WHEN UPLOADING IS DONE -(NSInteger)uploadDone { NSLog(@"DONE UPLOADING\nERROR RETURNED: %@", response); [spinner stopAnimating]; uploader.frame = origShape; uploader.enabled = NO; pickerButton.enabled = YES; [imageLabel setText:@"Select an image"]; imageData = nil; NSInteger http = 200; // Replace when done with uploading return http; } [/code][/QUOTE] [IMG]http://i42.tinypic.com/2rgge9h.png[/IMG]
[QUOTE=pondefloor;21967069]needs more brown[/QUOTE] [img]http://dl.dropbox.com/u/100275/brown.png[/img] no problem
@i300, is there a call back when it finishes its synchronous upload?
[QUOTE=Xera;21967983][img]http://dl.dropbox.com/u/100275/brown.png[/img] no problem[/QUOTE] Spot-on!
[QUOTE=Xera;21967983][img]http://dl.dropbox.com/u/100275/brown.png[/img] no problem[/QUOTE] Too colorful :saddowns: [IMG]http://i43.tinypic.com/35lc41y.png[/IMG] Also DOF.
Sorry, you need to Log In to post a reply to this thread.