• Advertisement

Archived

This topic is now archived and is closed to further replies.

Bump mapping question

This topic is 5750 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, If my video card supports these following extensions.. GL_EXT_abgr GL_EXT_blend_color GL_EXT_blend_logic_op GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_convolution GL_EXT_copy_texture GL_EXT_histogram GL_EXT_packed_pixels GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture GL_EXT_texture3D GL_EXT_texture_object GL_EXT_vertex_array GL_SGI_color_matrix GL_SGI_color_table GL_SGI_texture_color_table GL_SGIS_texture_edge_clamp GL_SGIX_interlace GL_SGIX_texture_scale_bias what will be the best bump mapping effort i can achieved?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Emboss, and... That''s pretty much it.

Share this post


Link to post
Share on other sites
You can achieve any effect with any card.
The problem is not what can be done, the problem is how fast it can be done.

If you''re looking real-time bump mapping, you have the wrong card.
You''ll need from 2 textures passes (for a simple emboss bump mapping) up to 27 passes (for a pretty robust bump mapping) and maybe more...

I suggest emboss bumpmapping if you''re looking for realtime bumpmapping. There''s an OpenGL tutorial at NeHe Productions.

If you''re not looking for realtime, you may check more comples algorithms.

Share this post


Link to post
Share on other sites
What card do you have?
Do you have the latest drivers?
Seems strange that there are no ARB extensions there.

Share this post


Link to post
Share on other sites
Hi,

can anyone refer me to a tutorial on per pixel bump mapping algo that is supported on my card? I think performance is not a issue in my case... I can''t seem to find any without the use of special hardware ext.

bakery2k1: I am not sure abt the gfx card.. I am using a SGI O2 workstation..

Share this post


Link to post
Share on other sites
I''ve tried to find some doc about what graphics card you''ve got on that beautiful workstation but I couldn''t find anything. I guess that you''ve got at least support for all ARB, EXT, SGI and SGIX extensions. Otherwise it wouldn''t make sense, specially since SGI is in OpenGL from the beginning. If you want other algos than the one described by Nehe in his tut, just make a research on bump mapping in google. I''ve found a cool paper on this the other day but I didn''t kept it. However it was one of the first ones if I remember correctly.

Let us see the result of your work on bump mapping plz.

Share this post


Link to post
Share on other sites
Well, when I used glGetString to retrieve the extensions, the above list is all that is returned to me.... dun think i have ARB... btw.. my OGL is ver 1.2... anyone with more suggestions??

[edited by - Lipofuse on May 30, 2002 6:15:43 AM]

Share this post


Link to post
Share on other sites
SGI''s O2 workstations do not support ARB extensions because the ARB (Architecture Review Board) is too recent.
O2 Workstations existed before 1998 when ARB started to approve extensions. Before that date, most "approved" extensions where named "EXT".
But you veterans already know that

Despite the lack of extra-features (like multitexturing), they''re very good machines.

Anyway, all per-pixel bumpmapping that I''ve heard of uses the DOT3 feature, which does not seems to be supported by O2 workstations.

You could take a look at htpp://developer.nvidia.com but I doubt there will be realtime bumpmapping for cards that do not support DOT3 (unless you use emboss bumpmapping).

Share this post


Link to post
Share on other sites
The O2 doesn''t have any perpixel capabilities, it wasn''t designed for that. Just all ''smaller'' SGI workstations (up to Octane) have very basic 3D when it comes to effects, but very high triangle throughput rates. They were designed as CAD/CAM workstations, and throughput is all what counts there - fancy effects are not needed.

You can have very advanced perpixel effects on an SGI running the IR3 pipeline, eg. an Onyx. But on an O2, you''re stuck with emboss I guess. But you could try some more complex multipass bumpmapping, AFAIK the O2 has enough fillrate, so you can experiment with multiple passes.

Share this post


Link to post
Share on other sites
My card supports these extensions:

1) GL_ARB_imaging
2) GL_ARB_multitexture
3) GL_ARB_texture_compression
4) GL_ARB_texture_cube_map
5) GL_ARB_texture_env_add
6) GL_ARB_texture_env_combine
7) GL_ARB_texture_env_dot3
8) GL_ARB_transpose_matrix
9) GL_S3_s3tc
10) GL_EXT_abgr
11) GL_EXT_bgra
12) GL_EXT_blend_color
13) GL_EXT_blend_minmax
14) GL_EXT_blend_subtract
15) GL_EXT_clip_volume_hint
16) GL_EXT_compiled_vertex_array
17) GL_EXT_draw_range_elements
18) GL_EXT_fog_coord
19) GL_EXT_packed_pixels
20) GL_EXT_paletted_texture
21) GL_EXT_point_parameters
22) GL_EXT_rescale_normal
23) GL_EXT_secondary_color
24) GL_EXT_separate_specular_color
25) GL_EXT_shared_texture_palette
26) GL_EXT_stencil_wrap
27) GL_EXT_texture_compression_s3tc
28) GL_EXT_texture_edge_clamp
29) GL_EXT_texture_env_add
30) GL_EXT_texture_env_combine
31) GL_EXT_texture_env_dot3
32) GL_EXT_texture_cube_map
33) GL_EXT_texture_filter_anisotropic
34) GL_EXT_texture_lod
35) GL_EXT_texture_lod_bias
36) GL_EXT_texture_object
37) GL_EXT_vertex_array
38) GL_EXT_vertex_weighting
39) GL_IBM_texture_mirrored_repeat
40) GL_KTX_buffer_region
41) GL_NV_blend_square
42) GL_NV_evaluators
43) GL_NV_fence
44) GL_NV_fog_distance
45) GL_NV_light_max_exponent
46) GL_NV_packed_depth_stencil
47) GL_NV_register_combiners
48) GL_NV_texgen_emboss
49) GL_NV_texgen_reflection
50) GL_NV_texture_env_combine4
51) GL_NV_texture_rectangle
52) GL_NV_vertex_array_range
53) GL_NV_vertex_array_range2
54) GL_NV_vertex_program
55) GL_SGIS_generate_mipmap
56) GL_SGIS_multitexture
57) GL_SGIS_texture_lod
58) GL_WIN_swap_hint
59) WGL_EXT_swap_control

What's the BEST (meaning best for quality/speed ratio) that I can use? (I was thinking dot3) ... and would you guys happen to have any info on how to implement said type of bumpmapping?

[edited by - Cobra on May 30, 2002 11:06:56 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by Cobra
My card supports these extensions:

...
7) GL_ARB_texture_env_dot3
47) GL_NV_register_combiners

What''s the BEST (meaning best for quality/speed ratio) that I can use? (I was thinking dot3) ... and would you guys happen to have any info on how to implement said type of bumpmapping?

[edited by - Cobra on May 30, 2002 11:06:56 AM]


The best to use would be register combiners. Once I get home (I am at college for another 2 weeks) and am able to use a system with 3d acceleration, I will post a simple demo on bump mapping.

I have it working here with mesa, but it is so s...l...o...w.
Were talking 0.1fps, although oon my geforce3 it hits more like 100.

Share this post


Link to post
Share on other sites
as this is an nvidia-gpu, go to developer.nvidia.com they explain you how to do all the fancy stuff your gpu can do.

for the o2 workstation. well.. bether do displacementmaps (subdivide geometrie and displace vertices with help of a texturelookup).

or.. embross for sure.

i''ll think about other approaches.. do you have blendfuncs like GL_FUNC_SUBTRACT_EXT ? yes you have. then you can put the equation of dot3 in several passes into say the alphabuffer of your screen..

as it is to_light = (a,b,c) and normal = (x,y,z), you have to calculate ax+by+bz. NOW this is with abcxyz between -1 and 1. as you know, your values are between 0 and 1. so you have to split them into the parts bigger 0 and the ones smaller 0.

so you get to_light_positive = (max(a,0),max(b,0),max(c,0)), normal_positive = (max(x,0),max(y,0),max(z,0)) wich gets stored into the positive textures

then you get to_light_negative = (max(-a,0),max(-b,0),max(-c,0)) and normal_negative = (max(-x,0),max(-y,0),max(-z,0))

now to get your light you have to do this:

light = light_positive - light_negative
normal = normal_positive - normal_negative

and you now have to dot this..

(light_positive - light_negative).(normal_positive - normal_negative)

this you have to do with some multipassing... quite a lot of passes (i guess 12) but oh well

you always have to mad, means multiply and add this result (or subtract, depending..) lp.x*np.x - lp.x*nn.x + ln.x*nn.x - ln.x*np.x i think that is for one component => 12 for the whole

there is some explanation of this technique on opengl.org

have fun

oh, if you have some dot3 ext you can do it in one pass (btw, the to_light gets stored in glColor, so it should be approximately a directional light for the surface..)

possibly you could use some convolution as well to do the job.. but i don''t know that much about convolution..

"take a look around" - limp bizkit
www.google.com

Share this post


Link to post
Share on other sites
@ lipofuse:

You may want to look at this:

http://www.r3.nu/~cass/thesis/

It basically shows how to do dot3 without the extension.
About 26 passes though...

Share this post


Link to post
Share on other sites
Cobra:

The best looking and fastest algorithm is DOT3 bumpmapping, which can be achieved using following extensions :
GL_ARB_texture_env_combine (or EXT)
GL_ARB_texture_env_dot3 (or EXT)
which are extensions up to OpenGL1.2, and are implemented in OpenGL 1.3 core.

Also you can read Mark Kilgard''s excellent article A Practical and Robust Bump-mapping Technique which covers a bump mapping which is more advanced but roughly uses the same technique. It uses cub mapping and register combiners. Since your card seems to support both features, then the article could be useful.

Share this post


Link to post
Share on other sites

  • Advertisement