Seams there's a problem?

BlitzMax Forums/MiniB3D Module/Seams there's a problem?

Pete Carter(Posted 2012) [#1]
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


ima747(Posted 2012) [#2]
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...


Pete Carter(Posted 2012) [#3]
yes its 1024 x 1024 its a cube made with cinema4d and a 1024 x 1024 texture on each face

Last edited 2012


Yasha(Posted 2012) [#4]
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.


Kryzon(Posted 2012) [#5]
You should also add a FULLBRIGHT FX flag to your skybox to avoid any light from shading it and 'breaking the fourth wall'.


Pete Carter(Posted 2012) [#6]
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.


AdamRedwoods(Posted 2012) [#7]
make sure uvclamp is on.
modelmesh.GetSurface(1).brush.tex[0].flags :| 16|32



Kryzon(Posted 2012) [#8]
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


Pete Carter(Posted 2012) [#9]
Awesome will try when i get home


Pete Carter(Posted 2012) [#10]
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.


Kryzon(Posted 2012) [#11]
That's a good idea. Then flip the cube with FlipMesh().


AdamRedwoods(Posted 2012) [#12]
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.


GfK(Posted 2012) [#13]
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.


Hezkore(Posted 2012) [#14]
The bird demo has a skycube, have you tried the code from that?


Pete Carter(Posted 2012) [#15]
No i will have a look and also try a bigger cube, although cinema 4d outputs way to big anyway