Advertisement Jump to content
  • Advertisement

rajesh_nest

Member
  • Content Count

    148
  • Joined

  • Last visited

Community Reputation

136 Neutral

About rajesh_nest

  • Rank
    Member
  1. Need a help in understanding the logic behind the Ray-Box intersection. Ray Box Intersection does the following nt intersectBox_cpu(Ray_cpu r, float3 boxmin, float3 boxmax, float *tnear, float *tfar) { // compute intersection of ray with all six bbox planes float3 invR = {1.0/r.d.x,1.0/r.d.y,1.0/r.d.z}; float3 tbot = {invR.x*(boxmin.x - r.o.x), invR.y*(boxmin.y - r.o.y), invR.z*(boxmin.z - r.o.z)}; float3 ttop = {invR.x*(boxmax.x - r.o.x), invR.y*(boxmax.y - r.o.y), invR.z*(boxmax.z - r.o.z)}; // re-order intersections to find smallest and largest on each axis float3 tmin = fminf(ttop, tbot); float3 tmax = fmaxf(ttop, tbot); // find the largest tmin and the smallest tmax float largest_tmin = fmaxf(fmaxf(tmin.x, tmin.y), fmaxf(tmin.x, tmin.z)); float smallest_tmax = fminf(fminf(tmax.x, tmax.y), fminf(tmax.x, tmax.z)); *tnear = largest_tmin; *tfar = smallest_tmax; return smallest_tmax > largest_tmin; } I understood the first part. It finds the intersection Ray and six planes.  But the second part, finding  the largest tmin and the smallest tmax, is not very intuitive.   Can anyone help.
  2. I need to highlight the mouse selected point  on the mesh.    Now my application converts the 2D point into 3D  and redraws the  mesh. But the problem is, many times 3D point too small enough to get displayed. Then I draw another point  - x offset from the 3D  point. Though point is now visible, upon zooming the two points are visible.    I have seen some software, displaying selected point as small circles or other gemotries.    Any idea, how can we do this?
  3. I am trying to develop an application similar to volume rendering. Here I am considering Rays as traversing in cone beam (similar to perspective geometry) fashion. Each ray makes an angle say phi with the ray going through the center of the volume. Now my problem is that, few of my rays are missing the volume. Because of which my the rendered volume is clipped at the sides. Any suggestion for overcoming this issue. ( I test the rays against a bounding box. Bounding box is defined to be width, height and depth of the volume)
  4. I have an application (for rendering quad mesh) originally written for Linux. To run this application in windows, I build the code, using MS Visual studio 2010 for both 32 bit and 64 bit. Unfortunately my 32 bit and 64 bit outputs are totally different. I am suspecting this because of STL algorithms, used heavily in the algorithm. Is it so?
  5. How can I convert boost library defined any_cast function to normal C++ types. I don't want to use Boost library. T val val = boost::any_cast<T>(attributes->value); Please help.
  6. When I attempt to lit the mesh after filling holes, there were several black spots. All of them at the hole filled regions. I understand that it is because of incorrect surface normal computation. How to correct this issue?
  7. Given points in an arc, is it possible to find the radius and center of the circle to which this arc belongs to.
  8. rajesh_nest

    Morse smale complex

    Thanks a lot. I understood. Ok I will explain problem being encountered. In order to do the initial parameterization, I am labeling all the vertices with their patch index.For that I am finding the maxima and minima of all the vertices and label them accordingly. (On the assumption that the same maxima and minima will not repeat for two patches). But I am encounter the following issues, 1. The path to maxima/minima is ending up in saddles for some vertices. 2. Getting wrong maxima/minima(Different patches). Please note I have yet to implement do Quassi dual calculations. Computing Quassi from primal is not straight forward for me. I also suspect some issue in my Inverse mapping calculations (from (u,v) in R2 back to (x,y,z) in R3). Tsus, Once again thanking you for great support. you are only hope for me.
  9. rajesh_nest

    Morse smale complex

    Thanks a lot. I could complete the initial parameterization (R3 to R2) and also the inverse mapping ( R2 - R3). But now problem is there is enough shape loss after inverse mapping, Even though, I am getting quads. I skipped Transition function ([font=arial, sans-serif][size=1]???) [/font]which maps from one patch ( say alpha) to another patch (say beta) SSQ specifies to build a dual graph of all patches. How to build this dual graph which maps from alpha to beta and also from alpha to gamma. I am still not comfortable the concept of Transistion ([font=arial, sans-serif][size=1]???). [/font]
  10. rajesh_nest

    Morse smale complex

    Hi thanks. I have finished Primal dual construction. But I am encountering monkey saddles. How to resolve them?
  11. rajesh_nest

    Remeshing

    Has anyone tried remeshing your mesh? I am looking for an algorithm or C++ implementation, which converts an irregularly triangulated mesh to fine mesh with triangles having same area or same shape. Can anyone suggest.
  12. rajesh_nest

    Morse smale complex

    [font="Book Antiqua"]Thanks a lot Tsus. It was very helpful [/font] [font="Book Antiqua"]I have two more questions.[/font] [font="Book Antiqua"]1. I am identifying saddles and min/max by comparing the scalar values of each vertices with one ring around that vertex .Now I got those critical points and the connecting paths and form patch. but how we can identify the vertices with in each patches? [/font] [font="Book Antiqua"]2. Once you complete the Morse smale complex from Primal and Quassi dual and form Quadrangular patch, Is it necessary to implement Mesh parameterization? [/font] [font="Book Antiqua"]3. Mesh parameterization mentioned in Dong et.al paper is not easy to understand. Specifically speaking Transistion function is not trivial to understand. [/font]
  13. rajesh_nest

    Morse smale complex

    The paper I was referring is Spectral surface quadrangulation. 1. How do I compute saddles from a given triangular mesh, given scalar values at vertices. 2. From the saddles, how to determine the line starting from saddle and reachig a minimum/maximum. 3. What is degenarcy in this case? Please help me.
  14. I have a mesh with triangle and vertex information. Now I need to extract a region (patch) of the mesh. Using some algorithm I can find boundary triangles of the region. Now How can I determine the inner triangles of the patch with boundary triangle information.
  15. rajesh_nest

    Morse smale complex

    Has anyone tried Morse smale complex on triangular mesh. I am trying to implement Quadrangulation algorithm described in the paper My link This algorithm is based on Quadrangular patch construction based on Morse smale complex. How difficult is to implement the algorithm on triangular meshes?
  • 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!