3dcheapskate opened this issue on Nov 24, 2012 · 11 posts
3dcheapskate posted Sat, 24 November 2012 at 2:46 AM
This is easy in DAZ Studio 3 (surfaces tab, '>' button top-right, 'Load UV Set...', select the OBJ file for the current item that has the alternate UV map).
I'm sure I've done the same thing in Poser (6) before, but I just can't find it now! I've checked the User Manual, Googled... zilch. Or maybe I'm off in cloud-cuckooland and I'm imagining things!
Soooo....
Q1: How do I use an alternate UV set in Poser? (It's for a simple prop)
Q2: How do I save that alternate UV set to the PP2? (And can the PP2 include both default and alternate UV sets?)
(As usual, Poser 6 compatible answer preferred)
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
obm890 posted Sat, 24 November 2012 at 3:44 AM
Are you making a prop or is it an existing prop? I've never heard of swapping UVs inside of Poser, but then I didn't know DAZ Studio could do it internally, so that's not saying much :-)
How are the extra UVs stored, as another obj file or in some other format? The obj file format itself can only contain one set of UVs, so I take it you have 2 objs, each with different UVs? I would think the easiest solution in Poser would be to make 2 props, one pointing to each of the obj files. Or if you have one prop already, just edit the pp2 file changing the line that calls the geometry file, make it point to the other one.
Edit: I've just had another thought: Geometry swapping is possible in Poser (or it's possible to make figures and maybe props which exchange one chunk of geometry for another at the turn of a dial) so they would swap UVs too. I'll leave it to someone more knowlegable to tell you how to do that though, I've done it before but I can't remember the process.
3dcheapskate posted Sat, 24 November 2012 at 7:03 AM
It's my S.E.Asian Shields in Renderosity Freestuff (the geometry was modeled and UV mapped in Blender, exported in OBJ format, imported into Poser 6, and saved as a PP2)
The alternate UVs are in a separate OBJ (I redid the UV mapping in Blender and exported an alternate OBJ).
You've confirmed what I suspected about OBJ files - only one set of UVs.
Making an alternate PP2 would work for sure, but not quite what I want.
Geometry swapping rings a bell though - that might be what I was thinking of...
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
lesbentley posted Sat, 24 November 2012 at 12:40 PM
There are two parts to geom switching, a list of the alternate geometries including thir paths, and a 'geomChan' channel to do the actual switching. The text below is a snippet from the attached file, and shows the relevant code in green and orange. The orange bits are variable, meaning you can edit them to suit your own purposes.
prop box_1
{
name box_1
on
bend 1
dynamicsLock 1
hidden 0
addToMenu 1
includeInDepthCue 1
parent UNIVERSE
alternateGeom Geom_1
{
name Geom_1
objFile 1001 :Runtime:Geometries:props:ball.obj
}
alternateGeom Geom_2
{
name Geom_2
objFile 1002 :Runtime:Geometries:props:cone.obj
}
channels
{
geomChan AltGeom
{
uniqueInterp
name AltGeom
initValue 0
hidden 0
forceLimits 1
min 0
max 2
trackingScale 0.045
keys
{
static 0
k 0 0
}
interpStyleLocked 1
}
lesbentley posted Sat, 24 November 2012 at 1:30 PM
If the prop is parented to a figure, another way to swap the geometry is to use a pose file to inject the new geometry. Here is an example of such a geometry injection pose:
{
version
{
number 3
}
prop box_1
{
storageOffset 0 0.3487 0
objFileGeom 0 0 :Runtime:Geometries:props:ball.obj
}
}
Note that a pz2 (pose) like the one above can only be applied to a prop if the prop is parented to a figure. Also, the pose is specific the exact internal name of the prop, in this example "box_1". If you load a second instance of the prop, it is likely to be given a different name, eg "box_2", and therefore the pose will not work on this new instance.
You can overcome the specific name problem by addressing the item as 'actor $CURRENT', but this carries its own dangers as the geometry can then be injected into absolutely any selected item, including a body part, and if it is injected into the wrong thing, there is then no easy way to restore the default geometry to the item.
markschum posted Sun, 25 November 2012 at 11:00 PM
You can change uv mapping via python script. The only problem is creating a file with the new uv coordinates in the same vertex order as the existing geometry.
If someone has a geometry file with alternate uvs I would like to see it for a test.
lesbentley posted Mon, 26 November 2012 at 7:33 AM
markschum,
The free Antonia Polygon 1.2 figure comes with two alternate UV mappings. These are used in two separate cr2 files 'Antonia-1.2.cr2' and 'AntoniaA-1.2.cr2'. These figures are exactly the same except for the UV mapping of their respective obj files (AntoniaA-1.2.obj, AntoniaA-1.2.obj).
markschum posted Mon, 26 November 2012 at 9:22 AM
thanks Les , I will have a look. I am so far out of date with Poser 7 that I stopped looking at what new stuff was being released.
bagoas posted Mon, 26 November 2012 at 12:48 PM
If you want to expand: there is even a third mapping for Antonia, featuring a V3 style mapping.
3dcheapskate posted Tue, 27 November 2012 at 4:23 AM
Thanks Les,
For a simple prop like mine alternateGeom seems to work nicely - calling the dial "UV Mapping" and limiting the range to 0 (default) or 1 (alternate). Separate CR2s or Python isn't really necessary for this particular case.
Cheers,
Pete
P.S. Kuroyume's unofficial CR2 spec says the number following the 'alternateGeom' appears to something Mac-related - any special reason you used 1001,1002? Also noticed (just an observation) that the order in which the dial selects the alternate OBJs seems to be based purely on the declaration order within the CR2, nothing to do with that number, i.e.
0 - default geometry
1 - first alternateGeom statement (i.e. ball)
2 - next alternateGeom statement (1.e. cone)
...etc..
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).
lesbentley posted Wed, 28 November 2012 at 10:52 AM
Q:any special reason you used 1001,1002?
A: I learnt how to do alternateGeom stuff by studying the old 'Skeleton Woman.cr2', which uses altGeom for the hands. The format used in that file is sequential four digit numbers, with a "1" in the thousands column. I just followed the same format, and it works for me, though I have no idea why it is so.
In the Poser figures, the geomChan is always placed as the last channel in the channel stack. I doubt it makes a difference in a single part prop, and it may not even make a difference in a figure, but there again, it might, I don't know for sure.