# sk8beast

Members

32

1532 Excellent

• Rank
Member
1. ## Gdiplus: DrawImage not working?

Try PixelFormat32bppPARGB, premultiplied ARGB format.
2. ## I made an ollie!

As a long time skateboarder (15 years), I approve this ollie! :D

4. ## Generating a sine-based tiled procedural bump map

You are not limited to [0..2PI] range to pass to the sine function. It is a cyclic function, so whatever you pass to it, your output from it will be in the [-1...1] range, always.
5. ## Generating a sine-based tiled procedural bump map

Generate the random points on the whole image range (0..WIDTH, 0..HEIGHT), because the first term under the square root is a simple distance calculation (current x,y coord to the Nth random point). That's why the "true" random points not work here => poor distribution of points (and rand generates new point position for every pixel, and every N step, this caused the noisy image).
6. ## Generating a sine-based tiled procedural bump map

The output of the sine function is in the range [-1..1], so taking N times the sine (summing up) gives the result range [-N...N]. (In your example N is 100, so if the sine function returns 100 times -1, it adds up -100). After finishing the summation you divide the result by N, so you get the result [-1...1], but the color range is [0...1], that's why you need to rescale the value before write it as pixel. And if you look at the sine function: from 0 to PI the sine is positive, after PI it goes to negative (and came up positive again after 2PI). It is not all positive in the 0..2PI range, as you said.
7. ## Generating a sine-based tiled procedural bump map

Krypt0n is right, these numbers should not be random, but some kind of distributed points on the image. For example, simple grid points. (take every Xth pixel on each axis) For the third "random", try a small fix value first (like 0.0005), then tweak it. And if i'am right (it is morning ), you should rescale your result after you divide by N. (sinf range is [-1...1], so the result can add up to [-100 ... 100], depending on the input parameter).

9. ## Per-pixel displacement mapping GLSL

I am not sure, but dont you have to normalize normalObject and tangentObject (vertex normal and tangent after the matrix multiplication)?

11. ## drawing in Win32

CreateDIBSection with BitBlt/StretchDIBits/SetDIBitsToDevice is the fastest method as i know. Here: [url="http://sol.gfxile.net/wintut/ch3.html"]http://sol.gfxile.net/wintut/ch3.html[/url] you can find a great tutorial for it.

13. ## OpenGL based games

For the list of OpenGL games, there is a wiki article about it: [url="http://en.wikipedia.org/wiki/List_of_OpenGL_programs"]List of OpenGL Games[/url]
14. ## State of the Art in rendering massively detailed geometry?

[quote name='CirdanValen' timestamp='1310670957' post='4835392'] I recall seeing a video where someone was able to do what you describe by basically culling out the interior of the building when the player is too far away to notice, and as they get closer it will make the windows transparent and allow the user to see within the building. I doubt I will be able to find it tho [/quote] "Interior mapping"?
15. ## 2D texture missing a triangle

[quote name='PlasticineGuy' timestamp='1308050782' post='4823166'] Thanks, it worked. I figured something like this would happen because I've never tried my hand at texture mapping before. Simple error thankfully. Does the direction of the circle matter? [/quote] It does when backface culling is enabled (glEnable(GL_CULL_FACE), but by default it is disabled).