Jump to content

Sphere mapping


isidisi
 Share

Recommended Posts

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

post-340-077329400 1278169634_thumb.png

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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!!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

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

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...

post-340-061207200 1278341996_thumb.png

Link to comment
Share on other sites

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?

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

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...