Hi there .
Quote: "have you got an example where a 2D profile is drawn, say, a hexagon (or any 2D shape really), and then via the technique you speak of, that 2D profile is extruded out? Is it then possible to even texture such resulting shapes?"
This can be made in a lot of ways . Here's part of one code I made to make my dungeon. Paint the contour with left mouse and press controlkey when ready .
`grid texture
ink rgb(55,155,55),0
box 0,0,20,20
ink rgb(0,0,0),0
box 1,1,19,19
get image 100,0,0,20,20,1
`wall texture
ink rgb(100,90,0),0:box 0,0,40,80:ink rgb(70,40,0),0:box 0,39,40,41
box 0,0,2,40:box 19,40,21,80:box 0,0,40,2
get image 1,0,0,40,80,1
`YOU HAD BETTER ADDING YOUR OWN TEXTURE :)
`===================================================================
autocam off
sync on
hide mouse
rem grid
make object box 2000,100,0,100
position object 2000,50,0,50
texture object 2000,100:scale object texture 2000,20,20
ghost object on 2000
rem mouse
make object sphere 1000,3:color object 1000,rgb(255,0,0)
position camera 50,120,50
point camera 50,0,50
`starting mouse position
punto=1
px=150
py=50
position mouse px,py
do
`snap to grid
if mousex()>px then inc px,5
if mousex()<px then dec px,5
if mousey()>py then inc py,5
if mousey()<py then dec py,5
`lines from point to point
ink rgb(255,0,0),0
for i= 2 to 100
if object exist(i)
line object screen x(i),object screen y(i),object screen x(i-1),object screen y(i-1)
endif
next i
if mouseclick()=1 then gosub punto
position object 1000,px-100,0,100-py
ink rgb(255,255,0),0
set cursor 0,5
print "Mouse 1 Create point mouse 2 Delete point"
print "Controlkey create Spacekey save "
`deleting last point
if punto>1
if mouseclick()=2 then delete object punto-1:punto=punto-1:sleep 300
endif
if controlkey() then goto pared :sleep 200
sync
loop
punto:
xx=object position x(1000)
zz=object position z(1000)
`matrix limits
if xx>-10 and xx<110 and zz>-10 and zz<110
make object box punto,2,2,2
position object punto,px-100,0,100-py
color object punto,rgb(0,255,0)
punto=punto+1
sleep 300
endif
return
pared:
`last object that will have all the limbs
make object box 500,0,0,0
for i= 2 to 100
if object exist(i)
hide object i
dx#=object position x(i)-object position x(i-1)
dz#=object position z(i)-object position z(i-1)
v#=sqrt((dx#*dx#)+(dz#*dz#))
make object plain i+100,v#,10 rem we create a plain object distance v#,10
offset limb i+100,0,-v#/2,0,0 rem adjust pivot with offset limb -v#/2
position object i+100,object position x(i),0,object position z(i) rem positioning every plain in point coords.
point object i+100,object position x(i-1),0,object position z(i-1) rem pointing plane to new point
yrotate object i+100,object angle y(i+100)+90
set object radius i+100,-1
texture object i+100,1 :scale object texture i+100,4,2
scale object texture i+100,object size x(i+100)/20,1
position object 2000,0,7000,0 rem putting away the grid object
endif
next i
if object exist(104)
set light mapping on 104,2:set object 104,1,1,0
endif
rem adding all objects as limbs to the main one (500)
for i= 101 to 200
if object exist(i) then make mesh from object i,i:lm=lm+1
if mesh exist(i) then add limb 500,lm,i
if object exist(i) then offset limb 500,lm,object position x(i),object position y(i),object position z(i)
delete object i
next i
texture object 500,1
set object cull 500,0
position camera -30,30,-30
point camera 0,0,0
do
if spacekey() then save object "wall.dbo",500:sleep 300
control camera using arrowkeys 0,0.1,0.1
a#=wrapvalue(a#+mousemovex()/2)
cam#=wrapvalue(cam#+mousemovey()/2)
rotate camera cam#,a#,0
if leftkey() then move camera left 0.1
if rightkey() then move camera right 0.1
sync
loop
I'm not a grumpy grandpa
