Example Flow of Making Models and Brushes

Started by wallworm, August 11, 2015, 11:37:56 AM

Previous topic - Next topic

wallworm

Open MAXScript > MAXScript Editor and paste this code. Then hit  Tools > Evaluate All:

macros.run "wallworm.com" "WallWormInitialize"
delete objects
mat = Standard name:"CheckerMat1" showInViewport:true diffuseMap:(Checker name:"testing/checkerdffiuse")
tp1 = Teapot name:"TP1" radius:12 mapCoords:on pos:[100,100,0]
tp2 = Teapot name:"TP2" radius:64 mapCoords:on pos:[-200,-200,0]
tp1.mat = tp2.mat = mat
objcol = objects as Array
clearSelection()
wwmts = #()
proxies = #()
select objcol


macros.run "wallworm.com" "WallWormModelToolsWWMaterialsTEXCAMCR"   --this is the Wall Worm > Wall Worm Materials > Give Obj Mats + Tex Materials


/*
This block is like the Anvil > Models > WWMT Model Functions Quick WWMT
*/
for obj in objcol do (
local tempWWMT = ww_LOD_wrapper()
tempWWMT.init()
tempWWMT.setTargetModel obj tempWWMT
tempWWMT.createHull maxVerts:44    --this is the Quick Hull function
tempWWMT.concave = true
tempWWMT.uselocalOrigin = true   --so the pivot doesn't have to be at world origin
tempWWMT.internalOrigin = true    --better be using WW SMD exporter!
tempWWMT.rotateRefSystem = true --not needed but clean
tempWWMT.materialPath = "testing"
tempWWMT.modelPath = "testing"
prox = tempWWMT.createProxy()
append wwmts tempWWMT.target
)

select wwmts
macros.run "wallworm.com" "WallWormModelToolsQuickCompileVTFMCR" --this is Wall Worm > Wall Worm Exporters > Export Selected Model Textures
macros.run "wallworm.com" "WallWormModelToolsQuickCompileMCR" --this is Wall Worm > Wall Worm Exporters > Export WWMT to Source Models

Brushes = #(
Box lengthsegs:1 widthsegs:1 heightsegs:1 length:600 width:830 height:-10 mapcoords:on pos:[-105,-30,0] isSelected:on,
Box lengthsegs:1 widthsegs:1 heightsegs:1 length:600 width:20 height:170 mapcoords:on pos:[-530,-30,0] isSelected:on,
Box lengthsegs:1 widthsegs:1 heightsegs:1 length:40 width:830 height:170 mapcoords:on pos:[-105,290,0] isSelected:on,
Box lengthsegs:1 widthsegs:1 heightsegs:1 length:30 width:830 height:170 mapcoords:on pos:[-105,-345,0] isSelected:on,
Box lengthsegs:1 widthsegs:1 heightsegs:1 length:600 width:20 height:170 mapcoords:on pos:[320,-30,0] isSelected:on,
Box lengthsegs:1 widthsegs:1 heightsegs:1 length:600 width:830 height:60 mapcoords:on pos:[-105,-30,170] isSelected:on)
brushes.mat = Standard name:"tools/toolsskybox" diffuseColor:blue

brushes[1].mat = Standard name:"dev/dev_measuregeneric01" diffuseColor:orange

select brushes
macros.run "wallworm.com" "WallWormDesignateSelectionAsBrushes" -- Wall Worm > Wall Worm Level Design > Set Selection as Brush Geometry
macros.run "wallworm.com" "WallWormExportVMFMCR" -- this is Wall Worm > Wall Worm Exporters > Export Scene as VMF

SMF spam blocked by CleanTalk