Jump to content

wings 3d created sculpty why the surface texture is not exactly positioned?


You are about to reply to a thread that has been inactive for 3387 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello

I created a sculpty with Wings 3d.

Than i created a surface-texure for it.

But if i put the surface-testure on the sculpty in sl, it is not positioned exactly...

i must use numbers with many digits after the decimal point for size and position to make it tit exactly on the shape

Why this happens?

Link to comment
Share on other sites

i made the surface texture with gimp:

 

A sculpty has got 32x32 vertices.

At a sphere-based sculpty there are 32 faces horizontally around it and 31 faces from top point to bottom point.

So i made a texture 256 pix whide and 248 pix tall and used a grid to show 32x31 squares a 8x8 pix.

i know, where in the texture all parts of the design must be, if the squares of the grid fit with the faces of the sculpty.

here the surface-texture:

Katzen-Luftballon-Textur 1 .png

Katzen-Luftballon-Textur 2.png

and here a picture of the objekt with wrong placed texture

Katzen-Luftballon Textur verrutscht.png

and here after i moved the texture into the right position.

Katzen-Luftballon Textur geradegerueckt.png

But now there are numbers wit many digits after the decimal point in the building menu...

Link to comment
Share on other sites

First dealing with sculpties with square maps of 64x64 pixels...

UV maps...

These all have the same UV map, which is 32x32 equal squares. That does not depend on the stitching type. So your template texture for 8x8 pixel squares should be 256x256.

Geometry...

The plane stiching topology (ie unstitched) uses 33 pixels in each direction. For a 64x64 unstitched sculpt map, the XYZ positions of these vertices are defined by the RGB from pixels 0, 2, 4, 6, ...., 58, 60, 62, 63.  For a cylinder stiching, pixel 63 is effectively substituted by pixel 0 in the X direction, which produces the stiching into cylindrical topology. In the torus stitching, this happens in both X and Y directions. Thus pixel 63 is ignored for these topologies. In the sphere, the X direction is the same as the cylinder. In the Y direction, the top (x,63) and bottom (x,0) rows are sampled only at the middle (32,63 and 32,0) to get the vertices of the poles. This connects all 32 vertical edges at the poles.

In all these cases, the stitching is ignored in the UV map, so that there are always the 33 vertices (32 faces) in each direction in the UV map.

For (oblong and small) sculpt maps with different dimensions, the same principles apply. So if the map is 2a x 2b pixels (a and b being always powers of two) then there will be a x b squares in the UV map and (a+1) x (b+1) vertices, with the stitched ones being redundant. 

 

Link to comment
Share on other sites

but where is the squares-row, that is not shown on the objekt?

All 32 are shown on the object. It is possible the sculpt map you have has the last set of vertices (y-pixel 63) collapsed, so they are on top of the last-but-one (y-pixel 62). In that case, the last face next to the pole is xero area, so you don't see it. This is not uncommon when the person or software making the sculpt map doesn't know there is a 33rd vertex in pixel 63.

it´s still not placed exactly

Difficult to say why without having the sculptmap and texture to examine in detail.

Meanwhile, here is a test texture you can use, which will show you exactly how the texture fits on your sculpty. It's 512x512 to allow the numbers to be clear. It has 32x32 equal squares. They will fit exactly to the faces of any sculpty with a 64x64 map. Below that is this texture applied to the default sculpt map in SL, with no offset or scaling, with the wireframe superimposed*. You can see the precise fit. Finally, a picture of a sphere in blender showing why you have 33 vertices to get 32 rows of faces.

scgrid.png

scuv.png

scvrts.png

* in case you wonder how: screen captures, one normal; one in wireframe view (Develop->Render->Wireframe), with sky, water and surface patch rendering off (Advanced->Render Types), texture color black; with suitable superimposition and colour adjustments in Gimp.

PS: What were your exact adjustments that gave your corrected texturing? That might give a clue.

Link to comment
Share on other sites

OK. I had a look at the Wimgs3D sculpty exporter. At least the one I could find is very old-fashioned. It actually produces a 128x128 bitmap, but that's really a 32x32 bitmap with each pixel expanded to 4x4 identical pixels. That was the sort of thing you had to do before lossless upload of small images was added to SL. The extra pixels compensated for loss of accuracy when all uploads used lossy compression. Since the lossless compression was added, this is no longer necessary.

Still, the underlying bitmap is still 32x32, which, of course cannot have the necessary 33 different vertical positions needed for a 32x32 face sphere. With the 128x128 sculpt map, the code that turns the map into geometry just samples pixels twice as far apart as it would with the standard 64x64 map. So instead of [0,2,4,...,60,62,63] it uses pixels [0,4,8,....,120,124,126]. In the Wings3d map though, pixels 124 and 126 are the same, because they come from the same pixel of the underlying 32x32 map, which is the pole of the sphere. This means that the last-but-one row of vertices is indeed collapsed onto the pole as I described.

What this means is that the top, 32nd, ring of faces disappears from view on the rebdered sculpty. However, the UV map used by the sculpty code still thinks it is there. So the UV map still has to have 32x32 faces. The top row of these will be hidden because of the collapsed vertices.

Did you try applying the texture I provided? If you do, you should see that it fits the faces of your sculpty perfectly, with offsets 0 and scaling=1, but that the top row (might be bottom row, depending on the details) is missing on the sculpty because it it hidden. If you draw your texture on the bottom 31x32 part to fit your 31x32 faces, but leave the top row in the texture, it should fit as you expect.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3387 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...