Hot answers tagged

13

I have been able to do this using the 3d modeling software Blender. I used UV mapping to map the texture and the displacement modifier to apply the height map. If you need some form of XNA code for this, I cannot supply it. Here it is as a 3d terrain. Surprisingly, it worked best on a uniformly square mesh. The steps required to create the terrain like i ...


6

A basic height map can be produced as follows: Generate a set of vertices that form a grid made of triangles in a regular pattern like A -- B -- C -- ... | \ | / | \ | \ | / | \ D -- E -- F -- ... | / | \ | / | / | \ | / ... ... ... Each of A, B, C, et cetera represents a vertex in the grid. It also represents a point on the height; ...


2

I you look carefully your cube in Cinema4D, the top most corner show different texture coordinate for the side and the top ( probably the same between front and right side, but the texture can't let me state it for sure ). And in your final cube indices, you only have a range [0..7]. On the GPU, a vertex is a full tuple of values with a single index. It ...


2

This isn't really a THREE.js problem (although THREE.js may limit your options for a solution); it happens with any terrain implementation of that type. From the screenshot, it looks like you're using a regularly-tessellated grid of geometry where each vertex is mapped to a height map point. Such a grid generally generates triangles in a pattern, for ...


2

You can render a quad onto the framebuffer with a shader that will just set the color value to 1000.0. Since you don't even need to set a texture really let alone compute lighting, this should not really take any noteworthy time to accomplish. It's pretty easy to do but here is a tutorial that talks about rendering to a texture. Though really you don't ...


1

There's also DXGI_FORMAT_B8G8R8X8_* formats - explicitly no alpha, but still you must expand 24-bit image into 32-bit texture when loading data. In Direct3D11 24-bit and 16-bit formats are gone for good.


1

For no apparent reason, you are filling your loaded image with a solid white color using SDL_FillRect. Also, you seem to clear the renderer without rerendering the texture. You need to SDL_RenderCopy the texture again after clearing the renderer.


1

It's hard to know what's going on without images or code so not sure if this addresses your particular issue or not, but 'Linear' in this context means that OpenGL applies a bilinear filter to the texture when it is sampled. A bilinear filter is an average of the pixels from the original image around the sample position so you may get slightly blurry ...



Only top voted, non community-wiki answers of a minimum length are eligible