Seams there's a problem?
BlitzMax Forums/MiniB3D Module/Seams there's a problem?
| ||
http://2.bp.blogspot.com/-nxS2g32NVV4/T-Lr2r2qFzI/AAAAAAAAAD4/7s9Vhlo8kkc/s320/seams im getting problems with the seams on my skybox any ideas? Last edited 2012 |
| ||
Is your texture pow2? if not the system has to scale it to feed it to OpenGL and sometimes that can lead to some bleeding at the edge... |
| ||
yes its 1024 x 1024 its a cube made with cinema4d and a 1024 x 1024 texture on each face Last edited 2012 |
| ||
Have you clamped the UVs? If you don't, the texture will wrap, and that means the opposite edges will try to smooth into each other. If not, you should be able to do this by passing flags 16 and 32 to LoadTexture. |
| ||
You should also add a FULLBRIGHT FX flag to your skybox to avoid any light from shading it and 'breaking the fourth wall'. |
| ||
its full bright and i tried clamping the uvs in unwrap3d as im loading it as a model so no textures are manually loaded. still has seams. |
| ||
make sure uvclamp is on.modelmesh.GetSurface(1).brush.tex[0].flags :| 16|32 |
| ||
Yeah, the UV clamp Yasha was talking about has to be the one through MiniB3D\Blitz3D, not the modelling software. You can use Adam's code line to change the flags without having to manually load the texture (benefit of MiniB3D, you can access the textures of a mesh even when they're generated by the model loader). Last edited 2012 |
| ||
Awesome will try when i get home |
| ||
no there still there. the line above is working because if i put a different texture flag at the end it does change. The seams are still visable. Maybe I should try making a cube with code. |
| ||
That's a good idea. Then flip the cube with FlipMesh(). |
| ||
Maybe I should try making a cube with code. yes, there is the possibility of floating point error, which may create seams at large distances. |
| ||
I found when using Blitz3D (creating a skycube manually in code), that if I created it really small (2x2x2) around the camera, seams were visible. Creating the cube then scaling it up, scaled up the seams too, so didn't solve the problem. The only way around it was to create the skycube at a more sensible size. If memory serves I went for 30x30x30, which was fine. |
| ||
The bird demo has a skycube, have you tried the code from that? |
| ||
No i will have a look and also try a bigger cube, although cinema 4d outputs way to big anyway |