Jump to content

Search the Community

Showing results for tags 'uv coordinates'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 2 results

  1. I have a big problem with screen tearing. Please have a look at the video. I am sorry I can't provide a playground for this (yeah I could maybe), because I am using a port of babylonjs together with the haxe language/compiler. I read much information about the problem in OpenGL forums too, but I did not get a solution. So maybe some 3D WebGL / OpenGL ES Guru knows, how to fix the problem. As you can see in the video, the mesh with the bricks and ladders is flickering and tearing like hell. The mesh is merged together from single meshes (planes) and a sprite atlas is used, so that I can take one material/texture for the whole level-mesh (the foreground). To get the well known sprite art or retro effect, I use Texture.NEAREST_SAMPLINGMODE texture.anisotropicFilteringLevel = 1 texture.wrapU = texture.wrapV = Texture.CLAMP_ADDRESSMODE I tried to adjust the uvs (read about pixels and texels), but I don't get it right. I think that the UVs are not correct and when the camera moves, the drawn texture tile is snapping between two pixels all the time, and that causes the bad tearing effect. But I don't know. Since I am using Babylonjs/Babylonhx, I am asking here for the first place. It's strange too, that it looks like the lines are jumping up and down. And maybe the uvs are right, but the screen tearing is a evil, that comes with the NEAREST_SAMPLINGMODE or the disabled anisotropicFiltering? Btw. I disabled mipmaps too. Hm. It would be easier to just scale the Textures up hm and use another sampling mode? Because now I get it, that not using mipmaps is a bad idea, because I have a little 3D stuff in there, like the sides and the floor. Yeah I know, there is another topic to this topic. But I didn't find the answer there. Yeah, that's great. I think I have the right solution now. Upscaled textures. But to be honest and just to learn how to do it right, is there another way how I can do this? Merging planes with different uvs together and using a very small texture (one tile = 32px) without having artefacts?
  2. Hey folks! I've been screwing around with this damn mountain side covering mesh all day. The last few (4+) hours were about getting it a bump mapped texture. I'm having problems with making up UV coordinates I assume. I'm going around each side, and I'm pushing two vertices for each original vertex on the edge of the mountain, one for the top, and one for a bottom to cover the side, like so: xLeft.push(x, y, z, x, -70, z);Then I join them to a single array of positions like so, and try to make 2*UV coordinates for each pair of vertices (pair as in a top and a bottom one, like inserted before): var wrappingPoints = xRight.concat(zTop, xLeft, zBottom);var wrappingUvs = [];var increment = 1 / wrappingPoints.length / 3 * 2;for (var i = 0; i < wrappingPoints.length / 3; i += 2) { wrappingUvs.push( increment * i, wrappingPoints[3 * i + 1] / yMax, // x , y increment * i,0 // x , y );}I've been mixing up the orders of the Us and Vs, and trying to do all sorts of experiments, but for the sake of it, I cannot find what's wrong with this. The thing that's visible on the image is that every second triangle of the mesh (1 tri / quad) has it's texture upside down. So the coordinates I wanted to add for each pair of vertex were - (increment * i, wrappingPoints[3 * i + 1] / yMax) for the top and (increment * i,0) for the bottom one. What am I doing wrong here?
×
×
  • Create New...