Exporting issues

Archives Forums/Blitz3D Bug Reports/Exporting issues

RifRaf(Posted 2006) [#1]
Perhaps this is a bug, im not sure. but..

When i try to export a B3D mesh with one brush, and two texture channels I cannot have two seperate texture scales for those textures. They both export into the model, but the larger texture scale of the two gets applied to both textures.

Basically what im doing is trying to export my mesh with a detailmap in place. like a lightmap of coarse in that it uses the second texture channel, but it needs to have a much smaller scale. wich is where my issue is. the scale is not getting recognized, and the detailmap is getting the same scale as the colormap when loaded back into bliz via LoadMesh

anyone fought this before?


Pinete(Posted 2006) [#2]
Hi RifRaf,

I have do this but I've not experienced any problem at all.
I use B3Dpipeline to export, last version, and till this moment I haven't had any problems...
Maybe could be good if you take a look at the materials and make sure all are ok..
I'll go back to take a look at my models and check if I did something special...

sorry because I'm not very helpful

regards,


RifRaf(Posted 2006) [#3]
well any info you can add may help. this is driving me nuts
heres the texture and brush setup bit im using
 utex$=c_tn
 b3dwriteString( utex$) 	;texture file
 b3dWriteInt( 1+16+32 )		;flags
 b3dWriteInt( 2)                ;blend 2
 b3dWriteFloat( 0 )				
 b3dWriteFloat( 0 )			
 b3dWriteFloat(1.0/ layertexscale(i));x scale 1
 b3dWriteFloat(1.0/ layertexscale(i));y scale 1
 b3dWriteFloat( 0 ) ;rotation 0

 b3dWriteString( "detailmap.jpg") 	;texture file
 b3dWriteInt( 1+65536)    	        ;flags(second chan)
 b3dWriteInt( 2)   		         ;blend 2
 b3dWriteFloat( 0 )					 
 b3dWriteFloat( 0 )				
 b3dWriteFloat(.05)	;scale x. not being recognized
 b3dWriteFloat(.05)	;scale y  not being recognized
 b3dWriteFloat( 0 )	;rotation 0
 Next 
 b3dEndChunk()	;end of tex

 b3dBeginChunk( "BRUS" )
 b3dWriteInt( 2 )	;textures per brush
 For i=1 To  numlayers
   b3dWriteString( "brush_"+i )		;name
   b3dWriteFloat( 0 )			;red
   b3dWriteFloat( 0 )			;green
   b3dWriteFloat( 0 )			;blue
   b3dWriteFloat( 1 )			;alpha
   b3dWriteFloat( 0 )			;shininess
   b3dWriteInt( 1 )			;blend
   b3dWriteInt( 2)			;FX
   b3dWriteInt( 0 )	  ;used texture index1 
   b3dWriteInt( 1 ) 	  ;used texture index2 
 Next
 b3dEndChunk()	;end of BRUS chunk


and heres the vertex portion

b3dBeginChunk( "VRTS" )
b3dWriteInt( 3 )	;flags - 0=nonormal/color
b3dWriteInt( 2 )	;2 tex_coord sets
b3dWriteInt( 2 )	;2 coords per set
surf=GetSurface( omesh,1 )
n_verts=CountVertices( surf )-1
		
For j=0 To n_verts
      b3dWriteFloat( VertexX( surf,j ) )
      b3dWriteFloat( VertexY( surf,j ))
      b3dWriteFloat( VertexZ( surf,j ) )
					
      b3dWriteFloat( VertexNX( surf,j ) )
      b3dWriteFloat( VertexNY( surf,j ))
      b3dWriteFloat( VertexNZ( surf,j ) )
					
      b3dWriteFloat( VertexRed(surf,j)/255)
      b3dWriteFloat( VertexGreen(surf,j)/255)
      b3dWriteFloat( VertexBlue(surf,j)/255)
      b3dWriteFloat( VertexAlpha(surf,j))
				
      b3dWriteFloat( VertexU#( surf,j,0 ) )
      b3dWriteFloat( VertexV#( surf,j,0 ) )
      b3dWriteFloat( VertexU#( surf,j,1 ) ) ; lightmap uv
      b3dWriteFloat( VertexV#( surf,j,1 ) ) ; lightmap uv
   Next
   b3dEndChunk()	;end of VRTS chunk



jfk EO-11110(Posted 2006) [#4]
did you check if it's using the scaling of the first texture, or if it's using 1.0 nomatterwhat? (try to alter scaling of texture 1 to eg. 10.0 and see if it affects the second texture)


RifRaf(Posted 2006) [#5]
Ok well thats weird. scaling 10.0 to 20.0 is about right on the second texture, its like the blitz mesh loader for the b3d format is reading the second texture channel scale from -0% to 100%+ instead of raw scale values

but it works now.. odd indeed


jfk EO-11110(Posted 2006) [#6]
good to know o_O


BlitzSupport(Posted 2006) [#7]
Moved and bumped!