Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7575705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:44:43+00:00 2026-05-30T16:44:43+00:00

I am rendering models based on milions (up to ten) of triangles using VBOs

  • 0

I am rendering models based on milions (up to ten) of triangles using VBOs and I need to detect which of these triangles the user may click on.

I try to read and understand how the “name stack” and the “unique-color” work.
I found that the name stack can contain at max only 128 names, while the unique-color can have up to 2^(8+8+8) = 16777216 possible different colors, but sometimes there could be some approximations, so it can get modified..

Which is the best strategy for my case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:44:45+00:00Added an answer on May 30, 2026 at 4:44 pm

    Basically, you have 2 classes of options:

    1. The “unique color way per triangle”, which means you attach an id to every triangle, and render out the id’s to a seperate render target. It can be 32 bit’s (8 for rgb, 8 for a), but you could add a second one for even more ideas. It’ll be fiddly to get the id’s per triangle, but it’s relatively easy to implement. Can be quite detrimental to performance though (fillrate).

    2. Proper ray tracing. You almost certainly want to have an acceleration structure (octree, kd,…), but you probably already have one for frustum culling. One ray really isn’t a lot, this method should be very fast.

    3. Hybrid. probably the easiest to implement. Render out the vertex buffer id (“unique color per buffer:), and when you know which vertex buffer was selected”, just trace a ray against all the triangles.

    In the general case, I would say 2) is the best option. If you want to have something work quickly, go for 3). 1) is probably pretty useless.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While rendering the view page, based on some condition in the controller action I
I think we've all heard about different IE rendering modes, mostly based on their
Most web frameworks are still using the traditional action based MVC model. A controller
Is there a JavaScript library that models 3D polyhedra using the canvas tag or
Say I have a SlimDX based game editor. I have a DeviceContext instance which
Okay so I am using MVCContrib TestHelper to unit test my controllers, which works
I am rendering out a ViewUserControl (.ascx file) in a view: <% Html.RenderPartial(Comments, Model.Comments);
I am rendering a rails partial and I want to alternate the background color
I'm having major rendering issues in Safari with the web application I'm working on.
If I'm rendering a regular view in asp.net mvc the only domain object properties

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.