testing caps on more than 1 sub-mesh each submesh ( see break command ) can have its own material the path-cap material has the same name but with the _pathCap ( should i use a dash and avoid underscores? hmm important to remember which one LuxRender dislikes)
in the case below, the "default" material is used, so all path-caps use material
i just want to correct the way the closed-path textures behave
then i'll post * ! * ! Beta 7 ! * ! *
in the bread image seen above
the bottom edge of the bread was obtained by using the closePath command
and that extra segment's UV map is stretched, which is what i'll correct now
.
.
.
... turns out i will not modify the closePath texturing technique for now
since it can produce good results the way it's set up
and we wont have to deal with any errors introduced by an attempt to fix it
the trick is to understand that closePath doesn't create the closing segment of a path
instead, it deletes the last ring, and connects the ring before that one to the first ring of the path
but we keep the valuably correct UV coordinates of the last ring.
but but i have to see if this works well with multi-mesh paths
because i suspect it doesn't
in case you're new to mcjBuilderA, here's a rush introduction
the 12 columns behind Aiko3 were created using the free Daz Studio script mcjBuilderA Beta 7
To describe mesh creation, we use the analogy of "extrusion" some solid material is pushed through an imaginary hole/nozzle The shape of this nozzle is referred to as the "extrusion profile" or "molding shape"
you select one of the 124 profile curves (nozzle shape), in this case a gear shape
you specify a profile size, in this case 1 ft by 1 ft ( which explains why the columns have a diameter of 1 ft
you specify a "Tread" length, in this case 1 ft -
From now on, if you order to advance the nozzle by12 steps, it will advance 12 ft
you compose an "extrusion path script" which is a series of commands in text format
you press the "Build button, it builds the object you designed and writes it to an .obj file on disk
you press the "load" button and badabing your object is in the Daz Studio world
lets go line by line over the "extrusion path script"
we begin the definition of a block of commands we chose to call this block of commands an "acolumn"
──────────────────────────
Ring
wherever we are in space we dump a ring of vertices, that ring has the shape of the selected profile curve, in this case a gear shape for now they are just points in space
──────────────────────────
Move 12
we advance 12 steps forth ( 12 ft )
──────────────────────────
Ring
wherever we are in space we dump a second ring of vertices We have two rings and that's all we needed The script builds a tube going from the first ring to the second one We now have a 12 ft long gear-shaped tube
──────────────────────────
break
this tells mcjBuilder to stop building tubes so now, if we move and create a third Ring, there wont be a tube going from the second ring to the third ring
──────────────────────────
Move -12
we move back 12 ft, so we're exactly where we started
──────────────────────────
MoveX 2
Move to the right, 2 ft
────────────────────────── with those 2 moves whoever invoked the "acolumn" knows where the "extrusion nozzle is located" .... right where it was before the invocation but 2 ft to the right
────────────────────────── defineEnd we're signaling the end of the definition of what we chose to call an acolumn
────────────────────────── so far we didn't create an acolumn!! we only defined what an acolumn is
──────────────────────────
rotateX -90
when mcjBuilder starts the "extrusion nozzle" is oriented just like Daz Studio's default camera if the nozzle were to move forth, it would move toward Aiko3 so we rotate it around the X ( red arrow ) axis -90 degrees, the nozzle is facing the sky
──────────────────────────
MoveTo -6*2 0 -1*2
remembering that Tread = 1 ft this means: move the extrusion nozzle to the x y z coordinate -12 0 -2
so, 12 ft to the left, at ground level, 2 ft behind Aiko ( who is currently standing at 0 0 0 )
────────────────────────── nothing was created yet, we only defined what's an acolumn and we moved the extrusion nozzle at the position where we want to build the first acolumn
──────────────────────────
repeat 12
this tells mcjBuilder to ....do .... whatever follows ... 12 times ( and to stop when it encounters the word repeatEnd )
──────────────────────────
acolumn
create an acolumn, right here!
──────────────────────────
repeatEnd
this signals the end of the things we told mcjBuilder to repeat 12 times
Neat. So your saying that one could create all sorts of stuff with your script, which so far from looking through all the posts, you can indeed. Are they auto UV'd or is that a separate script?
Neat. So your saying that one could create all sorts of stuff with your script, which so far from looking through all the posts, you can indeed. Are they auto UV'd or is that a separate script?
auto-UV
it makes tubes and caps
the list of commands you supply bends and stretches those tubes
the shape of the tube is one of the 124 bundled curves - but you can also make your own
Neat. OK... I'll have to try to find the time to test this out. Currently I'm trying to get all my personal items I made that I had in DAZ Studio set back up with Smart Content data as my upgrade to 8.1 started DAZ Studio from scratch and all that went away for some stupid reason. So time consuming this content data stuff.
I play for three days with yours BuilderA.*
and now I think I'm comfortable with, I must tell you
your script is toooooooooooo much Top !!!
not only fun to play with but, for me,
it learn many things taking a look inside
and it seems anything is doable with it.
love this type of open tools instead of
premade ones
sorry for my english
congratulations for all your work and
thanks, thanks, thanks
one thing else, perhaps tou know it:
does'nt work in Ds 4.6 (release 3.50)
cause line 20 hangs (var rxChunk ...)
log says
"SyntaxError: Invalid regular expression:
range out of order in character class"
a pity, sure you can do something in the next releases
... one thing else, perhaps tou know it: does'nt work in Ds 4.6 (release 3.50) cause line 20 hangs (var rxChunk ...) log says "SyntaxError: Invalid regular expression: range out of order in character class" ...
thanks for the tip ! i'm always using DS3A because 4.6 tends to crash on my PC
i'll post version Beta 8 very soon it fixes an issue with closePath
still thinking about adding repeat-within-repeat
but arrays could be done using
var spacing 2
var len 7
define acolumn x z
MoveTo x*spacing 0 z*spacing
Ring
Move len
Ring
endCap
break
defineEnd
rotateX -90
repeat 16
var row Math.floor(count/4)
var col count%4
acolumn row col
repeatEnd
Beta 8 will be DS 4 compatible, it was only DS3 compatible
here's the first semi-succesfull run !
it built the caps, it created the vertices for the tube
but didn't .... oh wait .... nah ... it didn't build the tubes
.... oh i know ! wait wait
ah ha! it was fully functionnal, it's just that i told it to close the path close the "ring of tube" but our ring of tubes, was just a straight tube the result was a zedo-length tube but as you can see in Figure 3 when we turn off the closePath option, everything works A-OK !
i'll test all the features and post Beta 8
technically, to make the script DS4 compatible
i had to replace
var rxChunk = new RegExp( /[a-zA-Z_][a-zA-Z0-9_]*|[-+]?[0-9]*\.?[0-9]*|[+-\*\/()]/g )
with
var rxChunk = new RegExp( /[\+]|[\-]|[\*]|[\/]|[a-zA-Z_][a-zA-Z0-9_]*|[\+\-]?[0-9]*\.?[0-9]*/g )
this is used to parse your statements and turn them into lists of operators and numbers and function names and variable names
oops lets not forget the parenthesis !
var rxChunk = new RegExp( /[\+]|[(]|[)]|[\-]|[\*]|[\/]|[a-zA-Z_][a-zA-Z0-9_]*|[\+\-]?[0-9]*\.?[0-9]*/g )
stay tuned ( or tune back in, it's not like you need to stay tuned and wait here doing nothing )
this evening i'll post mcjBuilderA Beta 8 with Daz Studio 4.6 compatibility it also will include access to the "Scene" object for your path scripts maybe also access to the positions of the vertices of the selected object so you could for example make your script build something that fits a figure! ---
i dont post it immediately because i want to perform a few dozen test runs before posting it ....
---- in the image below, the grid-walls were created in Daz Studio 4.6 using this mcjBuilderA path script
// grid
profile square
profileSize 1 1
profileUnits cm
tread 10
pathUnits cm
closePath off
define bar
Ring
Move 10
Ring
Move -10
MoveX 1
break
defineEnd
moveTo -5 0 -5
repeat 11
bar
repeatEnd
rotate 90
moveTo -5 0 5
repeat 11
bar
repeatEnd
profileSize 2 1.5
moveTo 0 0 5
Ring
repeat 4
Move 5
HardTurn 90
Move 5
Ring
repeatEnd
break
setRotY 0
moveTo 0 0 -5
Ring
Move 10
Ring
figure 2 - DS soft render .... i could do better than that but gotta return coding !
figure 3 - Testing materials and caps
see how i obtain numbered material names using the "repeat" counter
repeat 4
Material "mat"+count
theletterF
repeatEnd
Comments
yay @ the first scripted insertion of a "Path Cap" ( the tartan floor )
which means there's a more than faint possibility we'll get Beta 7 on Sunday
for this version only horizontal path caps will be properly handled
if you have many meshes generated by your path script, using the
"break" command, then each one can have its own path cap
Beta 7?
Looks great! :-)
i posted 6.98 saturday it has most new fixes and features
the manual was extended
Congratulations on all the progress! It's an exciting project.
testing caps on more than 1 sub-mesh
each submesh ( see break command ) can have its own material
the path-cap material has the same name but with the _pathCap
( should i use a dash and avoid underscores? hmm
important to remember which one LuxRender dislikes)
in the case below, the "default" material is used, so all path-caps use material
added code to avoid crashing on nonsensical path-caps
3 sided path caps are sensical
( interesting that auto-correct accepts "nonsensical" but doesnt accept "sensical"
someday mcjBuilder will possibly be able to output more than 1 .obj file
or even, output it as a multi-part figure
------
figure 6 i didnt really take time to make credible bread texture
but anyway if you need a good bread texture
see here: http://hhh316.deviantart.com/art/Brown-bread-seamless-182658273
~~~~ mcjBuilderA news ~~~~
i just want to correct the way the closed-path textures behave
then i'll post * ! * ! Beta 7 ! * ! *
in the bread image seen above
the bottom edge of the bread was obtained by using the closePath command
and that extra segment's UV map is stretched, which is what i'll correct now
.
.
.
... turns out i will not modify the closePath texturing technique for now
since it can produce good results the way it's set up
and we wont have to deal with any errors introduced by an attempt to fix it
the trick is to understand that closePath doesn't create the closing segment of a path
instead, it deletes the last ring, and connects the ring before that one to the first ring of the path
but we keep the valuably correct UV coordinates of the last ring.
but but i have to see if this works well with multi-mesh paths
because i suspect it doesn't
last thing to fix ... multiple closed-path shapes
( which, at least, don't crash the script )
fig 2 Tada ! i think i got it
you know, using just mcjBuilder one could build a whole castle !
for this version Beta 7 we have ebdCaps and pathCaps, in Beta 8 we'll get vertexCaps
Beta 7 Has Arrived !!!!!!!
( said with the voice of Morgan Freeman ( on helium ) )
5 minutes before midnight
so i sort'of reached my weekend deadline
undulating curtains using mcjBuilderA Beta 7
something that could be used as a base dor a ruffle-edge skirt
hey i figured something !
minimally, mcjBuilderA animates a node
if you rename this node to something else
and run mcjBuilderA again, you can animate another node with a slightly different pattern
then using mcjRibbons, you can turn those nodes into something quite complex!
... like a pleated/ruffled skirt
h y p e r A d v a n c e d t r i c k
: using mcjBuilder to add a dress edge to the Aiko3 bodycon
mcjBuilder can use the services of the daz scripting engine
for example when you do
Move sin(3.1416)
it's the daz scripting engine that computes sin(3.1416)
in version Beta 7 you don't have direct access to some neat objects like the Scene object
( well you do if you create a DzScript() )
but in version 8 you will
as a bonus you'll have quick access to the positions of the vertices of any selected object
Here i used this to build a dress edge !
it worked because the free mcjA3Bodycon's vertices are all neatly sorted
very cool there Casual!
thanks!
i think i'll finish the gothic walls/chapel
then the castle's stairs ( the original impetus )
then it's back to the physics engine wasnt it?
All made from your script? AMAZBALLS!
in case you're new to mcjBuilderA, here's a rush introduction
the 12 columns behind Aiko3 were created using the free Daz Studio script mcjBuilderA Beta 7
To describe mesh creation, we use the analogy of "extrusion"
some solid material is pushed through an imaginary hole/nozzle
The shape of this nozzle is referred to as the "extrusion profile" or "molding shape"
you select one of the 124 profile curves (nozzle shape), in this case a gear shape
you specify a profile size, in this case 1 ft by 1 ft ( which explains why the columns have a diameter of 1 ft
you specify a "Tread" length, in this case 1 ft -
From now on, if you order to advance the nozzle by12 steps, it will advance 12 ft
you compose an "extrusion path script" which is a series of commands in text format
you press the "Build button, it builds the object you designed and writes it to an .obj file on disk
you press the "load" button and badabing your object is in the Daz Studio world
lets go line by line over the "extrusion path script"
──────────────────────────
we begin the definition of a block of commands
we chose to call this block of commands an "acolumn"
──────────────────────────
wherever we are in space
we dump a ring of vertices, that ring has the shape
of the selected profile curve, in this case a gear shape
for now they are just points in space
──────────────────────────
we advance 12 steps forth ( 12 ft )
──────────────────────────
wherever we are in space
we dump a second ring of vertices
We have two rings and that's all we needed
The script builds a tube going from the first ring to the second one
We now have a 12 ft long gear-shaped tube
──────────────────────────
this tells mcjBuilder to stop building tubes
so now, if we move and create a third Ring,
there wont be a tube going from the second ring to the third ring
──────────────────────────
we move back 12 ft, so we're exactly where we started
──────────────────────────
Move to the right, 2 ft
──────────────────────────
with those 2 moves
whoever invoked the "acolumn" knows
where the "extrusion nozzle is located" ....
right where it was before the invocation
but 2 ft to the right
──────────────────────────
defineEnd
we're signaling the end of the definition
of what we chose to call an acolumn
──────────────────────────
so far we didn't create an acolumn!!
we only defined what an acolumn is
──────────────────────────
when mcjBuilder starts the "extrusion nozzle" is
oriented just like Daz Studio's default camera
if the nozzle were to move forth,
it would move toward Aiko3
so we rotate it around the X ( red arrow ) axis
-90 degrees, the nozzle is facing the sky
──────────────────────────
remembering that Tread = 1 ft
this means:
move the extrusion nozzle to the x y z coordinate
-12 0 -2
so, 12 ft to the left, at ground level, 2 ft behind Aiko
( who is currently standing at 0 0 0 )
──────────────────────────
nothing was created yet, we only defined what's an acolumn
and we moved the extrusion nozzle at the position
where we want to build the first acolumn
──────────────────────────
this tells mcjBuilder to ....do .... whatever follows ... 12 times
( and to stop when it encounters the word repeatEnd )
──────────────────────────
create an acolumn, right here!
──────────────────────────
this signals the end of the things we told mcjBuilder to repeat 12 times
oh my i made a video in May :)
* * * Here's pointing at you * * *
https://www.youtube.com/watch?v=1PD75e8vF-k
( not proud of my youtube channel productivity, i used to make a lot of videos ! )
Hmmm, that's not a good link. It takes me to MY Videos which I haven't uploaded any so ... lol
maybe here https://www.youtube.com/watch?v=1PD75e8vF-k
the title is "Here's pointing at you" so you could find it that way
-------
( mcjSuperLathe curve converted into an mcjBuilder path )
Neat. So your saying that one could create all sorts of stuff with your script, which so far from looking through all the posts, you can indeed. Are they auto UV'd or is that a separate script?
auto-UV
it makes tubes and caps
the list of commands you supply bends and stretches those tubes
the shape of the tube is one of the 124 bundled curves - but you can also make your own
Neat. OK... I'll have to try to find the time to test this out. Currently I'm trying to get all my personal items I made that I had in DAZ Studio set back up with Smart Content data as my upgrade to 8.1 started DAZ Studio from scratch and all that went away for some stupid reason. So time consuming this content data stuff.
hey Jacques,
I play for three days with yours BuilderA.*
and now I think I'm comfortable with, I must tell you
your script is toooooooooooo much Top !!!
not only fun to play with but, for me,
it learn many things taking a look inside
and it seems anything is doable with it.
love this type of open tools instead of
premade ones
sorry for my english
congratulations for all your work and
thanks, thanks, thanks
one thing else, perhaps tou know it:
does'nt work in Ds 4.6 (release 3.50)
cause line 20 hangs (var rxChunk ...)
log says
"SyntaxError: Invalid regular expression:
range out of order in character class"
a pity, sure you can do something in the next releases
Thank you again and keep on :)
thanks for the tip !
i'm always using DS3A because 4.6 tends to crash on my PC
i'll post version Beta 8 very soon
it fixes an issue with closePath
still thinking about adding repeat-within-repeat
but arrays could be done using
mcjBuilder news
Beta 8 will be DS 4 compatible, it was only DS3 compatible
here's the first semi-succesfull run !
it built the caps, it created the vertices for the tube
but didn't .... oh wait .... nah ... it didn't build the tubes
.... oh i know ! wait wait
ah ha! it was fully functionnal, it's just that i told it to close the path
close the "ring of tube"
but our ring of tubes, was just a straight tube
the result was a zedo-length tube
but as you can see in Figure 3
when we turn off the closePath option, everything works A-OK !
i'll test all the features and post Beta 8
technically, to make the script DS4 compatible
i had to replace
with
this is used to parse your statements
and turn them into lists of operators and
numbers and function names and variable names
oops lets not forget the parenthesis !
( i'm not very RegExperienced )
Oh that last screenshot looks like tall stacks of coins. ~LOL~
stay tuned ( or tune back in, it's not like you need to stay tuned and wait here doing nothing )
this evening i'll post mcjBuilderA Beta 8 with Daz Studio 4.6 compatibility
it also will include access to the "Scene" object for your path scripts
maybe also access to the positions of the vertices of the selected object
so you could for example make your script build something that fits a figure!
---
i dont post it immediately because i want to perform a few dozen test runs before posting it ....
----
in the image below, the grid-walls were created in Daz Studio 4.6 using this mcjBuilderA path script
figure 2 - DS soft render .... i could do better than that but gotta return coding !
figure 3 - Testing materials and caps
see how i obtain numbered material names using the "repeat" counter
release will be ... in the night
because thorough testing is a good idea and is ongoing
testing is not uneventful :)
more Beta 8 in DS 4.6 succesful tests
release in 45 minutes ... tic toc tic toc
... who will be the first to build a castle ?
i mean like a fortress
sorry if i'm taunting you!