Hot answers tagged

2

Your code isn't wrong at all. You are dealing with matrices and vertices the right way (your 3D simulation actually works), and even texture mapping is fine. Matter is, your texture mapping algorithm uses just a linear interpolation to map a point in the 3D space to a point in the 2D plan of a given texture. Texture mapping When mapping texture to mesh ...


2

What user1118321 says is true -- all the textures need to be the same size. But that doesn't mean you need to USE all the space. For a small set of standalone textures, it's not a big deal to waste some space. You can simply store the U/V coordinates of where a smaller texture ends and use that. When creating the array, just set a max size and make ...


2

At least i have found the solution. It includes 2 step : 1- My surface texture wraping was wrong. X axis must be repeated and Y axis must be clamped to edges. The correct one is: surfaceTexture.setWrap(Texture.TextureWrap.Repeat, Texture.TextureWrap.ClampToEdge); 2- When we use "ClampToEdge" wrapping, texture's Y coordinates must be between 0 and 1. So i ...


1

There are lots way of optimization including LOD - hig and low poly object display according to camera Culling - show only camera frustam obects mesh combine - combine meshes World streamer (dividing scene into sub-scene then load/unload according to camera position) Maybe what you are talking about is the fourth option divide your scene into multiple ...


1

To change polygons orientation you need to change indices order, so that faces are facing in different direction. From clockwise to counter-clickwise (or vice versa, it depends on your graphics engine setup). Change every triangle indices order from being 1-2-3 to 1-3-2.


1

As noted in the comments above, performance is going to depend on implementation, your particular hardware, and what you're trying to do with the textures, so the only reliable answer there is to profile each alternative. There are a few differences in terms of how you use each option though, which will apply consistently: One big difference is that, for ...


1

Okay it took some researching but apparently my software I was using don't do all the heavy lifting. You copy & paste the roughness into the alpha channel of the specular/metalness texture which will do the trick (the RGB channels must be off though). I discovered the reason for this is. White = Solid Black = Transparent This technique must be used ...


1

Try using a different shader on your material. Unlit/Transparent should do the trick, though without any lighting.


1

I'm not sure what you mean by "so I only make one glBindTexture call throughout a scene." What advantage does that get you? 2D texture arrays require the textures to be the same size. I don't know of any way around that. One other option you have is to use a texture atlas. You can make a single texture that contains all of your assets and simply pass the ...



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