fantastic gizmo for tex artists+modellers
Moderator: pyramid
-
- Bounty Hunter
- Posts: 201
- Joined: Wed Jan 14, 2004 11:11 pm
- Location: londonengland, england
- Contact:
fantastic gizmo for tex artists+modellers
i got tired of creating random techy textures all the time, so i made this to do it for me...
http://www.aqpm75.dsl.pipex.com/hullgen.html
http://www.aqpm75.dsl.pipex.com/hullgen.html
- - above and beyond - -
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Great stuff! Thanks! Been hitting "randomize" for a while and it's amazing. Any chance you could write definitions for the params? Or better yet, post the code? I'd like to rewrite it in C++ and maybe add a couple of features, like making it make tileable textures.
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Bounty Hunter
- Posts: 201
- Joined: Wed Jan 14, 2004 11:11 pm
- Location: londonengland, england
- Contact:
-
- Bounty Hunter
- Posts: 201
- Joined: Wed Jan 14, 2004 11:11 pm
- Location: londonengland, england
- Contact:
here's the main code for the actual drawing routines.
maplist and sliderlist are for the interface.
hvar - horizontal variation
vvar - vertical variation
ibdr - inner border
obdr - outer border
bdvr - border variance
step (not initially defined) - amount of smoothing steps
stepvar - amount of additionally randomly defined smoothing steps
modeshift - switches between draw modes (only between round and hard rectangles atm)
skip - instances of skipped draws
maplist and sliderlist are for the interface.
hvar - horizontal variation
vvar - vertical variation
ibdr - inner border
obdr - outer border
bdvr - border variance
step (not initially defined) - amount of smoothing steps
stepvar - amount of additionally randomly defined smoothing steps
modeshift - switches between draw modes (only between round and hard rectangles atm)
skip - instances of skipped draws
Code: Select all
--------- START OF SCRIPT ---------
property img1
property img5
property maplist
property datalist
property initdata
property sliderlist
on new me
datalist=[1,1,-5,-5,1,1,1,0,0,0]
maplist=[#hvar:[2,1],#vvar:[2,1],#ibdr:[1,-50],#obdr:[1,-50],#bdvr:[1,1],#step:[1,0],#stepvar:[1,0],#modeshift:[1,-50],#skip:[1,0],#othr:[1,0]]
initdata=[20,20,45,45,0,0,0,0,10,0]
sliderlist=initdata.duplicate()
return me
end
on drawarmor me
hvar=datalist[1]
vvar=datalist[2]
ibdr=datalist[3]
obdr=datalist[4]
bdvr=datalist[5]
stepv=datalist[6]
stepvar=datalist[7]
modeshift=datalist[8]
skip=datalist[9]
img1=image(1280 ,1280 ,32,16)
img5=image(1280 ,1280 ,16)
img5.fill(0, 0, img5.width, img5.height, [#shapeType:#rect,#color: rgb(0, 0, 0)])
o=1
fc=255
vh=random(hvar)+1
vv=random(vvar)+1
ih=img1.width
iv=img1.height
ihr=0
ivr=0
osh=0
osv=0
losv=0
losh=0
ihiv=ih
iviv=iv
img1.fill(0, 0, ihiv, iviv, [#shapeType:#rect,#color: rgb(0, 0, 0)])
repeat with i=1 to 100
ivr=(random(iviv/vv))
if iv-ivr>-50 then
iv=iv-ivr
repeat with ii=1 to 100
ihr=(random(ihiv/vh))
if ih-ihr>-50 then
ih=ih-ihr
if random(100)>skip then
case 1 of
1:
shty=random(50)+modeshift
if stepvar<1 then stepvar=1
step=value(stepv)+(random(stepvar))
rct1=rect(losh+random(bdvr)+ibdr, losv+random(bdvr)+ibdr, osh-random(bdvr)-ibdr, osv-random(bdvr)-ibdr)
rct3=rect(losh+random(bdvr)+obdr, losv+random(bdvr)+obdr, osh-random(bdvr)-obdr, osv-random(bdvr)-obdr)
case shty/50 of
0:
img1.fill(rct3, [#shapeType:#rect,#color:rgb(50, 50, 50) ])
repeat with iii=1 to step
rct2=rect(iii,iii,-iii,-iii)
rcmd=((255/step)*iii)
img1.fill(rct1+rct2, [#shapeType:#rect,#color:rgb(rcmd, rcmd, rcmd) ])
end repeat
1:
img1.fill(rct3, [#shapeType:#roundrect,#color:rgb(50, 50, 50) ])
repeat with iii=1 to step
rct2=rect(iii,iii,-iii,-iii)
rcmd=((255/step)*iii)
img1.fill(rct1+rct2, [#shapeType:#roundrect,#color:rgb(rcmd, rcmd, rcmd) ])
end repeat
end case
end case
end if
losh=osh
osh=osh+ihr
else
ii=100
ih=ihiv
losh=0
osh=0
end if
end repeat
losv=osv
osv=osv+ivr
else
i=100
end if
end repeat
end
- - above and beyond - -
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Thanks! Won't be able to look at it for a few days; --just came back from the store with parts to build a new PC; so that comes first... What I want to do, mainly, is to modify the code to make it produce tileable textures, as CoffeeBot and myself have been working on a space elevator station and it's pretty big. Without a tileable texture it would take dozens of megabytes of textures to get it to not look blocky at close range.
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Bounty Hunter
- Posts: 201
- Joined: Wed Jan 14, 2004 11:11 pm
- Location: londonengland, england
- Contact:
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Doh! Shockwave's not available for Linux...
Boicot Macromedia.
Another reason to move this code to C++.
Boicot Macromedia.
Another reason to move this code to C++.
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Confed Special Operative
- Posts: 286
- Joined: Tue Dec 21, 2004 3:11 am
- Location: Costa Pobre
- Contact:
-
- Intrepid Venturer
- Posts: 676
- Joined: Wed Jul 06, 2005 5:25 am
- Location: On the counter by the toaster
- Contact:
-
- Developer
- Posts: 3980
- Joined: Fri Jan 03, 2003 4:53 am
- Location: Stanford, CA
- Contact:
-
- Intrepid Venturer
- Posts: 676
- Joined: Wed Jul 06, 2005 5:25 am
- Location: On the counter by the toaster
- Contact:
Wow. v1.5 is way better. I like it a lot.
I am curious about the armor, though, and this doesn't just apply to this nifty app, but to nearly everything -- Why is it so popular to create a mass of metal tiles for a hull, as though it were either made out of fish scales or a haphazard quilt of plating? Or, in some cases, randomly sized tiles of metal riveted together.
I know aerodynamics aren't a factor for spacecraft, but, conservation of materials and mass still are. I guess it just doesn't make much sense to me that armor would be a giant quilt of materials -- unless it's some kind of cheap add on or 2nd hull that doesn't quite fit.
I am curious about the armor, though, and this doesn't just apply to this nifty app, but to nearly everything -- Why is it so popular to create a mass of metal tiles for a hull, as though it were either made out of fish scales or a haphazard quilt of plating? Or, in some cases, randomly sized tiles of metal riveted together.
I know aerodynamics aren't a factor for spacecraft, but, conservation of materials and mass still are. I guess it just doesn't make much sense to me that armor would be a giant quilt of materials -- unless it's some kind of cheap add on or 2nd hull that doesn't quite fit.
-
- Bounty Hunter
- Posts: 201
- Joined: Wed Jan 14, 2004 11:11 pm
- Location: londonengland, england
- Contact:
-
- Confed Special Operative
- Posts: 286
- Joined: Tue Dec 21, 2004 3:11 am
- Location: Costa Pobre
- Contact:
@coffeebot: Um. Tradition? It was common to extrapolate that future technologies will look like current ones in the 60's and 70's. It wasn't until the 90's that alternatives were truly contemplated--namely the 'bio-ships' that suddenly popped up everywhere around sci-fi shows.
I see where you're coming from. I've been thinking the same for quite some time now, design-wise (no, I'm not doing any VS ships presently.) Spaceships might require an entirely different approach to vehicular engineering and construction. Heck, maybe even different engineering principles, or even a different notion of 'science' (compare a 9th century 'man of science' to a modern physicist. It's not unreasonable to suspect that that's exactly what our science will look compared to the one the time of Vega Strike.)
Then again, it can be argued that those ships, buildings and whatever that do resemble familiar structures have been engineered using said unfathomable future knowledge, but that it doesn't show as much as a result of economic, aesthetic or even engineering (ergonomic?) directives.
@strangelet: I dig 1.5. 'scuse me if I use it lots
I see where you're coming from. I've been thinking the same for quite some time now, design-wise (no, I'm not doing any VS ships presently.) Spaceships might require an entirely different approach to vehicular engineering and construction. Heck, maybe even different engineering principles, or even a different notion of 'science' (compare a 9th century 'man of science' to a modern physicist. It's not unreasonable to suspect that that's exactly what our science will look compared to the one the time of Vega Strike.)
Then again, it can be argued that those ships, buildings and whatever that do resemble familiar structures have been engineered using said unfathomable future knowledge, but that it doesn't show as much as a result of economic, aesthetic or even engineering (ergonomic?) directives.
@strangelet: I dig 1.5. 'scuse me if I use it lots
-
- Daredevil Venturer
- Posts: 583
- Joined: Sun Feb 16, 2003 12:58 am
- Location: West Coast of USA
- Contact: