isidisi Posted July 3, 2010 Share Posted July 3, 2010 When mapping a sphere I obtain an artifact on the last slide of the sphere as you can see on the attached image. In the last slice all texture is mapped inverted... I understand this is because last slice texture coordinate gone from a coordinate near 1, to 0 (and not to 1) I know that when programming in DirectX this is solved with device.RenderState.Wrap0 = WrapCoordinates.Zero; Is there any parameter I can set in Leadwerks material to solve this? Thanks Quote Link to comment Share on other sites More sharing options...
macklebee Posted July 3, 2010 Share Posted July 3, 2010 try removing the texture clamp... see the wiki concerning clamp Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
isidisi Posted July 3, 2010 Author Share Posted July 3, 2010 But as doumentation says: Clamping means that, if a lookup on the texture is done outside the 0 - 1... In the sphere all the coordinate textures are in range 0-1... clamp is not useful here... I have tried to add clamp0=1,1 to my material without luck... Quote Link to comment Share on other sites More sharing options...
macklebee Posted July 3, 2010 Share Posted July 3, 2010 I cannot say without being able to try it myself with the model/texture/mat files. But honestly it just looks like poor UV mapping. Can you post a picture of what your UV map looks like? Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
isidisi Posted July 3, 2010 Author Share Posted July 3, 2010 I cannot say without being able to try it myself with the model/texture/mat files. But honestly it just looks like poor UV mapping. Can you post a picture of what your UV map looks like? It's a standard sphere with standard mapping exported to .gmf from 3dStudioMax... and the material: texture0="abstract::054.dds" shader="abstract::mesh.vert","abstract::mesh_diffuse.frag" shadowshader="abstract::mesh_shadow.vert" The problem is I cannot set texture coordinate 0 (0º) and 1 (360º) to the same vertex!! Quote Link to comment Share on other sites More sharing options...
macklebee Posted July 3, 2010 Share Posted July 3, 2010 it looks like bad UV mapping. Do you know what the UV map for your sphere even looks like? I just created a sphere with UU3D, and it worked just fine... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
isidisi Posted July 3, 2010 Author Share Posted July 3, 2010 it looks like bad UV mapping. Do you know what the UV map for your sphere even looks like? I just created a sphere with UU3D, and it worked just fine... But have you rendered with Leadwerks and see it around its 360º? My sphere looks nice in 3d studio max, too Quote Link to comment Share on other sites More sharing options...
macklebee Posted July 4, 2010 Share Posted July 4, 2010 But have you rendered with Leadwerks and see it around its 360º? My sphere looks nice in 3d studio max, too The picture I showed you is uu3d on the top which shows the UV map, and the bottom is the sphere in the leadwerks editor. And yes, it looks fine all the way around it. Why can you not show your UV map? What you are showing in your picture looks like stretched UVs on those particular faces. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
isidisi Posted July 5, 2010 Author Share Posted July 5, 2010 The picture I showed you is uu3d on the top which shows the UV map, and the bottom is the sphere in the leadwerks editor. And yes, it looks fine all the way around it. Why can you not show your UV map? What you are showing in your picture looks like stretched UVs on those particular faces. Ok I attached an image of the UV map, is the default map that 3dStudio max sets to a default sphere. I see my UV map extends all UV coordinate range, and yours no... Quote Link to comment Share on other sites More sharing options...
ArBuZ Posted July 6, 2010 Share Posted July 6, 2010 How do you export from 3ds max? I tried to export simple spher via my exporter and via fbx and all works fine. All mapping is correct(it looks like yours) and in the engine it shows correctly. Maybe the texture is the problem? Quote Q6600@2.4GHz - 9600GT - 4GB DDR2@800MHz - Windows7 x64 3ds max / photoshop CS3 / C++ http://www.arbuznikov.com Link to comment Share on other sites More sharing options...
isidisi Posted July 6, 2010 Author Share Posted July 6, 2010 How do you export from 3ds max? I tried to export simple spher via my exporter and via fbx and all works fine. All mapping is correct(it looks like yours) and in the engine it shows correctly. Maybe the texture is the problem? I tried with your plugin and other texture and all works fine thanks a lot Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.