Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
StickGuy
Dec 9, 2000

We are on an expedicion. Find the moon is our mission.

Entheogen posted:

What I would like to do is generate a lot of huge display lists that in no way would fit at once in my GPU memory, but I only need to render one of them at a time.
What are these huge display lists going to be used for?

Adbot
ADBOT LOVES YOU

StickGuy
Dec 9, 2000

We are on an expedicion. Find the moon is our mission.
I'm still puzzled by your thousands of triangles approach. In any case, I don't know if you'd really gain a lot of speed by caching the display lists in main memory over recompiling them as necessary.

EDIT: vvv I'll put together a simple demo.

StickGuy fucked around with this message at 09:56 on Jul 24, 2008

StickGuy
Dec 9, 2000

We are on an expedicion. Find the moon is our mission.

Entheogen posted:

I will try raycasting next, but that looks a lot harder than what I am doing now. What would you suggest other than raycasting that I could also give a try?
I've put together a demo program illustrating the slice-based technique I was telling you about in the other threads. It's not the best approach and there's a number of ways to improve it, but it doesn't require drawing thousands and thousands of triangles. You'll need GLUT, GLEW and your favorite C++ compiler to get it to work.

StickGuy
Dec 9, 2000

We are on an expedicion. Find the moon is our mission.

Entheogen posted:

So it doesn't draw view oriented quads. They remain constant in their position, but the 3d texture coordinates is what changes based on view?

How exactly does 3d texturing work. If I define 3d texture for a flat polygon, then that polygon sort of slices through that 3d texture and gets a 2d slice of it and maps it on polygon? Is that kind of how this works?

You do some matrix and vector calculations in client side. Do you think there is an easy way to make that happen in vertex shader? that is compute 3d tex coordinates there? Could I just compute eye vector and use that to generate tex coords?

Also is it possible to talk to you on AIM or ICQ?
The idea is that the quads are always perpendicular to the eye vector (essentially a billboard). The quads slice through the volume so each pixel on a quad gets a tri-linearly interpolated texture value. The tricky thing about this approach is that you must compute a matrix that maps points on the quads into points in the volume space. Once you have this matrix, you can compute the actual texture coordinates in a shader. I put my AIM name in my profile so we can discuss it more there.

StickGuy
Dec 9, 2000

We are on an expedicion. Find the moon is our mission.
The slicing technique is definitely fill-rate limited. There are some optimizations you can do such as clipping the quads to the data volume, but it's still limited by the number of slices through the data volume itself that you draw. You can experiment with the number of slices that you need to get a reasonable appearance. A reasonable rule of thumb is to have at least one slice pass through each voxel. You can also probably combine it with your previous technique to do some sort of subdivision to produce more partial slices in parts of the volume where things are visible and few or no slices where nothing is visible.

As far as your lines, they look a bit strange, but it's hard to tell what should and shouldn't be there. Can you post a screen shot of the linear shader where the lines are absent for comparison? Also, what are the dimensions of the volume you're visualizing? Are you using a floating point texture?

StickGuy
Dec 9, 2000

We are on an expedicion. Find the moon is our mission.

shodanjr_gr posted:

Does anyone have any suggestions on where I can go from here?
What exactly are you trying to do? It sounds like you're attempting to use some GL functions that aren't supported by your hardware, which is causing it to default to software rendering.

StickGuy
Dec 9, 2000

We are on an expedicion. Find the moon is our mission.

shodanjr_gr posted:

Im writting some OpenGL 1.1 (or it could be 1.2) code, and I doesnt seem to be running in hardware mode (it is extremely fill-rate limited). I dont think I am using any unsupported calls...
Just because a function is in OpenGL 1.1 or 1.2 doesn't mean it won't drop to software mode. For example, glPixelTransfer almost always forces the software path if you set anything but the default options.

You're also being incredibly vague about your application. What is it and what does it do? What do you mean by fill rate limited (i.e. what and how many things are you drawing that need to be filled)? Are you using any shaders? If so, what are you doing with them? What other things are you using? Lights? Textures? Blending? etc, etc

StickGuy
Dec 9, 2000

We are on an expedicion. Find the moon is our mission.

shodanjr_gr posted:

I render at 512 * 512 resolution, a scene comprising of 2 spheres and a quad, 3 times (i'm doing shadowmapping), and this thing draws at LESS than 1 frame per second and hammers the CPU like there is no tomorrow.
I still suspect you're using some call that is forcing the software path. Have you tried commenting out as much as possible to find out what exactly is causing the performance problems? Assuming you have the correct drivers installed, hardware support should "just work" if you're using basic OpenGL stuff and linking with opengl32.lib.

Adbot
ADBOT LOVES YOU

StickGuy
Dec 9, 2000

We are on an expedicion. Find the moon is our mission.

slovach posted:

RGB(255, 0, 0) seems to give 0x000000FF. Ok... but 0x000000FF appears to be blue. :confused:
At least with .NET, bitmaps are ARGB.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply