Author Topic: how do I UV map stuff properly  (Read 731 times)

I know how to do it, but I don't know how to do it so everything looks the same as on default bricks.
How do I UV map stuff properly?

You could try importing the default bricks (in 'SPECIAL' format) from Siba's Blender BLB/BLS plugin topic and look at how they do it

I recommend that you use Blender 2.68 with the importer though because it works best there, 2.7 imports BLBs with proper UV layouts, but the vertexes are all swapped around which distorts how the textures appears on the bricks and may also turn some faces inside-out

I use a calculator that was made by Zeblote to do the side UV-mapping. If you do it correctly it should be the exact same as a default brick.

You could try importing the default bricks (in 'SPECIAL' format) from Siba's Blender BLB/BLS plugin topic
It utterly wrecked the UV mapping. That's why I'm having to remap a lot of stuff.

Thanks for the calculator though, RallyBlock
« Last Edit: May 10, 2017, 04:14:56 PM by Super Suit 12 »

It utterly wrecked the UV mapping. That's why I'm having to remap a lot of stuff.
I recommend that you use Blender 2.68 with the importer though because it works best there

I recommend that you use Blender 2.68 with the importer though because it works best there

Don't do that! Fix the problem instead.
Open import_blb.py, find this:


def AddUV(NewFace, UV1, UV2, UV3, UV4, Layer, Tex):
    UV1 = ( float(UV1[0]) , (float(UV1[1])*-1)+1 )
    UV2 = ( float(UV2[0]) , (float(UV2[1])*-1)+1 )
    UV3 = ( float(UV3[0]) , (float(UV3[1])*-1)+1 )
    UV4 = ( float(UV4[0]) , (float(UV4[1])*-1)+1 )

    NewFace.loops[3][Layer].uv = ( UV1[0] , UV1[1] )
    NewFace.loops[0][Layer].uv = ( UV2[0] , UV2[1] )
    NewFace.loops[1][Layer].uv = ( UV3[0] , UV3[1] )
    NewFace.loops[2][Layer].uv = ( UV4[0] , UV4[1] )

    return NewFace


Notice the broken indices at the bottom? Change it to


    NewFace.loops[0][Layer].uv = ( UV1[0] , UV1[1] )
    NewFace.loops[1][Layer].uv = ( UV2[0] , UV2[1] )
    NewFace.loops[2][Layer].uv = ( UV3[0] , UV3[1] )
    NewFace.loops[3][Layer].uv = ( UV4[0] , UV4[1] )
« Last Edit: May 10, 2017, 06:44:56 PM by Zeblote »

My BLB exporter will automatically calculate correct brick UVs (provided that the brick textures are used, read the README) for rectangular cuboid bricks: https://forum.blockland.us/index.php?topic=304533.0
There's a preference in the export settings to save the UVs into Blender UV layers.

Thanks Zeblote, and thanks but no Demain, I'm not making rectangular cuboid bricks.
I've got everything about figured out, I think, aside from tgat I don't know if I need to set any special texture settings in Blender for the textures. Do I?

Thanks Zeblote, and thanks but no Demain, I'm not making rectangular cuboid bricks.
I've got everything about figured out, I think, aside from tgat I don't know if I need to set any special texture settings in Blender for the textures. Do I?
If you're exporting to BLB, no. Only the UV coordinates matter.

If you're exporting to BLB, no. Only the UV coordinates matter.
cool beans