Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Oct 2010
Offline Last Active Sep 27 2015 06:21 PM

Posts I've Made

In Topic: OpenGl selection

21 May 2015 - 09:55 PM

If you need to pick all vertices within a tolerance given the ray cast by the mouse, then you have to check all the vertices, create a ray from the camera to the vertex, and determine if that ray is within a certain tolerance of the picker ray based on the angle between them (a simple dot product).
It looks like raytrace can help me with "visible or not" only - because first all of the vertices should be checkd for dot (or distance in isometric), It and can be not fast on CPU. Or I missed something?

In Topic: OpenGl selection

21 May 2015 - 12:43 AM

Oh! So nothing new in OpenGL itself, need to find other ways. It's already a helpful info for me, thank you


1) Color way. Questions

 - what if AA mixes colors?

 - how to pick object obscured by others?


2) Raytrace way. For example user picked a point and I need to find everythig in radius 10 pixels. If I cast a ray (from camera to picked point) it would intersect some polygons - but they can be not all in the radius. If I need to pick vertices - how rays can help me?


Also AFAIK typically raytrace BVH is built once for whole scene. But I've a lot of primitives shown/hidden/resized dynamically, so I'm afraid that BVH updating would be slow and hard to implement. Is it a problem?



In Topic: FBX - UV usable range?

25 September 2014 - 02:15 AM

There's no point in assigning texture coordinates to a texture
Please look at image above. From FBX I've read the texture map that has this image and uses UVs, I know their ranges. FBX texture scales are 1.0 and translation is 0.0. Please tell me how the texture should be mapped? Or, in other words, how to calc what pixel corresponds to a vertex? IMO there are not enough data, that's what I'm looking for.

In Topic: FBX - UV usable range?

23 September 2014 - 11:14 AM

It's easy to check in practice. For example for the attached texture the U range is [-3.61...4.82]. But obviously it can't be tiled rationally with assumption the range is [0..1]

In Topic: FBX - UV usable range?

23 September 2014 - 01:20 AM

No. [0,0] is the upper-left corner of the image and [1,1] is the lower-right. [0.5,0.5] is the center. It is not “predefined”, it is the result of the convention.
I see no any difference, anyway constant values are used


If the UV’s go from -100 to 0, then the image repeats 100 times. If they go from 0 to 100, it repeats 100 more times. -100 to 100? 200 repeats.
It's only in OpenGL (black sheep in 3D family). Generally 3d apps can write any UV values