Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / completemap rtt problem
  RSS 2.0 ATOM  

completemap rtt problem
Rate this thread
 
36649
 
Permlink of this thread  
avatar
  • Location: Warsaw, Poland
  • Total Posts: 13
  • Joined: 28 February 2009 05:19 PM

Hello.
I have wrote my own script for baking textures. I have a problem, because when i use RTT dialog the texture looks good. But when I use my script the texture haven’t got the same edges. I Attach photos where I zoom the problem. What should i add to my script to have the same effects.
I search all maxscript help file but nothing find. I hope there is a solution. Thanks for help.
here is my code

fn renderLightmap obj fileName factor virtualFrameBufferState save_path=
(
 DeleteAutoFlatten obj 
-- clear unwrapers
 unwrap obj 
-- automatic flatern uvs
 
 addname
=obj.name
 factor 
factor as string
 fPath
=save_path as string
 
--diferent name for all renders
 
-- char  _  is a separator beetwen render name common with object and name common with factor 
 
--exBOX01_3 Object name BOX01render number 3  
 fName
=addname +"_"factor
 fType
=getFilenameType fileName
 
--type of bake
 currentMapType 
CompleteMap()
 
--size of texture AUTO
 
--currentMapType.autoSzOn true
 
--lines belowwhen size of texture defined by user
 
 currentMapType
.outputSzX 512
 currentMapType
.outputSzY 512
 currentMapType
.filename=fName
 currentMapType
.fileType=fType
 

 bi 
obj.INodeBakeProperties
 
 bi
.bakeEnabled  true 
 bi
.bakeChannel  1
 currentMapType
.shadowsOn false
 
 

 bi
.addBakeElement currentMapType
 undisplay(render rendertype
:#bakeSelected  renderelements:true outputwidth:512 outputheight:512  vfb:false  outputfile:(fPath+"\\"+fName+fType) progressbar: true )
 
 
bi.removeAllBakeElements()
 bi
.bakeEnabled false
 format 
"rendering node:% channel:%\n DYLATACJA:%\n" obj.name bi.bakeChannel xx
)

It looks like the texture from RTT have additional line of pixels, which is a copy of the last one line.



Max 2008 32bit.
Black computer with some cables :P
Mouse, keyboard additional
Beer - for new ideas in work :P

Attachment Attachment
Attachment Attachment
Replies: 0