Hi you all.
Playing a bit with vertexdata, we can create amazing objects without the need of an external editor .This can be a bit tedious, but for those who like the challenge of inventing new things and discover new possibilities with the DBPro, here is a small piece of code.
autocam off
hide mouse:color backdrop rgb(100,100,200)
sync on
ink rgb(0,0,80),0
box 0,0,50,50
ink rgb(0,0,40),0
box 5,18,20,23
ink rgb(50,10,0),0
box 0,25,50,50
ink rgb(255,255,0),0
box 25,10,26,25
box 0,10,1,25
ink rgb(120,20,20),0
box 0,25,50,26
get image 1,0,0,50,50,1
make object sphere 1,5,5,5
texture object 1,1
offset limb 1,0,0,-2.5,0
lock vertexdata for limb 1,0
vertices = get vertexdata vertex count()
for i = 0 to 5
x# = get vertexdata position x(i)
y# = get vertexdata position y(i)
z# = get vertexdata position z(i)
set vertexdata position i,x#,y#+10,z#
next i
for i = 6 to 11
x# = get vertexdata position x(i)
y# = get vertexdata position y(i)
z# = get vertexdata position z(i)
set vertexdata position i,x#*2,y#+8,z#*2
next i
for i = 12 to 17
x# = get vertexdata position x(i)
y# = get vertexdata position y(i)
z# = get vertexdata position z(i)
set vertexdata position i,x#-5,y#,z#
next i
for i = 18 to 36
x# = get vertexdata position x(i)
y# = get vertexdata position y(i)
z# = get vertexdata position z(i)
set vertexdata position i,x#,y#-5,z#
next i
for i = 18 to 23
x# = get vertexdata position x(i)
y# = get vertexdata position y(i)
z# = get vertexdata position z(i)
set vertexdata position i,x#*0.3,y#,z#*0.3
next i
for i = 30 to 36
x# = get vertexdata position x(i)
y# = get vertexdata position y(i)
z# = get vertexdata position z(i)
set vertexdata position i,x#-1,y#,z#
next i
unlock vertexdata
scale object 1,100,100,50
instance object 30,1
position object 30,-4,0,2.5:scale object 30,100,100,50
zrotate object 30,-40
set object normals 1
position camera 0,10,-30
point camera 0,0,0
`WE CAN SAVE THE OBJECT AS .DBO AND JUST LOAD AND USE ANIMATION VERTEXDATA
rem save object "ani.dbo",1
do
` F O O T A N I M A T I O N ((((((((((((((((((((((((((((((((((((((((((((((((
mv#=mv#+0.01
if mv#>5 then mv#=-5
lock vertexdata for limb 1,0
for i = 12 to 17
x# = get vertexdata position x(i)
y# = get vertexdata position y(i)
z# = get vertexdata position z(i)
set vertexdata position i,x#+mv#/200,y#,z#
next i
for i = 18 to 36
x# = get vertexdata position x(i)
y# = get vertexdata position y(i)
z# = get vertexdata position z(i)
set vertexdata position i,x#+mv#/300,y#-x2#/1000,z#
next i
unlock vertexdata
`)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
control camera using arrowkeys 0,0.1,0.1
a#=wrapvalue(a#+mousemovex()/2)
cam#=wrapvalue(cam#+mousemovey()/2)
rotate camera cam#,a#,0
set cursor 5,5:print vertices
sync
loop
Once done our object, we can save it as .dbo and load it directly and use the animation subroutine.When we have the dbo, we can use this code:
autocam off
sync on
hide mouse:color backdrop rgb(100,100,200)
`making the texture
ink rgb(0,0,120),0
box 0,0,50,50
ink rgb(0,0,40),0
box 5,18,20,23
ink rgb(50,10,0),0
box 0,25,50,50
ink rgb(255,255,0),0
box 25,10,26,25
box 0,10,1,25
ink rgb(120,20,20),0
box 0,25,50,26
get image 1,0,0,50,50,1
load object "ani.dbo",1
texture object 1,1
instance object 30,1
position object 30,-4,0,2.5:scale object 30,100,100,50
zrotate object 30,-40
position camera 0,10,-30
point camera 0,0,0
do
`F E E T A N I M A T I O N ((((((((((((((((((((((((((((((((((((((((((((((((
mv#=mv#+0.01
if mv#>5 then mv#=-5
lock vertexdata for limb 1,0
for i = 12 to 17
x# = get vertexdata position x(i)
y# = get vertexdata position y(i)
z# = get vertexdata position z(i)
set vertexdata position i,x#+mv#/200,y#,z#
next i
for i = 18 to 36
x# = get vertexdata position x(i)
y# = get vertexdata position y(i)
z# = get vertexdata position z(i)
set vertexdata position i,x#+mv#/300,y#-x2#/1000,z#
next i
unlock vertexdata
`)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
control camera using arrowkeys 0,0.1,0.1
a#=wrapvalue(a#+mousemovex()/2)
cam#=wrapvalue(cam#+mousemovey()/2)
rotate camera cam#,a#,0
sync
loop
What I try to do now is figure out how to save the animation in the same object. I hope this piece of code can help someone
Cheers.
I'm not a grumpy grandpa
