mcjCylindricalUV: Script exports geometry with Cylindrical-Projected UV map
Download and manual ( uh hum )
https://sites.google.com/site/mcasualsdazscripts4/mcjcylindricaluv
Introduction
The script exports to disk a copy of the selected object with the new UV map
the UV map is "projected " either from location 0,0,0 or from the current position of the camera
The projection is cylindrical, and useful for dresses and ... all things vaguely cylindrical
I hope this script will help someone, but it wont always work flawlessly.
note that previously i covered Box, Spherical and Planar UV projections
https://sites.google.com/site/mcasualsdazscripts3/mcjboxuv
https://sites.google.com/site/mcasualsdazscripts4/mcjsphericaluv
https://sites.google.com/site/mcasualsdazscripts4/mcjplanaruv
cyl5.jpg
1250 x 516 - 179K
cyl2.jpg
1044 x 595 - 231K
cyl1.jpg
1280 x 720 - 466K
Post edited by Cris Palomino on
Comments
Hey there. I wanted to add a cylindrical UV to that skirt I've been modifying, because I figure some skirt designs would be easier to make this way vs a planar projection, but this one has the same problem as the planar UV script. Could I trouble you to bring the update you made to that script to this one as well? Thank you very kindly for your time.
i think it may have to do with genesis things that dont name their surfaces the way old V3/V4 figures did
i'll announce it in this thread when it's fixed
in this test today, mcjCylindricalUVs only found the pectorals surfaces ( chessboard texture )
note that a workaround that could work goes like this
-pose the figure wearing the skirt
-use mcjHideAllBut script to hide everything except the skirt
- export the scene as an obj with the "Ignore invisible nodes" option ON
- use mcjHideAllBut to make everything visible again
- delete or hide the real skirt
- import the obj that was exported to disk (it will fall exactly where the skirt was)
- use mcjCylindricalUVs on the imported .obj
the second big picture is the result of using t hat method
work in progress
Fixin mcjCylindricalUVs for Genesis reasons
but for now it exports all vertices (280k) instead of the selected surface's vertices (30K),
but but on the other hand it allows importing the UV map of the exported .obj onto the Genesis figures/clothes so we'll leave it like that
and the UV extents cover the whole figure so i may add a UV coordinates normalizer
the update will be posted today
the issue was that the script was expecting facet-group names like upperAbdomen and lowerAbdomen, but for Genesix X they are named upperAbdomen and Abdomen
same issue for the neck. i'll see about the arms, there's a twist bone and a bend bone, one of the 2 has no mesh associated to it
and that's what i did last night instead of working on the two! script updates in progress :)
Thank you very much for your work on this!! You're the man. :D
Nice thank you
today today i complete the update, yesterday was mostly spent on this
https://www.daz3d.com/forums/uploads/FileUpload/3f/cfda9b1a1a9a6d6c3f482b98643eb9.png
Old school 3D is always cool.
Sorry to keep people who are waiting, waiting in utter desperation
but if it can excuse me, the new version will output the same number and order of the uv coordinates, so you'll be able to import the UV map this way
the .obj will contain only the facets you selected ( by material or by bone ) , but all the v's and all the vt's will be in the .obj
The vt's of your facets will have the new UV-Remapped vt's
In other news, it went super summerfull here so i kinda was slack
not as slack as people in The Church of Bob, they are the OG of slackness
new VIDYO !!!!
Good News
The code of the script has shrunk down to about 1/3 of what it was
this is always a good sign.
so it's not ready but it's moving
bu it's not ready
but it's moving
ok i stop bugging you
The script will only accept the following selections
- One whole figure
or
- One or many bones from 1 figure
or
One node that has a mesh (ex: a primitive)
============
This restriction is because i want the .obj files to have the same number of vertices, the same number of uv coordinates and they have to be in the same order
... so this way the UVMap can be imported using the feature i used only once : "Load UV Set".
the option to only export selected surfaces remains
having trouble uploading images
after having pasted an image in my clipboard in this leave a comment box
but i dont know if it was the cause
the relevant error in the browser console may be
Unexpected token < in JSON at position [email protected]?v=1.8.42:495:33
could be a corrupted cookie
cant post the image here either
Forum uploads are failing for many people now.
Pasting images into the text box isn't supported anyway, they have tio be uploaded as attachments then they can be linked to inline. But yes, attach i sfailing for me too.
salutations Richard
the image did paste in the edit box
but there was a never-seen-before gray error-panel that appeared
so i was thinking
a- i crashed the fileUpload functionality for everybody and that's why it stalls
or
b- the programmers wrote that if someone causes a gray error-panel error, he gets no fileUpload for, say 24H or until some admin re-enables it
t'was this picture
( to prevent hackers from bombarding the forum software with gray error panels the story would go )
There was an issue with file uploads, which was fixed later yesterday. Pasting an image (rather than a link) has never shown in the forum, though as you say it does - confusingly - show in the edit box.
i guess when the editor parses the message, it gets a blob that's that's encoded to something 2 times the size of the pasted image, and it falls in an error trap
but luckily it doesnt crash the fileupload for everybody else !
Twin Rocket Propelled WHEEZER MARK II.
it will come out don't worry :) and be better than before
in due and dilated time
Are the other UV-modifier scripts also getting (or needing) upgrades?
possibly the Spherical one when it comes to edges that cross the 0 degrees/360 degrees projection angle
i think i have to detect vertices that have a more than 180 degrees angle separation and shift the offending facets uv coordinates to the right
so a segment going from UVu = 0.25 to 0.875 becomes the segment from UVu 0.875 to 1.125
the bug makes interesting patterns though
i may get it ready tonite once the zero-crossing issue is solved
down the road someday i may convert this into a Daz Studio plugin for mac/pc
because it would be X times faster.
the faulty edges uv.u have a distance greater than 0.5 i think, so far since it's a cylindrical projection
Ladies and gentlemen we got him.
The 0°-crossing problem of mcjCylindricalUVs has been vanquished
i think
the fix is as follow:
a whole figure cylindrically re-uv-mapped
as i may have told you, the new version aims to preserve the number of uv coordinates so that the UVmap
can be imported using Daz Studio's surfaces tab's "Load UV Set..." function
but we can only unfold a tube and lay it down a flat square if that tube has a vertical cut in it.
so my method of shifting uv.u's by +1.0 that solved the issue for the "zero-degrees-crossings" worked
for the cube but wont work for a seamless tube like this dress
there's a method wherein you can flatten the tube but with this method with this method,
half the texture image would be horizontally inverted (mirrored)
or i could have the script to look for the vertical cut of the original map, which, come to think of it must be near uv.u = 0
in some rare cases there's no vertical cut, in other cases there's many uv "shells"
for example this untouched uv map for the daz studio cylinder primitive has 3 shells
with our tubular projection ( cylinder with no caps ) the horizontal facets are seen as lines, which is not really a defect
adding top-bottom uv shells would not work for a shape like this:
well i dont have the script ready but i got a vidyo with cool pics
ok ok that's not the same as a script
so, since the cylindrical mapping that preserves the texture-vertices count ... has that zero-crossing issue
i will just make the old version compatible with the Genesis bone/group names
which gives us a nice UV map , like the old version but isnt loadable as a UV-set
contrary to the old version i'll also weld/merge the texture-vertices that coincide
( to solve the zero-crossing issue, we mentioned that we were moving some texture-coordinates
by +1.0, but since the map was welded it was stretching facets that shouldnt be stretched )