Jump to content

  • Log In with Google      Sign In   
  • Create Account


sylpheed

Member Since 17 Dec 2008
Offline Last Active Jul 27 2013 05:10 AM

Posts I've Made

In Topic: How do you pick an edge?

25 April 2011 - 08:28 AM

It would suffice to simply find the closest edge to the cursor-ray, choosing those less than your epsilon; if you like you'd be intersecting your cursor ray with capsules that contain each edge as you do with spheres that contain your vertices.

probably what could be even better (and far simpler), is to simply find the first intersected triangle, and evaluate if the intersection point is close to an edge/vertex to choose those instead of the triangle face. if you needed to have wireframe; having triangles with no solid faces too, then you could simply continue along ray if you intersect a triangle which has no face, and the intersection point is not sufficiently close to the edges/vertices.

in both cases you can project the intersection point onto the given edge/vertex to get a picking point on the feature if needed.

my second proposed method would likely be much more easily transformed to make the 'thickness' of the edge/vertex be screen-space constant which would probably be far preferable as then the distance from cursor to the visual representation of the edge/vertex required to select it wouldn't become too large as edge/vertex approaches near clip-plane, or too small to be able to reliably select the edge/vertex if it moves very far away from the camera.


Thank you luca, that's a really nice idea. I will search the picked triangles and then choose the nearest edge :)

In Topic: How do you pick an edge?

25 April 2011 - 07:19 AM

Have you tried doing distance to edge from click point? Then pick nearest?

Cheers, Paul.


I thought doing that first time, but exists the problem of "where is the clicked point in 3D space?", I could calc the ray direction picking, but I need to know how much distance is the "clicked point I want to" from the camera. I would need a plane or something to calc the point in 3D space and then do distance to edge. Sorry for my English, it's not very fluent.

In Topic: How road creation works?

08 September 2010 - 07:31 PM

Great answers, thank you.

So, if the track is a static mesh, does it mean graphic engine has loaded the whole track before race starts? Then, has the track the same behaviour like a common character (in "load/free model" senses) or should be managed in other way?

In Topic: Does glAccum use AA filter?

19 October 2009 - 02:30 AM

Thanks for you answer.

Old hardware is not a problem for our purpose, we have a high system requirements, so framebuffer should be supported by clients.

I'll try with framebuffers, but, what would you use to mix the results offered by framebuffers? Using accumulation buffer, I had:

for (...)
...
glAccum (GL_ADD, ...)
...
end
glAccum (GL_RETURN);

With framebuffers, should I use glTexEnvi with GL_COMBINE instead of glAccum (GL_ADD,...)?

Thanks again

In Topic: How do you do post-process in OpenGL + CG?

22 December 2008 - 09:12 PM

Finally... I DID IT!!

Tears in my eyes, is a beginner code, but it has been soooo long... and now is a happy end :)

Thanks Bluntman for your help, you give me the trick! The steps are:

1) Render all previous passes in FBO's (the last pass uses all FBO's textures for calc the results).
2) In the last pass, render a full screen Quad (it is equivalent to "target=buffer").

For those who have the same problem, dont't forget binding FBO's textures to CGFX texture samplers!! ;)

Best regards.


PARTNERS