Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

102 Neutral

About oblivion_ocean

  • Rank
  1. oblivion_ocean

    Binary Data To A Webserver

    Thanks for the reply. I tried application/octet-stream and the result is empty, with or without binary data. Perhaps using $_POST is a problem after that or? Really not sure. Edit: Got it working, just can't use post, grabbed the raw data. Thanks!
  2. I'm using winsock to send binary image data to a simple PHP script. theSocket = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP); I can get regular data to send properly but binary data is not working out here and showing up all corrupt. I was careful not to use any string functions which would corrupt the data on the client end. Any help would be very much appreciated ..the more detail the better. POST url HTTP/1.1 HOST: server User-Agent: program Content-Transfer-Encoding: binary Content-type: application/x-www-form-urlencoded; charset=UTF-8 Content-length: 1723 data=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $fp = fopen($filename, "wb"); fwrite($fp, $_POST["data"]); fclose($fp);
  3. oblivion_ocean

    UV Mapping

    Never mind, figured it out. Turns out, the image was vertically flipped (likely from saving to bmp). Thanks for your time!
  4. oblivion_ocean

    UV Mapping

    Is there a sample someone can post so I can try this out because I'm running into issues, even though I believe I am doing everything correctly and passing the correct values to glTexCoord2f() for all verts. It has to be something dumb or some variation I'm not aware of but I would like a reliable sample to be sure or if someone would like to try importing this, I will post it somewhere. Object File : http://www.text-uplo...02841&c=4587487 Texture Image : http://oi43.tinypic.com/2d2g7xd.jpg Here it is, take a look. Got the shape but the texture is just off.
  5. oblivion_ocean

    UV Mapping

    "However, in the end you need to have exactly 1 texture co-ordinate tuple for each vertex position you pass to OpenGL." That's all I'm looking for; just wanted to be sure there was nothing else going on before I jumped in to finish this object loader. I'll follow up here if required thanks.
  6. oblivion_ocean

    UV Mapping

    I've already created the loader and everything, my question has to do with the vt values specifically. Is it as easy as plugging them into glTexCoord2f()? Just wanted to ask before I spent the time. Not sure if there are variations on how UV Mapping is done so, thought I'd ask here first.
  7. oblivion_ocean

    UV Mapping

    Hoping to get a detailed response! I'm wondering how I can read in a UV texture map that looks something like this: http://oi43.tinypic.com/osc2tu.jpg The above was saved from a very simple sphere and saved as an object file. I am using OpenGL and want to import it using an object loader. Here are some snippets from that file if this offers a clue to how faces are organized. v 0.788558 0.182857 -0.583303 v 0.763021 -0.552948 -0.325232 v 0.000000 0.441661 -0.871224 v 0.000000 0.947624 -0.233366 v 0.000000 0.172146 0.960696 vt 0.527612 0.590604 vt 0.619266 0.558969 vt 0.620496 0.648223 vt 0.507932 0.493025 vt 0.578067 0.505968 f 1/4 17/5 39/1 f 16/2 39/1 17/5 f 3/13 13/14 6/15 f 6/15 13/14 35/16 f 3/13 14/17 13/14 Wondering if glTexCoord2f() is all I need with the vt values? Any help would be appreciated.
  8. oblivion_ocean

    Trig Rotation

    Got it going! Very much appreciated.
  9. oblivion_ocean

    Trig Rotation

    Awesome, you saved me a lot of headache! There is still one bug remaining however, x and z rotations work correctly, something else needs adjusting for y. mw.new_y = cos(degx)*y - sin(degx)*z; mw.new_z = sin(degx)*y + cos(degx)*z; mw.new_z = cos(degy)*mw.new_z - sin(degy)*x; mw.new_x = sin(degy)*z + cos(degy)*x; mw.new_x = cos(degz)*mw.new_x - sin(degz)*mw.new_y; mw.new_y = sin(degz)*x + cos(degz)*mw.new_y; [/quote]
  10. oblivion_ocean

    Trig Rotation

    Okay, I'll keep it simple and illustrate 2 formulas. This formula works great, only thing is it's just 2 axis rotations. mw.new_x = cos(degy)* x + sin(degy)*sin(degx)*y - sin(degy)*cos(degx)*z; mw.new_y = 0 + cos(degx)*y + sin(degx)*z; mw.new_z = sin(degy)*x + cos(degy)*-sin(degx) *y + cos(degy)*cos(degx)*z; [/quote] This is the one from the website (adjusted a bit) perhaps I'm implementing it wrong? After I used a cube illustration, it's apparent gimbal lock isn't the problem. mw.new_y = cos(anglex)*y - sin(anglex)*z; mw.new_z = sin(anglex)*y + cos(anglex)*z; mw.new_z = cos(angley)*mw.new_z - sin(angley)*x; mw.new_x = sin(angley)*mw.new_z + cos(angley)*x; mw.new_x = cos(anglez)*mw.new_x - sin(anglez)*mw.new_y; mw.new_y = sin(anglez)*mw.new_x + cos(anglez)*mw.new_y; [/quote]
  11. oblivion_ocean

    Trig Rotation

    Thanks for the post, do you have it in C though? It did happen again just now so, it's definitely something and it turned my 2D box into what looks like a toothpick. I do think it is that Gimbal lock, which should be fine as long as it's rare and this does seem more difficult to replicate. I am still playing with this, I'll let you know though ..and yes, C source if you have it, would be great.
  12. oblivion_ocean

    Trig Rotation

    Sounds like the problem could be due to Gimbal Lock . You may be able to implement your three dimensional rotations as a matrix/quaternion instead of using Euler angles to solve this problem (if it is the problem I think it is). Do you have any screenshots/demo you could share? [/quote] Thanks for your quick response! If you could link me to some matrix/quaternion source that would be great, but using Euler angles is an attempt to keep things straight-forward. I will definitely get some screenshots or make a small video illustrating the problem later this evening.
  13. oblivion_ocean

    Trig Rotation

    Need a little help with trig rotation following the website below: http://www.kirupa.com/developer/actionscript/trig_multiple_axis.htm For whatever reason, rotating around the center of the object using certain angles result in a flattening of the object. Everything works good with two different axes rotations, but upon the introduction of the third, there's trouble. If you have a solution, it has to be something simple I'm sure, any source would be much appreciated. Thanks.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!