Posted: 9th Mar 2014 5:50
made some changes to produce sharper jagged edges

+ Code Snippet
autocam off:move camera -50:randomize timer():sync on:sync rate 25:wf=-1
ReStart:
if object exist(1) then delete object 1
color backdrop rgb(rnd(40),40+rnd(60),100+rnd(100))
make object sphere 1,100,rnd(20)+5,rnd(20)+5

lock vertexdata for limb 1,0
vc=get vertexdata vertex count()
for v=0 to vc-1
x#=get vertexdata position x(v)
y#=get vertexdata position y(v)
z#=get vertexdata position z(v)
set vertexdata position v,x#+rnd(5+asin(rnd(30))),y#+rnd(5+asin(-3)),z#+rnd(5+tan(45))
next v
unlock vertexdata

xx=rnd(100)+1
yy=rnd(100)+1
zz=rnd(100)+1
scale object 1,xx,yy,zz


make mesh from object 1,1:delete object 1
load image "yourimagehere",1,1
make object 1,1,1:set object cull 1,0:set object wireframe 1,wf
scale object texture 1,(xx+zz/2)/15,yy/15

`OPTIONAL BLEND MAPPING [will not save into .DBO file!]
load image "yourimagehere",2,1
set blend mapping on 1,2,6

do
if spacekey()=1
while spacekey()=1
ENDWHILE
goto ReStart
ENDIF
if lower$(inkey$())="s"
ReRoll:
fn$="Rock_"+str$(rnd(10000))+".dbo"
if file exist(fn$) then goto ReRoll
save object fn$,1
print fn$;" saved!":sync:wait 2000
while lower$(inkey$())="s"
ENDWHILE
ENDIF
if upkey()=1 then move camera 1
if downkey()=1 then move camera -1
if leftkey()=1 then yrotate object 1,object angle y(1)+2
if rightkey()=1 then yrotate object 1,object angle y(1)-2
set cursor 0,0:print "SPACEBAR FOR NEW ROCK":print "ARROW KEYS TO ZOOM/ROTATE":print "'W' TO TOGGLE WIREFRAME":print "'S' TO SAVE THIS ROCK"
set cursor 490,0:print "Vertex Count: ",vc
if lower$(inkey$())="w" then wf=wf*-1:set object wireframe 1,wf
while inkey$()<>""
ENDWHILE
sync
LOOP
Posted: 11th Mar 2014 4:11
I'm not really seeing a rock. More like a squished sphere with one random point sticking way out like a spike.