LDView ldr to pov export error


RE: ldr to pov export error
#13
Travis Cobbs Wrote:FYI, I put quite a bit of effort into trying to get TEXMAP support in POV exports, and what I had at the end (which didn't work) was so bad that I just abandoned the effort entirely instead of trying to get things working. It's possible I'll try again in the future, but don't hold your breath.

Don't worry,there's no criticism toward you, I'm gratefull you coded LDView and keep it up to date (and for the time you spent to help me)

I've browse some websites and pov-ray's help and found a way to managed it.

here's what I did with 3622p06.dat, if it may help you (it's not a clean code) :
I created a texture{} with the png file as you do with lgcolors :
Code:
#ifndef (LDXColortex) // TEXMAP texture
#declare LDXColortex = #if (version >= 3.1) material { #end

    texture {

        pigment {
            image_map {png "D:\LEGO\LDRAW\Unofficial\Parts\textures\3622p06.png"
            map_type 0
            once}
         // following parameters could be set according to TEXMAP START PLANAR I guess    
         scale <-60,-24,0>
         rotate <0, 90, 0>
         translate <0, 24, -30>
                 
                }

    }
    
#if (version >= 3.1) } #end //I didn' modify this, I didn't need it
#declare LDXColortex_slope = #if (version >= 3.1) material { #end
    texture {
        lg_blue
        #if (LDXQual > 1) normal { bumps 0.3 scale 25*0.02 } #end
    }
#if (version >= 3.1) } #end
#end

then I doubled the projection surface and applied the texture on it  (before the floor definition):
Code:
box {
   
    <-30,0,10>,<30,23.9,10>// I set 23.9 instead of 24 because the texture seem to overlap the part about 1-2 pixels at the bottom during rendering
    rotate <0, 90, 0>// I must have set my box directly on the right plane
    #if (version >= 3.1) material #else texture #end { LDXColortex }
}
here's the result :

[Image: 3622p06.png]

I made something alike with 685p05.dat :
Code:
#ifndef (LDXColortex) // TEXMAP
#declare LDXColortex = #if (version >= 3.1) material { #end

    texture {

        pigment {
            image_map {png "D:\LEGO\LDRAW\Parts\textures\685p05.png"
            map_type 0
            once}
             
         scale <-20,-30,0>
         rotate <0, 90, 0>
        translate <0, -20, -20>
 
    }


    }
    
#if (version >= 3.1) } #end
#declare LDXColortex_slope = #if (version >= 3.1) material { #end
    texture {
        lg_black
    }
#if (version >= 3.1) } #end
#end

and the second part (the texture is half the pattern, used 2 times):


Code:
#declare texmap = 
object {
        LDX_48_slash_2_dash_8sphe_dot_dat_sub_part
        matrix <0,-24,0,0,0,-24,24,0,0,0,-32,0>
        #if (version >= 3.1) material #else texture #end { LDXColortex }
        }
        
        
object {
texmap //original
}
object {
texmap
matrix <1,0,0,0,1,0,0,0,-1,0,0,0>//symetrical
}
here's the result (I'm less satisfied with this one)
[Image: 685p05.png]

Roland Melkert Wrote:LDCad has texture support in its pov-ray export. But the overall quality of the povray generated meshes is only a LDraw geometry (after smoothing) dump.

You might be able to transplant the textured parts by doing some creative pov script editing
I didn't know that, it may have saved me some times, thanks. I guess I'll have to update my LDCad install.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
ldr to pov export error - by Bertrand Lequy - 2021-03-17, 14:59
RE: ldr to pov export error - by Travis Cobbs - 2021-03-17, 19:51
RE: ldr to pov export error - by Travis Cobbs - 2021-03-29, 21:25
RE: ldr to pov export error - by Bertrand Lequy - 2021-03-30, 6:36
RE: ldr to pov export error - by Travis Cobbs - 2021-04-05, 21:30
RE: ldr to pov export error - by Travis Cobbs - 2021-04-06, 20:23
RE: ldr to pov export error - by Travis Cobbs - 2021-04-06, 20:28
RE: ldr to pov export error - by Chris Dee - 2021-04-06, 20:41
RE: ldr to pov export error - by Travis Cobbs - 2021-04-06, 20:55

Forum Jump:


Users browsing this thread: 5 Guest(s)