f

#### bump map from normal map ?

```Is it possible to go backwards, and (re)create a (correct) height map from
a normal map? Is there any code already out there that does this?

Thanks.
```
 0
New
4/30/2006 12:26:29 AM
comp.graphics.api.opengl 7074 articles. 1 followers.

4 Replies
1361 Views

Similar Articles

[PageSpeed] 29

```New Guy wrote:
> Is it possible to go backwards, and (re)create a (correct) height map from
> a normal map?

It sounds nice but  in practice I suspect it would
be very inaccurate.

> Is there any code already out there that does this?
>

Try comp.graphics.algorithms

--
<\___/>
/ O O \
\_____/  FTB.    For email, remove my socks.

In science it often happens that scientists say, 'You know
that's a really good argument; my position is mistaken,'
and then they actually change their minds and you never
hear that old view from them again.  They really do it.
It doesn't happen as often as it should, because scientists
are human and change is sometimes painful.  But it happens
every day.  I cannot recall the last time something like
that happened in politics or religion.

- Carl Sagan, 1987 CSICOP keynote address

```
 0
fungus
4/30/2006 8:37:01 AM
```New Guy wrote:

> Is it possible to go backwards, and (re)create a (correct)
> height map from a normal map?

Theoretically: Yes.
A normal map represents the partial derivates of the height/bump
map. To get the height map back you have to integrate the total
differential. The total differential is the sum of all partial
derivates.

Now the problem: Usual normal maps have 8 bits precision per
channel/vector component. This is too low for numerical
integration. Allthough there is the HiLo format avaliable
(explicitly designed for normal maps BTW) almost nobody uses
them.

One thing you could do is to remap each normal map pixel into
[0.0; 1.0]^3 vectors and normalize each of them. Then use those
as input to a integration algorithm.

> Is there any code already out there that does this?

None that I'm aware of, mainly because for normal maps there are
usually the corresponding height maps avalaible, too. Some
algorithms (e.g. for horizon clipped or steep parallax mapping)
need both normal and height map to work.

Wolfgang Draxinger
--

```
 0
Wolfgang
4/30/2006 12:58:58 PM
```"New Guy" <new@newguy.com> wrote in message
news:Xns97B4B16FDD0C5newnewguycom@207.115.17.102...
> Is it possible to go backwards, and (re)create a (correct) height map from
> a normal map? Is there any code already out there that does this?

Some posters have already hinted at the difficulties of
reconstructing the height map.  The relevant issues in
constructing the normal map from a height field are:
1. The normal vectors are formulated treating x and y
as real-valued variables ("continuous" variables).
2. The expressions involve partial derivatives of the
height function.  Finite differences are used to
approximate the derivatives from the height values.
Now you have "discrete" variables (the two-dimensional
indices into the height map image) to deal with.
partial derivatives at the boundaries of the domain
of the height function.
example, a normal-map construction might allow scaling
of the height field or of the domain variables themselves.
The problem is that you generally are not given the specific
information in items 2, 3, or 4 for a particular normal map
image.

That said, you can still create algorithms that, hopefully, will
get you close enough to the original.

Using real-valued variables, the height field is z = H(x,y).  The
graph is a surface defined implicitly by 0 = F(x,y,z) = z - H(x,y).
The gradient of F is normal to the surface,
where dH/dx and dH/dy are the first-order partial derivatives
of H.  Unit-length normals are
N = (-dH/dx, -dH/dy, 1)/L = (N0,N1,N2)
where L^2 = 1 + (dH/dx)^2 + (dH/dy)^2.  The reconstruction
problem is:  Given normal vectors N, construct the height field H.
It is simple to show that
dH/dx = -N0/N2,  dH/dY = -N1/N2

As Wolfgang pointed out, this is an integration problem--given
the first-order partial derivatives of H, compute H.  This topic
is encountered in an undergraduate class in differential equations.
If you have dH/dx = A and dH/dy = B for any two continuously
differentiable functions A and B, it is not always possible that
such an H exists.  For it to exist, you need an "exactness"
condition:  dA/dy = dB/dx.  All this says is that if you differentiate
dH/dx with respect to y, you need to get the same thing as
differentiating dH/dy with respect to x.  Knowing that N was
created from the graph of a function H, the exactness condition
is necessarily true.

So far so good, but a "red herring".  The normal map was created
by approximating derivatives with finite differences, taking you
from the continuous-variable setting to a discrete-variable setting.
You do not have continuous representations for A = -N0/N2 or
B = -N1/N2, so there is no "integration" so to speak here.
What you really have is a problem in solving a linear system
of equations where the coefficient matrix is large and sparse.

This brings us to item 2 in my list.  The choices people make for
the finite-difference approximations are not always the same.  If
you look at NVidia's Cg Tutorial book, the authors use one-sided
differences.  The equalities I have here are so supposed to indicate
approximations.  Also, for notation's sake, I will use H_x(x,y) as
dH/dx at (x,y) and H_y(x,y) = dH/dy at (x,y).
H_x(x,y) = (H(x+dx,y) - H(x,y))/dx
H_y(x,y) = (H(x,y) - H(x,y+dy))/dy
where dx > 0 and dy > 0 are small numbers.  Since the only height
information available is from the height-map image, you think of
(x,y) as a pixel location and H(x,y) as the image value at that
location.  Moreover, it is simplest to choose dx = 1 and dy = 1
so that you use neighboring pixels.
H_x(x,y) = H(x+1,y) - H(x,y)
H_y(x,y) = H(x,y+1) - H(x,y)
where 0 <= x <= xmax-2 and 0 <= y <= ymax-2.  The image has xmax
columns and ymax rows.  You have to decide what to do at
x = xmax-1, y = ymax-1.  One choice is to use
H_x(xmax-1,y) = H_x(xmax-2,y)
H_y(x,ymax-1) = H_y(x,ymax-2)
Another choice is to allow wrap around, the idea being that an
adjacent height field must match the current one at the boundary.
H_x(xmax-1,y) = H(0,y) - H(xmax-1,y)
H_y(x,ymax-1) = H(x,0) - H(x,ymax-1)

I use centered differences for the approximations
H_x(x,y) = (H(x+1,y) - H(x-1,y))/2
H_y(x,y) = (H(x,y+1) - H(x,y-1))/2

Now for some reconstruction.  First, notice that you have
one degree of freedom--translation in the height direction.
If H(x,y) is a height field with normal vectors N(x,y), then
the height field H(x,y)+c for any constant c also has the
same set of normal vectors.  To eliminate this degree of
freedom, you will have to make an assumption.  My choice is
to choose H(0,0) = 0 in the reconstruction.

To illustrate the process, consider a 4-by-4 normal map, so
xmax = 4 and ymax = 4.  Use one-sided differences, with wrap
around at the image boundaries.  You can reconstruct a row
at a time.  In row y=0, you have
H(0,0) = 0  // the assumption
H(1,0) - H(0,0) = A(0,0)  // A(x,y) = -N0(x,y)/N2(x,y)
H(2,0) - H(1,0) = A(1,0)
H(3,0) - H(2,0) = A(2,0)
H(0,0) - H(3,0) = A(3,0)  // wrap around
The first four equations have the solution
H(0,0) = 0
H(1,0) = A(0,0)
H(2,0) = A(1,0) + A(0,0)
H(3,0) = A(2,0) + A(1,0) + A(0,0)
The last equation is a "consistency" equation.  It says
A(3,0) + A(2,0) + A(1,0) + A(0,0) = 0
This is similar to the "exactness" condition.  If the normal
map really was constructed using one-sided differences with
wrap-around at the borders, the consistency condition should
be true (modulo numerical round-off errors).

Moving on to the row y=1,
H(1,1) - H(0,1) = A(0,1)
H(2,1) - H(1,1) = A(1,1)
H(3,1) - H(2,1) = A(2,1)
H(0,1) - H(3,1) = A(3,1)
This is slightly different from handling row y=0.  I had
assumed H(0,0) = 0, but there is no immediate information
here about H(0,1).  Actually, you do have such information.
The normal map gives you H_y(0,0) = -N1(0,0)/N2(0,0).  The
finite difference approximation is
H_y(0,0) = H(0,1) - H(0,0)
You can solve this for
H(0,1) = H(0,0) + H_y(0,0) = H_y(0,0)
Solve the remaining equations
H(1,1) = A(0,1) + H(0,1) = A(0,1) + H_y(0,0)
H(2,1) = A(1,1) + H(1,1) = A(1,1) + A(0,1) + H_y(0,0)
H(3,1) = A(2,1) + H(2,1) = A(2,1) + A(1,1) + A(0,1) + H_y(0,0)
The consistency equation is
A(3,1) + A(2,1) + A(1,1) + A(0,1) = 0

Repeat this process for the remaining rows.

In the reconstruction, you get a height field and you can
ignore the consistency equations.  However, if the normal
map was not constructed using the finite difference scheme
you choose for the reconstruction, you can get "information"
how far off you are from satisfying them.  In fact, you can
try reconstructing using a few finite difference schemes,
choosing the final result to be the one with a "smallest"
deviation from consistency.

If the centered difference approach is used, you have to be
careful about wrap around at the boundaries.  For example,
in the first row of the 4-by-4 image, the equations you get
are
H(1,0) - H(3,0) = A(0,0)  // wrap around
H(2,0) - H(0,0) = A(1,0)
H(3,0) - H(1,0) = A(2,0)
H(0,0) - H(2,0) = A(3,0)  // wrap around
This gives you two decoupled sets of equations.  Choosing
H(0,0) = 0 produces H(2,0) = A(1,0) with the consistency
condition A(1,0) + A(3,0) = 0.  To solve the other subset
of equations, you need to know a value for H(1,0).  Once
known, H(3,0) = H(1,0) + A(2,0) with consistency equation
A(0,0) + A(2,0) = 0.  You have to decide how to choose
H(1,0).  Probably the thing to do in the reconstruction is
to use one-sided differences at the boundary, but centered
differences elsewhere.

--
Dave Eberly
http://www.geometrictools.com

```
 0
Dave
4/30/2006 5:01:33 PM
```On Sunday, April 30, 2006 at 3:26:29 AM UTC+3, New Guy wrote:
> Is it possible to go backwards, and (re)create a (correct) height map from
> a normal map? Is there any code already out there that does this?
>
> Thanks.

I acknowledge that this thread is REALLY old, yet, for the sake of future googlers, here is a code that does correct reconstruction and *performs well under noise*:

#include <fftw3.h>
#include <complex>
#include <vector>

void reconstruct_height_map(const float *normal, float *dx, float *dy, int width, int height, float *result)
{
typedef std::complex<float> C;
fftwf_plan plan;

std::vector<float> nx(width*height), ny(width*height);
for(int y = 0, i = 0; y < height; ++y)
for(int x = 0; x < width; ++x, ++i, normal += 3)
nx[i] = normal[0]/normal[2], ny[i] = normal[1]/normal[2];

const int half_width = width/2 + 1;
std::vector<C> Nx(half_width*height), Ny(half_width*height);
std::vector<C> Dx(half_width*height), Dy(half_width*height);

plan = fftwf_plan_dft_r2c_2d(height, width, &nx[0], (fftwf_complex*)&Nx[0], FFTW_ESTIMATE);
fftwf_execute_dft_r2c(plan, &nx[0], (fftwf_complex*)&Nx[0]);
fftwf_execute_dft_r2c(plan, &ny[0], (fftwf_complex*)&Ny[0]);
fftwf_execute_dft_r2c(plan, &dx[0], (fftwf_complex*)&Dx[0]);
fftwf_execute_dft_r2c(plan, &dy[0], (fftwf_complex*)&Dy[0]);
fftwf_destroy_plan(plan);

std::vector<C> F(half_width*height);
for(int y = 0, i = 0; y < height; ++y)
for(int x = 0; x < half_width; ++x, ++i)
{
float denom = width * height * (norm(Dx[i]) + norm(Dy[i]));
F[i] = denom > 0 ? - (Dx[i] * Nx[i] + Dy[i] * Ny[i]) / denom : 0;
}

plan = fftwf_plan_dft_c2r_2d(height, width, (fftwf_complex*)&F[0], &result[0], FFTW_ESTIMATE);
fftwf_execute(plan);
fftwf_destroy_plan(plan);
}

void reconstruct_height_map1(const float *normal, int width, int height, float *result)
{
std::vector<float> dx(width*height), dy(width*height);
dx[0] = 1, dx[1] = -1;
dy[0] = 1, dy[width] = -1;
reconstruct_height_map(normal, &dx[0], &dy[0], width, height, result);
}

void reconstruct_height_map2(const float *normal, int width, int height, float *result)
{
std::vector<float> dx(width*height), dy(width*height);
dx[width-1] = 1, dx[1] = -1;
dy[width*(height-1)] = 1, dy[width] = -1;
reconstruct_height_map(normal, &dx[0], &dy[0], width, height, result);
}

Source (explains the math behind it): http://stannum.co.il/blog/1/reconstructing-a-height-map-from-a-normal-map
```
 0
Yakov
9/8/2015 8:58:56 PM

Similar Artilces:

maps maps maps????
Argh!!!! What happened to transparency maps, reflection maps blah blah blah????? (I'm talking about viz renderer / autocad2004 adt). If you can't use transparency maps, then HTF do you create mesh objects (like a grill, railing, mesh with holes)? or even trees? Or 2D people? Billboard and stuff like that? Use the Cutout map under Special Effects. --- stefkeB --- "Henry" <abshhkc@bath.ac.uk> wrote in message news:Xns942BB07D85A90abshhkcbathacuk@138.38.32.81... > Argh!!!! What happened to transparency maps, reflection maps blah blah > blah????? (I'm talking about viz renderer / autocad2004 adt). > > If you can't use transparency maps, then HTF do you create mesh objects > (like a grill, railing, mesh with holes)? or even trees? Or 2D people? > Billboard and stuff like that? > "stefkeB" <stefkeB@hotmail.com> wrote in news:1068214235.60416 @seven.kulnet.kuleuven.ac.be: > Use the Cutout map under Special Effects. > > --- stefkeB --- > > "Henry" <abshhkc@bath.ac.uk> wrote in message > news:Xns942BB07D85A90abshhkcbathacuk@138.38.32.81... >> Argh!!!! What happened to transparency maps, reflection maps blah blah >> blah????? (I'm talking about viz renderer / autocad2004 adt). >> >> If you can't use transparency maps, then HTF do you create mesh objects >> (like a grill, railing, mesh with holes)?...

How to render vertex map, normal map and color map
Hello everyone! I'm trying to achieve 3D reconstruction using MS Kinect sensor. I've already got the Vertex Map, Normal Map and Color Map from raw depth map and RGB image. Now I'm wondering how to render these maps(vertex map, normal map and color map) using opengl. Looking forward to your help! Thanks in advance. On Friday, 11 May 2012 05:20:18 UTC+2, Yuan Gao wrote: > Hello everyone! > I'm trying to achieve 3D reconstruction using MS Kinect sensor. > I've already got the Vertex Map, Normal Map and Color Map from raw > depth map and RGB image. > Now I'...

map that maps to iterators in the same map ?
Hi, I wonder if it's possible to implement something like typedef map<string, T::iterator> T; i.e. to have a map that will resolve keys to iterators in the map of the same type. In my situation, I'll have only one such map and can guarantee that all iterators will remain valid (I'll only add stuff). Do such recursive constructions known to cause problems? I can use pointers instead of iterators, but it will be much uglier. Thanks, Vladimir ...

map of map.
Hi All, I want to create a map of key and another map object (it is another map of key value pairs). I have declared it as map<int, map<short, short>> mpObj; it gives me an error that, "error: ISO C++ forbids declaration of =91map=92 with no type". Does this mean I can not create a map of a map the object? Have I done something wrong? Any pointers to any tutorial? Atul. aTuL ha scritto: > I want to create a map of key and another map object (it is another > map of key value pairs). I have declared it as > map<int, map<short, short>> mpObj; You ha...

STL: Map of maps possible, but no multi-map of maps? Workarounds?
It's possible to do this: map<double, map <string, int> > foo; but not this or any other nested variant using multimap: multimap<double, map <string, int> > foo; Any known (or unknown) workarounds? Thanks Marcus Marcus wrote: > It's possible to do this: > > map<double, map <string, int> > foo; > > but not this or any other nested variant using multimap: > > multimap<double, map <string, int> > foo; Works with comeau online 4.3.3, also with g++ 3.4.2 hmmm... you're right, i must have a bug somewhere. gl...

Returning map from map of maps without any copy
Group, I have a class that contains (STL) map of maps. This Class has a getMap function that return one map out of the map of maps. I need to avoid copies while extracting the map. There are two approaches 1. I pass a "map" reference in getMap function, the getMap method extract appropriate map and put it in the passed map reference. It seems copy will be made while doing map=Extracted Map; //map is reference parameter in getMap function 2. Second option is to return a reference from the getMap function (please ignore dangling pointer issue since this class is likely to live ...

How to implement a map of maps?
Hi! I am trying to implement a map of maps like this: typedef map<string, map<string, string> > stringMap; stringMap myMap; This does not work and I get the following compiler error: --- /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/ bits/stl_pair.h: In constructor `std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U1 = char*, _U2 = char*, _T1 = const std::string, _T2 = std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<const std::string, std::string> > >]': src/png.cpp...

Help, Map of map
Hello, I'm italian then sorry for my bad english: In this source #include <iostream> #include <map> #include <string> map <string, map <string, int> > PG; int main() { PG.insert (map <string, map<string, int> >::value_type ("pippo", map<string, int>::value_type ("pluto", 6))); // Error std::cout << PG["pippo"].first << std::endl; // Error return 0; } How can I insert a key and value in a internal map? How I get the key and value of internal map? Thanks "Noixe" <No...

map within map
Is there any problem in using of map as declared below? map<int, map<int, float>> test; Cleber [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] Cleber wrote: > Is there any problem in using of map as declared below? > > map<int, map<int, float>> test; Yes, the syntax is wrong as the '>>' is interpreted as shift operator - use '> >' instead. Further, you need the std:: of course and the header <map>. Uli [ See http://www.gotw.ca/...

map within map
Consider #include <algorithm> #include <iostream> #include <map> #include <string> #include <utility> namespace { typedef std::map< std::string, std::string > my_map_type; typedef std::map< std::string, my_map_type > my_double_map_type; void print_leaf( my_map_type::value_type const & v) { std::cout << " + " << v.first << " : " << v.second << std::endl; } void print_root( my_double_map_type::value_type const & v) { std::co...

[SOT] Map, map, who's got the right map?
This from the "GUI gone weird" department. http://news.bbc.co.uk/sport2/hi/olympics/7493757.stm is an interactive BBC map for the olympic venue which will show up later this or early next month. The behavior upon grabbing and moving the map with the mouse is particularly interesting, and not exactly correct. In Google Maps, the grab function is pretty much as one might expect; one grabs, moves the mouse cursor, and the map moves, keeping the point grabbed underneath the cursor, as far as it can. Very reasonable behavior. Not so in the above map; I'm not even sure I can char...

OpenGL graphic problem with height-map
Hi Newsgroup! I'm a beginner in using OpenGL and i've coded some sample height map to extend my skills. The data for each height came from srtm and the whole height map consist of triangles (GL_TRIANGLES) The map look's good (at the first moment) but there are some strange display issues. If you look at http://test.wittnet.at/andy/height_map.jpg you can see what i mean. Some triangles are missing at the peaks and if i move the map those missing triangles will move too. If i flatten the map, for testing purposes, those peaks will disappear. Can somebody please give me a hint how...

"This list is tracking news articles of governments and businesses converting to Linux. Everyone is free to add/edit on this list." http://www.listphile.com/Linux Enable JavaScript to view, add known governments that have switched (this list is still immature). ...

Map issue wth IDL8 new graphics: conformal or equal-area maps in rectangular shape
I started using IDL 8 new graphics and I am quite happy with the results. However, I got a map problem. With IDL 7 I used to do this kind of map (normally without the grid): http://imageshack.us/photo/my-images/24/zjxk.png/ using this command for the map map_set,50,18,limit=[25.5,-17,71.5,41],/LAMBERT I am not able to recreate a similar map with NG as the edges are cutted off where the grid ends in my example (what is kind of correct as these areas are not inside the map limit). However, is it possible to generate a rectangular map with conformal or equal-area projection in IDL NG? ...

map(x->map(y->map(f,y),x),A);
Is there an easier way to obtain the results of computations like the following? >A:={ { [1,2],[3,4] } , { [5,6],[7,8] } }: > map(x->map(y->map(f,y),x),A); { {[f(1), f(2)], [f(3), f(4)]}, {[f(5), f(6)], [f(7), f(8)]} } --I would appreciate any conceptually simpler ways of doing this. Too many nested maps makes me dizzy. --Edwin Edwin Clark <wclark1@tampabay.rr.com> writes: > Is there an easier way to obtain the results of computations like the > following? > > >>A:={ { [1,2],[3,4] } , { [5,6],[7,8] } }: >> map(x->...

How to work with PERM/TEMP failures on socket map (or LDAP map or HOST map)
Hello, I have a misunderstanding of the socket map protocol as written in op, which is the same as stated in this post: http://groups.google.com/group/comp.mail.sendmail/browse_thread/thread/f91016c9b8d92c61/a392fcbdbf57a50d?hl=en When a socket map returns PERM or TEMP, the code stuffs the fact into a stat pointer, the explanatory message is dropped. In the end I have the following entry in a sendmail -d session: map_lookup(reroute, key) => NOT FOUND (69) but the socket map returned PERM No such map Funnily I found similiar in the host map, too: map_lookup(host, myhost) => host_m...

bump map
Hello, I'm using gimp and I want to know if there is a better reference of what a bump map is relative to a 3D representation (and what the depth parameter stand for). I found a little of explanation in the Carey book ``Grokking the Gimp'', but I'm searching for more references. However, all on the web seems to describe a bump map from a tutorial point of view (How to make a bump map) or from an algorithmic point of view. Have you any link that regards this matter? Thanks, Gaetano ...

The maps are not loading in IE, but they do in Opera browser. I tried all the guggestiond from ther HELP and installed DirexcXnew, but nothisg helps. Who can help? Har "hvdh" <geen@nergens.nl> wrote in message news:47e2c638\$0\$25480\$9a622dc7@news.kpnplanet.nl... > The maps are not loading in IE, but they do in Opera browser. I tried > all the guggestiond from ther HELP and installed DirexcXnew, but nothisg > helps. > Who can help? So you have tried clearing web browser cache, enabled JavaScript, ActiveX and binary behaviors at least for Goog...

Mapping southern in Northern map
Dear all, I have a map which plots field of view of radars in the northern hemisphere and another map in the southern hemisphere for southern hemisphere radars. Now, I would like to plot the southern hemisphere fields of view radars in the northern hemisphere map with both southern and northern field of view. I have latitudes and longitude for all radars. Please can you suggest how to do such mappping ? Thank you in advance for your time Regards Zolile ...

Overlaying Maps with mapping toolbox
Hello, I am trying to overlay maps in the mapping toolbox, but I am running into some difficulty with transparency. I have a tiff image of the moon; very similar data to moonalb (see 'load moonalb'); and I plot that using geoshow, i.e.: figure;axesm mollweid framem; hm = geoshow(moonalb,moonalbrefvec); I then try to plot additional data with the geoshow command in surface mode.: h = geoshow(x,[1 -90 -90],'DisplayType','surface'); but the new surface is on top of the previous map. I can change the zdata height, and different portions of the map appear through the su...

Bump Mapping ++
Hello, Bump Mapping in OpenGL with Multitexturing and dot3 ARB extentions ( no shaders ). References : http://www.paulsprojects.net/tutorials/simplebump/simplebump.html http://www.paulsprojects.net/opengl/bumpmap/bumpmap.html http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=22 Now my questions: 1. Bump mapping recquires a light. Front faces will appear "bump" and back faces will be totally dark ( no lights on them ). Does someone know if It's possible to see back faces not black but just a little bit darker, using the same multitexturing/dot3 process ? 2. Based o...

Bump mapping
Hey I'm looking for information about how to make texture maps like in 3DSMax. Materials in 3DS files are described as follow : #define MATERIAL_TEXTURE1 0xa200 #define MATERIAL_TEXTURE1_MASK 0xa33e #define MATERIAL_TEXTURE2 0xa33a #define MATERIAL_TEXTURE2_MASK 0xa340 #define MATERIAL_TEXTURE_OPACITY 0xa210 #define MATERIAL_TEXTURE_OPACITY_MASK 0xa342 #define MATERIAL_TEXTURE_BUMP 0xa230 #define MATERIAL_TEXTURE_BUMP_MASK 0xa344 #define MATERIAL_TEXTURE_SPECULAR 0xa204 #define MATERIAL_TEXTURE_SPECULAR_MASK 0xa348 #define MAT...

mapping dots to a map image
I have three files. One is a data file which contains three columns, a datum, a X axis (latitude), and a Y axis (longitude). It essentially represents the number of individuals meeting particular criteria that reside in specific locations. The second is a GIF with a dot plot created using GD::Graph, using the data in the first file. The third is a B & W GIF which is a map of the United States. I would like to overlay the dot plot with the map to give a graphical representation of the number of people on a particular location. My problem seems to be one of projection -- I can mani...

suprised by destructive map (not map!)
Occasionally I run into bits of ruby that are surprising to me (although might not be to matz). Here is one of them. Should I file this as a bug (I thought .map is supposed to be non-destructive), or just keep in mind which classes are passed by value and which are passed by reference. Basically: map (and naturally also map!) is destructive when your array includes elements which are normally not passed by value but by reference. ruby 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux] boris:falcon:~:irb "unexpected (for me)" irb(main):001:0> array = [[1],[2]] => [[1], [2]] irb...

Web resources about - bump map from normal map ? - comp.graphics.api.opengl

Normal lens - Wikipedia, the free encyclopedia
this angle of view is about 53° diagonally. For cinematography, where the image is normally viewed at a greater distance, a lens with a focal ...

WA sheikh says Perth man deported no jihadi, 'just a normal Australian'
&quot;Just a normal, young Australian&quot;, is how deported Fahim Awang&nbsp;is described by a respected elder in WA's Muslim community after ...

Yes, Hillary Clinton has probably lied at some point. That makes her normal.
Chris Cillizza at the Washington Post just wet his pants over this exchange between Hillary Clinton and CBS News’s Scott Pelley: Hillary Clinton ...

Is D-Wave’s quantum processor really 10⁸ times faster than a normal computer?
One of D-Wave's chips, circa 2011. (credit: D-Wave) We have been following D-Wave's claims about its quantum hardware at Ars for a number of ...

I Interrupt Your Normal Shitty Day and Bigfoot DougJ
To bring you this picture of Lovey in a Valentine’s day tutu serving as a pillow for Koda: That’s just flat out adorable.

"If losing a normal game of monopoly is frustrating, losing to this strategy is excruciating..."
"... as a losing opponent essentially has no path to victory, even with lucky rolls. Your goal is to play conservatively, lock up more resources, ...

Victoria Beckham confesses ‘I just can’t do heels any more’: normal?
Singer and fashion maven Victoria Beckham (who will always be Posh Spice to me) recently debuted her fall and winter fashion line during New ...

The market's abnormally normal day
Stocks are doing something rare on Thursday: Nothing.

Why drought could be the new normal for the US Southwest
... storms that bring water to the Southwest are coming less frequently, prompting concerns that California's drought regime will be the new normal ...

Resources last updated: 2/26/2016 7:15:33 AM