Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Pages: 1 ... 12 13 [14] 15 16 ... 20

Author Topic: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)  (Read 246110 times)

cooldude234

  • Sr. Member
  • ****
  • Posts: 902
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #195 on: February 28, 2013, 09:23:55 pm »

I just tested your code, it doesn't work. It apparently has a collision really messed up, it seems to have collision in a random place on the plane, and the collision spot is smaller than the actual triangle.
I'll do some more debugging.
Logged
¼

Thanos

  • Full Member
  • ***
  • Posts: 104
  • -.-
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #196 on: March 01, 2013, 07:43:21 am »

I just tested your code, it doesn't work.
DOH. :-/
Did you also test the code I sent you in the PM and it still doesn't work?

Also what method are you using (I really don't understand any the code too much), is it this method you are using?
http://geomalgorithms.com/a06-_intersect-2.html
Nope, the method I use is based on solving linear systems of equations. I might upload some explanation later.

Right now I'm trying to figure out how a, b and c are being represented as the plane, because the math that you used to make the plane defined by the triangle is exactly the same as the code I used for finding the normal of the triangle (by getting the cross-product). But you cannot have a plane with the normal, you need a point as well to define the position (I use the first vertices read because its quick and easy, it doesn't matter which it is anyways).
You forgot 'd'. (a,b,c) is indeed the normal of the plane. But, a*x+b*y+c*z=d is what describes the actual plane. I put it in a linear system with the other equations (lines etc) and new results are produced. The assignments I do (abcd,a1a2 etc) are actually the solutions of the linear systems.
No, of course I didn't solve them myself. get wxMaxima from here: http://sourceforge.net/projects/wxmaxima

The code for finding the collision point is correct, I've tested it many times. Now, what happens with the code for checking if it belongs in the triangle... that's another weird problem.

EDIT: wait, what do you mean 'the collision spot is smaller than the actual triangle'?
« Last Edit: March 01, 2013, 07:45:43 am by Thanos »
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 902
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #197 on: March 01, 2013, 02:59:32 pm »

The code you sent the pm was exactly the same as the one you sent in the post and d is never used for testing if the point is inside the triangle.

The code for finding the collision point is correct, I've tested it many times. Now, what happens with the code for checking if it belongs in the triangle... that's another weird problem.

EDIT: wait, what do you mean 'the collision spot is smaller than the actual triangle'?
Yea the issue I'm having isn't finding the collision point, but just whether it lies inside the triangle or not.

Also what I mean by the collision spot is, the area of collision (the area where you can collide with the object) doesn't match up with the triangle it's self (previously it was close, it just didn't match near the vertices), here no matter what it appears to be flipped on the x (or maybe z axis, maybe both?) and is about a third of the triangles size.

EDIT: I may have fixed it. I took out some code that probably was scaling it out of proportions, and I also fixed it's flipped axis once again (it also had to do with that weird code). It seems to be working, but just a little minor thing. I have two vertices joined together, and I keep falling between them at where their joined. I thought checking if greater or equal to was supposed to check if its on the edge as well?

EDIT: there seems to be some issues when I put it into an object, I not sure whats happening so I'll do some more debugging, but it doesn't seem to be working again ):
« Last Edit: March 01, 2013, 03:40:54 pm by cooldude234 »
Logged
¼

Thanos

  • Full Member
  • ***
  • Posts: 104
  • -.-
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #198 on: March 02, 2013, 01:09:36 pm »

d is never used for testing if the point is inside the triangle.
Oh yes, for testing if the point belongs in the triangle I didn't use d, but the plane's normal plus a vertice that belongs in the plane (Vert1/2/3).

EDIT: there seems to be some issues when I put it into an object, I not sure whats happening so I'll do some more debugging, but it doesn't seem to be working again ):
): I'll test it again too... but I've failed so many times that I'm not anymore sure if I'll do anything useful...
Logged

cre8orexpert

  • Newbie
  • *
  • Posts: 19
  • "Not enough characters"
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #199 on: March 03, 2013, 07:42:28 am »

Don't give up Thanos, one day you will be playing a game made by dude's engine, see a awesome collision, and think "hey that's my code!", while mankind is being annihilated by an alien spaceship from sector XD-123 and cooldude234 is happily laughing at how much he sold earth for. Hey robert, are you working in something else, other than physics and sound?

PS: I need to stop drinking so much coffee.
« Last Edit: March 03, 2013, 07:44:39 am by cre8orexpert »
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 902
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #200 on: March 03, 2013, 02:53:53 pm »

I'm always working on various things. A lot of it is structure, I'm working on an entity structure (an entity manager), and various things like that. Unfortunately a lot of things I need to work on like lighting all depend on collision, and accurate collision to what you are looking at. Because of this, Bullet physics, Havok physics, and even Nvidia's Phyxs is not suitable (they can only do triangle collision with static meshes).
Think of it as ray tracing. I'm pretty much trying to do ray tracing and need to detect when the ray hits the triangle (it's actually not ray tracing, but something that uses the same concepts).

Other things are being worked on such as,
texture manager,
audio effects (real time reverb and such),
an advanced lod system,
methods of volumetric rendering (besides iso surfaces/ polygons),
video playback as textures,
texture generation, like perlin noise (remember that cre8oristhe ;) I got it working)
I'm also learning about matrices and skeletal animations (I may get back to you on that cre8oristhe, well considering your on Skype as I type, yea :P).
And a bunch of smaller stuff that I cant remember (I have them written down somewhere).
EDIT: of course I forgot the scripting part (that's where the user shall have control over everything).

EDIT: Most of this stuff is working in the math, but just needs to be implemented or made faster.
« Last Edit: March 03, 2013, 03:02:07 pm by cooldude234 »
Logged
¼

Thanos

  • Full Member
  • ***
  • Posts: 104
  • -.-
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #201 on: March 09, 2013, 04:54:42 am »

Sorry for being idle, the semester has started and I had to cope with it.

cooldude234, can you please give me again an example input to test? i.e. 3 points of a triangle and 2 points of a line that you know they produce wrong results? Because I made many tests and it works so far flawlessly.
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 902
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #202 on: March 09, 2013, 05:32:21 am »

what it does is when I move the camera (it has a wasd first person movement style and I'm using the cameras movement to form a ray to test collision so I can easily see the collision), it locks onto a plane of a polygon that I am no where nears for a split second. I know this isn't lag because I purposely debugged this to check that.
Also the edges of the polygons don't necessarily work, when I have two polygons 'attached' and I have the camera move against it and it falls between where the polygons are joined.

Now the speed of the applications runs a little slower but faster than what I was expecting, however this is because I am calculating collision to about 800 faces every frame, this could be easily fixed by instancing and quantizing the polygons into sections making a hierarchy of polygons closest to the ray (in other words calculating if a collision occurs only to polygons that are close to the ray).

Quote
Sorry for being idle, the semester has started and I had to cope with it.
Don't worry about it, it's not like I'm paying you ;) thanks for the help none the less
Logged
¼

cooldude234

  • Sr. Member
  • ****
  • Posts: 902
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #203 on: March 09, 2013, 07:02:55 am »

I got a little bored with some things and I decided to try making split screen, it works good. I just got to figure out how to structure it into an useful easy to use function to be scripted. Which reminds me, I got to get around to actually getting some form of scripts being executed.
Logged
¼

Thanos

  • Full Member
  • ***
  • Posts: 104
  • -.-
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #204 on: March 23, 2013, 09:57:53 am »

I really want to see this bug solved, so I started making a small ray tracer based on line triangle collision, to verify the causes visually.

(Who knows, it might prove useful later too.)

EDIT: Of course you're not paying me :P that's the point of FOSS. A paid coder wouldn't make a whole program to solve just a bug. ;)
« Last Edit: March 23, 2013, 09:59:38 am by Thanos »
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 902
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #205 on: March 23, 2013, 04:36:37 pm »

besides that I don't know what FOSS means, thanks thanos. As I said the only things I notice out of place is that the seems of the triangles aren't all that great, you can go straight through them, its like a 0.1 gap between them, and the other thing is that it sticks on the planes of the triangles for no apparent reason(although I can still move, it just sticks for a split second).
Logged
¼

Thanos

  • Full Member
  • ***
  • Posts: 104
  • -.-
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #206 on: April 16, 2013, 12:29:44 pm »

http://en.wikipedia.org/wiki/Free_and_open-source_software

I made it... it renders a black screen, so it seems the function returns always false. Weird. Maybe some more bugtracking will show the cause.

Are you working on other things meanwhile?

EDIT: Oops, it was a bug outside the function... my fault... please stand by.
EDIT2: Still black. :(
EDIT3: Ok, working... I'm now trying to convince WinGDI to display it on screen. Somehow!
EDIT4: AH finally!

cooldude234, could you please run this on your PC and send me the result? Double clicking on the window saves the image in C:\test.bmp.

The attached test.png is what I get. Edges look OK here. Also the bright line at the middle is a good sign. We'll see if this is a matter of different pc architectures (I doubt it).

EDIT5 tart.exe had a bug, I uploaded new version below.
« Last Edit: April 17, 2013, 07:02:41 am by Thanos »
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 902
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #207 on: April 16, 2013, 01:49:37 pm »

I cant even run it, it's missing a dll called libgcc_s_sjlj-1
and yes I am working on many stuff other than this.
Recently I worked on some of my orthographicall functions for making a better GUI system, I also worked on finishing building one of my instruments and I'm also working on finding a job ;)
Logged
¼

Thanos

  • Full Member
  • ***
  • Posts: 104
  • -.-
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #208 on: April 17, 2013, 06:57:35 am »

You have a busy life :) that's good.

Pardon me for the last one, I should have used -static-libgcc and -static-libstdc++ options while linking. Try with this one.

PS I added two flaps at the sides, don't get surprised if they magically appear on the screen :P
« Last Edit: April 17, 2013, 07:01:05 am by Thanos »
Logged

cooldude234

  • Sr. Member
  • ****
  • Posts: 902
  • You know what I realized, I dont have an avatar :\
    • View Profile
Re: WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)
« Reply #209 on: April 17, 2013, 01:02:34 pm »

Here it is ;)

PS: .bmp format is not allowed on the anim8or forums :S so here's a jpg screenshot
Logged
¼
Pages: 1 ... 12 13 [14] 15 16 ... 20