mcjSphericalUV - Spherical UV mapper - script for DS 1, 2, 3, 4.0 and 4.5+
--------------->
https://sites.google.com/site/mcasualsdazscripts4/mcjsphericaluv
the idea is - you select objects in your scene and the script creates a copy of that object on disk
but, the UV map ( which governs the placement of texture-images on the surfaces ) is projected on the surfaces from either
- the position of the camera
or
- point ( 0, 0, 0 )
---------------
it could solve a problem like : you have an object which looks catastrophically not right when you attempt to apply a texture image to it - in fact some objects have no UV map at all and show up as 1 color when you apply an image
this script can also turn a standard Daz Studio primitive-plane into a ground plane that can blend in with a given environment sphere ( aka sky-dome ) - in figure 1 there's a 100 ft wide dome and a 100 ft wide ground plane, they have the same ( panoramic ) image applied to their surface - this was rendered in Blender, the Dome actually emits light and serves as the scene's lighting - the ground plane is matte and can receive shadows
Comments
in this example
we start by loading an environment sphere - which is a gigantic sphere with a special panoramic photo applied to its surface
we create and position a primitive-cylinder
we select the cylinder
we run the mcjSphericalUV script
and 1 second later it's ready
we load 2 copies of the cylinder
and appply the same image as the environment sphere
and tada we got palm trees!
this time we are "in" a google streetview environment
in Utah, possibly at the Daz inc building!
we create a cube 15x15x15 divisions ( if it was 1x1x1 divisions we'd get distortion probably )
and we project the UVs
a few notes
the environment sphere is very large and centered at 0,0,0
( which corresponds to how the script sees the spherical image )
i zeroed the specular strength and made the ambient color white 100% ( 50% for software renders )
google streeviewt cameras are on a tripod on a car roof,about 8 ft above ground - around 240 cm
so i placed the ground plane at y = -240
the daz studio camera is at 0, 0, 0
------------
in blender, i made the sphere emissive and i made it NOT cast shadows
i removed gloss from the ground plane (shadow catcher )
at first the plane was visibly darker than the image on the sphere
i added a Sun-light of strength 3, changed its size to .01 to make sharper shadows
rotated it until the shadows were positionned like the rest of the scene and so that the ground plane blended with the rest
This looks interesting......gotta keep track of this thread.
in this case the spherical UV mapping was transfered to a 16x16m cube
as long as the camera stays where it is we keep the illusion
figure 2
this is one of faces of the cube
one could use this image to texture a plane
and the big advantage is that the texture is not all warped and hard to modify
Figure 3 this is the spherical map from streetview
editing the brickwalls in Photoshop would be harder than
editing the cube face images
Very interesting, hope i will be able to use it :)
just now i posted a version of the script
for Daz Studio 1 and 2
and one for Daz Studio 3 and 4
https://sites.google.com/site/mcasualsdazscripts4/mcjsphericaluv
( in fact its the same exact code )
the version for Daz Studio 4.5 and up will be posted soon, as in, say, 1 day
the manual will also be improved ( i'll include the examples shown on this page )
my videos featuring things spherically- UV mapped
https://www.youtube.com/watch?v=ud_bwuNRXg0
https://www.youtube.com/watch?v=NQs9ht31tuE
the version for DS4.5+ is aaaaaaalmost ready ! i think
got to test it with figures and figure parts
in Figure 2 - i placed the camera in the center of A3's hips, selected the whole short pants figure
and a few seconds later i had a copy of the pants with brand new easy to texture UV map
in fig 3 the UV map for the same pants but zero-posed
in fig 4 testing the ability to process only selected body parts, in this case Aiko3's hip and buttocks
fig 5 re-UV mapping only the surfaces with the selected material named "SkinHead"
note that this takes longer because the script reviews all of Aiko2's geometry looking for surfaces with that material
now available for Daz Studio 1, 2, 3, 4.0 and 4.5+
https://sites.google.com/site/mcasualsdazscripts4/mcjsphericaluv
THANKS so so much Casual. This is one script I'm going to use very very soon! YAY!
Wanted to ask. IF I were to use my Sphere Environ in a morphed state, like using one of the many land mass morphs I made for the ground plane would it help eliminate stretching or would it just read the default layout somehow and give me a flattened UV?
Thanks sir! I'm guessing your a sir.... :red:
example of a Digital Elevation Map from NASA
http://ava.jpl.nasa.gov/gdem.php?id=0201-32-
fig 2 - this D.E.M. used on the displacement channel of a 1x1 plane ( Daz Studio Software render )
fig 3 the D.E.M. converted into a morph of a 100 x 100 plane - using mcjElevate https://sites.google.com/site/mcasualsdazscripts/mcjelevate ( Daz Studio hardware render )
fig 4 subdivided ( Daz Studio hardware render )
the script projects the UVs on the positionned / scaled / rotated / morphed object
so if you have a panoramic image which was taken from the point of view of someone at the bottom of a valley
then ideally you’d project it on a ground plane shaped like that valley
—
also it’s better to have geometry with many facets to reduce visibility of stretching
—
the USGS has free DEM or Digital Elevation Maps ( well they had them 10 years ago )
http://ned.usgs.gov/
it’s gray scaled satellite images where the gray values are proportional to the altitude -
using a 100x100 plane and my mcjElevate script https://www.youtube.com/watch?v=6dP8faP3KMo
you could make terrains
——
you could also obtain that result by applying the USGS DEM to the displacement ( or bump ) channel of the 1x1 plane surface