PDA

View Full Version : i FIXED SDS UV MAPPING... ala MAYA



jin choung
01-18-2004, 05:48 AM
howdy fellows,

well, i just have a feeling that a MAJOR GROUND UP TOTAL TEAR DOWN rewrite ala XSI/MAYA to SI/PA is not in the cards for lw - for the forseeable future anyway (just a gut feelin') - so i didn't think it was possible for us to have distortion free SDS uv mapping which seems to rely on having HISTORY at the very least.

BUT

in figuring out how the MAYA system works, i do believe that i've engineered a very simple system that will in effect do what the maya scheme does without requiring a history or other aspects of more recent software design.

in other words, the classic and familiar LW WORKAROUND.

first,

-----------WHAT MAYA DOES TO OVERCOME DISTORTION--------------

after you are done creating your model, let's say that you have a
pretty low density mesh that would be perfect for skinning and rigging but it would distort a lot in uv space. maya allows you to STEP UP YOUR CAGE RESOLUTION arbitrarily and create your uv map on the highly curved and subdivided state which would result in VERY LITTLE (negligible) distortion.

note, that maya never puts the higher order SDS patch curves in uv space to overcome distortion. only polys. and that's why we in the lw world can follow.

the great thing about maya though is that after you get the uvs that you want, you can STEP DOWN YOUR CAGE RESOLUTION back to your low density base so that you can WEIGHT MAP and SKIN on that much more manageable and pleasing cage! lw cannot do that. we could indeed make the base mesh much denser and curvy for uv's sake but then we'd have to skin that! not good.

--------------------------WHAT WE CAN DO IN LW--------------------------

the basic idea is this - since we cannot STEP BACK DOWN the resolution of the cage, we create TWO COMPLETELY UNRELATED (not entirely true but i'll get to that) MESHES:

- one will be the LOW POLY CAGE that we skin but cannot texture without distortion.

- the other will be the HIGHER POLY CAGE that we can texture without distortion but don't (!!!) want to skin.

--------------------------------METAMATION-----------------------------------

we do this with METAMATION!!!

the LOW POLY CAGE is skinned and rigged as we want. but that lower poly cage is not what's rendered.

instead, that low poly cage is DRIVING THE DEFORMATION of the HIGHER POLY CAGE.... this deformation is according to POINT ORDER and in effect, it is exactly the same as having the low poly cage become subdivided by SDS.

you will note that at this point, we are NOT using lw's real time SDS surfaces!

both the higher cage and lower cage are simply polys. the higher one is derived by using METAFORM PLUS in modeler.

BUT

the really cool thing is, if you put the SUBPATCH ORDER to LAST, you can hit tab on the HIGHER POLY CAGE and then this higher poly cage WILL be lw's RT SDS and can become as dense as you want/need in layout and the textures will not distort because anymore because your uvs were created from a mesh that was sufficiently curvy and dense enough to begin with.

------------------------------------------------------------------------------------

this does mean that the lowest resolution cage you can render is the HIGHER POLY CAGE (because that's the lowest res cage that is textured).

but because the higher poly cage is sds, you can become as dense as you need for film work and such.

------------------------------------------------------------------------------------

so basically, we're using our METAMATION link with multiple geometries in order to overcome our inability to jump up and down a hierarchy.

---------------------------SAMPLE SCENE--------------------------------------

i've included a SAMPLE that shows how this will work on a simple cube. we would not be able to uv map this base low poly cube geometry if it were sds but this method shows the smooth version having a perfectly undistorted uv map and able to go to a much higher poly count by simply setting the subpatch density in layout.

BEFORE YOU TRY THE SCENE: YOU MUST LOAD THE METAMATION PLUGIN FROM YOUR LEGACY_PLUGINS FOLDER.

also, in order to do this yourself on your own models, you must load in the METAFORM plugin from legacy as well. this is the metaform plus plugin from lw 5.6c days.

-------------------------------------NOTE----------------------------------------

because you are essentially uv mapping and texturing simple polys, you can use third party apps like DEEP PAINT 3D and DEEP UVS without reservation.

because you should note that SDS surfaces from ANY APP are currently incompatible with third party apps like 3d painting solutions.

------------------------------CAVEATS & BUGS--------------------------------

the nice thing is that your model relies on the subdivision algorithm of the NON-RT metaform plus. a much nicer subdivision algorithm than our current RT version - results in much less pinching and also can handle N-GON polys greater than 4 sides.

1.
but because of that, you can't use specific aspects of SDS now like VERTEX WEIGHTING because there is no such thing in metaformplus.

also, this can become a BIGGER PROBLEM in the future because if newtek fails to create a distortion free uv mapping method for SDS, whatever OTHER advances that they make such as EDGE WEIGHTING will become utterly useless because we will still have to go back to metaform plus and metamation in order to work with final, textured models.

2.
so after working this out, i thought, hey alright, we're now ready for prime time and we could do a very similar workflow to WETAs for the last two LOTR movies. we can even generate a DISPLACEMENT MAP of high frequency detail from the excellent free app:

http://www.soclab.bth.se/practices/orb.html

but an essential lw bug still remains - IT IS IMPOSSIBLE TO APPLY A DISPLACEMENT MAP (bump, normal or otherwise) ACCORDING TO A UV MAP!!!!

you still have to use the legacy projections and that just won't do. this must be fixed at a level that i have no hand in.

-------------------------------CONCLUSIONS----------------------------------

because newtek failed to provide a clean way to uv map SDS surfaces when it enabled us to take SDS right into LAYOUT, thus 'making it more than a modeling tool', SDS in lw wasn't quite ready for prime time.

this method recognizes that and basically ends up relegating SDS in lw again as basically just a MODELING TOOL again.

but considering the lack of CROSS COMPATIBILITY of fully textured SDS surfaces between major 3D apps as well as with important 3rd party tools like 3d paint apps, i feel that SDS as a primitive type is actually not quite ready for prime time.

in any case, we now have an internal lw method to uv map sds surfaces - in a manner of speaking.

TyVole
01-18-2004, 06:13 AM
Welcome back, dude.

jin choung
01-18-2004, 06:15 AM
gee,

thank you very much. glad to be back.

jin

Karmacop
01-18-2004, 07:22 AM
Nice work around, just wish you'd put your time and effort into something useful ;)

blabberlicious
01-18-2004, 09:00 AM
Originally posted by Karmacop
Nice work around, just wish you'd put your time and effort into something useful ;)

What a joker!

Seriously, I am totally with Jin about this, and appreciate the effort he is putting into to find a way round this lamentable omission to LW UVing.

Just getting people to understand the problem is exhausting!

jin choung
01-18-2004, 09:10 AM
Originally posted by blabberlicious

Just getting people to understand the problem is exhausting!


HAHAHAHA!!!

that is SOOOOO perfectly apt!

HAHAHAHAHAHA!!!

alas, the problem is compounded simply because lw has had a legacy tradition of texture mapping that is VERY DIFFERENT than the other guys!

actually, JUST UV MAPPING ITSELF is singularly difficult for some die hard lwers to grasp because of that unfortunate tradition....

same thing with weight mapping vs. the bone hot dog zones....

jin

Karmacop
01-18-2004, 09:39 AM
The thing is, nothing can really be done about it. The only work around is to change the uv's, pure an simple. The easy fix is to use more polys so you don't get an ugly distorted mesh in the first place.

claymation
01-18-2004, 09:50 AM
I haven't full explored this work around but if you copy your mesh to a new layer then freeze it at a higher sub-d level when you paint it's UV Map images wont they be undistorted when used on the unfrozen mesh in the same file?

My computer is dead so Ihave to try this later to see if this is actually workable.

Jay

blabberlicious
01-18-2004, 09:54 AM
(apologies if I veer wildy off topic)...)

For all you LW knockers (me included)..

A story:


...I purchased Maxon's Bodypaint 2 in the vain hope of freeing me from the hell of UVing in LW.

Well it didn't work out like that;

The love affair with Bodypaints Projection Painting and UV editing soon died when I realised that it was hopeless for fine tuning of UVs...had no tools for alignment of UV points, no constrained dragging/stretching of point (or anything)....

and worse (much worse) it didn't understand many of Photoshop's layer modes - so that 'underpainting' a bump map texture with colour to produce a quickly shaded Colour texture is impossible.......trashing all those stacked layers that made up your carefully constructed .psd imagemap.

and finally...I after getting nowhere trying to explain the issue to their friendly technical support - I had to send them a QT movie PROVING that the UV to LW export plugin for macs wasn't working...

All this took me weeks, plus the time time I spent learning the apps (and realising that it wasn't '3D for the Real World', as it claimed.

I spent more time explaining to them what was missing adn why than I did gettng any use out of it.

Meanwhile, in order to make a living, I had to learn to prep UV in LW.

Which frankly was my worst nightmare come true...

But as it turned out...I'm comfortable with it now. Apart from the distortion issue and needless unweadling, etc...its ok.

Lynx3d's UV generator gives me almost as much control as BP II - but will better point editing....and it was free!

If they port the recent Super UV tools
to the mac (please) then LW will have much of BP's good UV functionality within the app.

(BP's Distortion free paintng is nice, but it sure as hell slow, and cumbersome to use on large models....believe me)

Maxon offered me a refund, which is decent of them - and no reflection on a product that has great potential (sometime soon, just not now)...They were 100% more responsive than NT, but obviously overstreach and in a harry to release the product

(where have I heard that before?)

So the moral is:

For all it's faults LW is pretty ace at 90% of what you need to get done....

So repect to da NT massive!

Unfortunalty, the other 10% seems to have fallen into the pit of confusion and despair known as NT's development strategy...

Guys, we love the Layout / rigging stuff....
but us artists like to see more than a few nulls flying about in layout.

They tend to look nicer when they are mapped & textured well ;-)

So who do we hassle to get taken seriously????


'UV'ers of the world unite - you have nothing to lose but your nurbs!'

Hiraghm
01-18-2004, 10:18 AM
where can we find Lynx3d's UV generator?

jin choung
01-18-2004, 10:26 AM
karmacop and claymation,

right, that's why maya's own SDS mapping solution DOES rely on just making your mesh dense enough so that you don't get distortion.

BUT

in maya, you don't then have to SKIN and RIG that density! you can STEP BACK THE RESOLUTION BACK DOWN for weight mapping purposes.

------------------------------------------------------------------------------------

two separate questions:

1. how dense do you need your mesh to be to properly SKIN and RIG for character/skeletal animation.

2. how dense do you need your mesh to be to UV MAP without distorting.

in maya, you the answer to questions 1 and 2 can be DIFFERENT! and frankly, depending on your model, the answer to 2 will likely be greater than the answer to 1.

and skinning an unnecessarily dense rig is not my idea of a good time.

in lw, without the workaround, the answer to the above 2 questions must in the end be the same - so the answer ends up being 'WHICHEVER IS GREATER'.
------------------------------------------------------------------------------------

but as for just laying out uvs for straight polys, i think lw is really great. it IS odious that we have to constantly UNWELD/MERGE but other than that, it's a lot faster and direct than even MAYA.

and yah, lynx3d did a true service to the lw community by FIXING TEXTURE GUIDE!

i have to skin/rig everything in maya for export to a game engine but i do all modeling and uv mapping in lw.

jin

p.s. personally, i can't afford deep paint 3d or body paint but personally, i actually don't want to give up PHOTOSHOP for most of my image processing. i actually don't need a PHOTOSHOP replacement. in that case, for initial markup and roughing things out and eliminating seams in 3d, i find this the perfect tool:

http://www.terabit.nildram.co.uk/tattoo/

you MUST have your uvs already laid out but after that, it allows you to paint on the object very reliably.

so by jumping between lw, tattoo and ps, i've found a very pleasing and affordable texturing workflow.

btw, tattoo is 25 gbp!

CB_3D
01-18-2004, 10:38 AM
Seems surreal to me that it should be so difficult to develop a "Relax UVs" tool. Isnīt it just the reversion of the effect that SDS has on the UVs. That should be easily done if one knows the aproximate SDS level you-ll use in Layout..

CB_3D
01-18-2004, 10:39 AM
And wouldnīt the problem be gone, if we could see SDS in the UVtexture window?

sire
01-18-2004, 10:46 AM
If LW UV mapping is your worst nightmare than you haven't experienced what I did. In 1998 I was modeling and texturing for a video game. While I used LW for most of it, there was no UV mapping support in LW at the time(pre version 6), so I had to use Softimage 3D for this. UV mapping was done in a special module, similar to Vertex Paint in Modeler, called "Paint" and actually was not much more gifted than MS Paint. It was a huge pain in the you know where to edit the UVs with this tool. It only featured the most basic functions, and even they were not very well implemented. Everytime Paint was called, I had to literally wait minutes since ALL textures in the scene were loaded, although it was only possible to edit one object at a time with it (without seeing its surroundings while in edit mode). Crashes were not exactly rare, too. In comparison to that, todays LW UV mapping is paradise. Also the Bodypaint UV editing features are not bad.

Anyway... The workaround Jin suggested for the UV distortion problem might also work without Metamotion, I guess. With Metamotion it is only possible to use hires-versions of the model which are subdivided with Metaform Plus. Alternatively one could use MD_MetaPlug. This would require an MD_Scan of the lores model each time something changes in its animation, but in LW8, as it seems by Protons demos, something like this could be much easier to set up and resulting in something better integrated.

wacom
01-18-2004, 10:48 AM
Not that this will solve the problem...but it might take 1% of the pain out...

http://www.respower.com/page_superuv

I'm sure you already use this though Jin as your uv explorations are far reaching. Keep on trucking.

On another note I'm glad to see that this issue "could" be so "easy" for NewTek to fix- because it NEEDS to be fixed. They've thrown around that 8 will have improvements on this issue...but right now I don't see them on the list...

Why did they retract their claims? Lets just hope that they're trying to get it right this time instead of ignoring the issue...

Kvaalen
01-18-2004, 12:10 PM
Originally posted by wacom
They've thrown around that 8 will have improvements on this issue...but right now I don't see them on the list...


When did they say that? I also hope they fix the problem soon.
There are some work arounds, but it would be nice to have a quicker fix.

blabberlicious
01-18-2004, 12:14 PM
Originally posted by sire
If LW UV mapping is your worst nightmare than you haven't experienced what I did. . Also the Bodypaint UV editing features are not bad.


No...I better qualify that. It was a steep learning curve....but that's practically any 3D app for you....

a rocky, un sign posted path at the best of times....

Which is why forums like this are so invaluable.

...stop me!..I'm getting moist!

iFX
01-18-2004, 02:23 PM
Wow... and I thought I was the only one that used metamation ;)
Well, not for a long time (in fact I didn't even know it still worked in 7.5)...

But I used to love it back in the pre L[6] days... Though everyone I ever talked to about it always complained that it was too hard to set up or crashed a lot etc. - If it was set up in the right order (not difficult), I rarely had problems.

And with support for 5+ point polys, and what seemed to be a better looking mesh (from Metaform Plus), changing to L[6] always seemed a step backwards to me (at least in this area). I made plenty of requests for an updated Metaform Plus (that supported UVs and Morph Maps etc), but was always told that I should stop using Metaform Plus as it was on it's way out for good :(

CB_3D
01-18-2004, 02:42 PM
A shame, really. In 5.6 i began modelling with a lot of 5point polys to in- or decrease mesh resolution locally. And they animated and smoothed just as well as a "clean" quad mesh. Apart from that todays SDS implementation is much more elegant, though.

JDaniel
01-18-2004, 03:02 PM
Nice to know you're still searching Jin.
What about 8's animate uv's? Maybe we can morph uv's smoother.

JDaniel
01-18-2004, 03:22 PM
Originally posted by jin choung


but an essential lw bug still remains - IT IS IMPOSSIBLE TO APPLY A DISPLACEMENT MAP (bump, normal or otherwise) ACCORDING TO A UV MAP!!!!


This upsets me too. This means we can't take advantage of Z-Brush's new features. :confused:

isnowboard
01-18-2004, 06:07 PM
This has to be in the pipeline for the new development team. It's really hard to ignore. Whether it's in LW8.0 is the mystery. I love Jin's enthusiasm!

fortress
01-18-2004, 07:52 PM
but an essential lw bug still remains - IT IS IMPOSSIBLE TO APPLY A DISPLACEMENT MAP (bump, normal or otherwise) ACCORDING TO A UV MAP!!!!

im not sure i understand this or agree with it jin could you explain this one a bit more

JDaniel
01-18-2004, 09:16 PM
It just dawned on me Jin, kinda ironic, about a step I just added to my workaround. I think It is sort of similar to your process. It even looks pretty good w/out my baking process.
What I did was, copy my low poly(hi sub div level) head (with unwrapped and relaxed endomorph {UV2Morph.ls saves you time} ) and froze it at the final render level.
Then I went to the frozen unwrapped endomorph, made sure NURBS are re-activated at a LEVEL of ONE, and re-applied a new uv map to the original map. It will update if you select the name in the pulldown. (Use Clean uv Box when making UVmaps to keep all maps in the same space)
Now the UVs are smoother, because it has more points in the uvmap, but it has the SAME amount of POLYS as the low poly object (at it's hi sub div level) when rendering in Layout.
Hope that made since. :) I'm still searching too...

Edit: You can't morph them, even though they exist in the same 3d/uv space and have the same amount of polys, because the point count is different.

Karmacop
01-18-2004, 09:31 PM
Jin's example is fine, but with connected polys it doesnt'work so well. You can't these uvs are getting distorted.

Tesselator
01-18-2004, 10:09 PM
Here's some links that may be usefull to this discussion:

http://www.dstorm.co.jp/estorm/estorm_itemSpec.php?itemno=30
and
http://www.dstorm.co.jp/UVEditPro/

I'll be back later with a translation of the Japanese if
there isn't one on-line. :)

Karmacop
01-18-2004, 10:36 PM
http://www.dstorm.co.jp/DS_E/uveditpro/index.html

;)

JDaniel
01-18-2004, 10:56 PM
Those are good tools. But, we can do all that in modeler already. :)

Tesselator
01-18-2004, 11:36 PM
Originally posted by JDaniel
Those are good tools. But, we can do all that in modeler already. :)

No, it adds some functionality and gives you a slik gui to
play in which speeds stuff up ALOT for me. I've been using
it for awhile now at school and it's pretty woth the $100
pricetag. There's a save disabled DL of it somewhere.
Take it for a ride. With it, PS, and a reg texture I don't
really need Tattoo anymore.

I'm hopping that a hybrid of Tattoo and UV Edit Pro
will be included with 8.5. Almost everything needed
is already made and ready to go.

Anyway I'm not skinning Chars exclusively so usually I can
cheat the SDS-UV distortions if I ever see any, by adding
a poly band here and there and making sure the maps are
high enough res.

I do think jin's journey to the perfect UV is admairable and
worthy! I hope he writes up a feature request with specifically
what's needed to solve it. ( [email protected] and
[email protected] ) I want perfect 100% distortion free
and hastle free UVs and who better to say how than guys like
you all here that actually have to use them for a living. :D
Now is the best time to get this in for the 8.5 release I think
too. :cool:

Karmacop
01-19-2004, 12:08 AM
distortion free subd's is impossible ...

jin choung
01-19-2004, 01:30 AM
karmacop,

you gotta stop saying that! it may (or may not be - again, i only know how lw and maya does it) be true in a literal sense.

but FUNCTIONALLY SPEAKING, maya has a solution. we do not.

---------------------------------IMPORTANT------------------------------------

KC, your example is MISLEADING. it is IMPOSSIBLE to do uv projections onto the high density version of the mesh and get YOUR RESULT!

so the order is: 1. CREATE THE HIGH DENSITY VERSION. this high density version is JUST PLAIN POLYS - created with metaform plus.
2. select the object or polys and use the existing uv mapping projections to get your plain polys into uvspace.

you CANNOT get the results that you have by doing uv projections on PLAIN POLYS.

so you should always and only be doing uv mapping on STRAIGHT VANILLA POLYS!

it works.

------------------------------------------------------------------------------------

tess and wacom,

yah, those are great tools and the ones that tess mentions does indeed boast a slick interface and allows you to uv map without the hideously tedious need to CONSTANTLY UNWELD/MERGE which in itself is worth it!

BUT

neither have anything to do with defeating the distortion caused by SDS.

CB-3D,

relax uvs isn't the solution. it can indeed HELP certain situations if there are enough verts in uv space.

but the crux of the problem is this right now in lw - for 1 STRAIGHT EDGE in the low density cage, the SDS version has MANY edges that are now CURVING.

no amount of relaxing will really fix low density (and therefore problematic) areas.

nonetheless, i am ABSOLUTELY with you when you ask for that tool. it is INVALUABLE in modifying and mollifying the uvs in uvspace once you've done your projection of choice and are just trying to wrangle out problem areas and OVERLAPS.

and of course,

JDANIELS, the very first man who created an ACTUAL WORKING SDS UV MAPPING SOLUTION and showed me it was at all possible! hail! :)

yup, still searching! as i've said before, your solution is ingenious and it DOES ABSOLUTELY WORK.

only thing about it though was that since it bakes out textures that are 'COUNTER DISTORTED' to COMPENSATE for the distortion, it produced image maps that were hard to work with and during production, i end up doing photoshop duty a hell of a lot and i'd end up with crossed eyes!

anyhoo, yah, my workaround is just that - a workaround and it is highly CLUNKY and INELEGANT.

and i really do hope that newtek can come up with a solution that is CLEAN and fast.

but alas, without radically altering lw's architecture, i am terrified that the ultimate and official solution may look just as clunky.

finally,

SIRE!!!

YES!!!

ABSOLUTELY!!!

THAT'S GREAT!!!

i was thinking about that too, about using MD SCAN as a way to give the deformation of the non textured SDS to a TEXTURED OTHER MESH!!!

but i have absolutely no idea how to work with motion designer!!! if you're willing, wouldja do a step by step using that solution? cause it is DEFINITELY a viable workaround as well and has advantages that mine does not:

it allows you to actually use existing SDS... with vert weighting. and later, if they come up with edge weighting and stuff, your solution would allow its use.

but there are drawbacks too:

it's not real time.... you have to finish animation on the untextured version before you bake out the mdscan and then assign that to the textured mesh.

and any changes won't be reflected until you re-scan and re-assign.

--------------------------------IMPORTANT-------------------------------------

ACTUALLY, if newtek simply gives us a REAL TIME ---> "FOLLOW MY DEFORMATION", that actually might be the IDEAL solution considering the current lw architecture.

------------------------------------------------------------------------------------

also, as i said, the METAFORM PLUS subdivision allows ngons and even with just quads and tris, it produces MUCH NICER RESULTS than our real time sds.

so those are the tradeoffs!

yah, if you write it down sire, that would be a great alternate for the community to be aware of!

rock on

jin

Karmacop
01-19-2004, 01:41 AM
Jin, your example doesn't have any distortion because you're using atlas mapping. What if you wanted to use your own uv map?

How does XSI, max, maya etc change a uv map set out in the way I have done it? IE start with the uv polys aranged in a cross pattern and then subd.

jin choung
01-19-2004, 01:49 AM
karmacop,

as i said, my method will work with ANY KIND OF UV MAPPING TOOL AVAILABLE IN LW!

use any of the existing tools on the STRAIGHT POLYS to generate your uvs - you can use atlas, planar, spherical, cylindrical-

WHATEVER! ANY AND ALL UV MAPPING THAT YOU CAN DO ON STRAIGHT POLYS WILL WORK WITH MY WORKAROUND.

you can even start cutting apart the pieces in uv space and moving them around!

and no matter what,

YOU *CANNOT* GET YOUR RESULT IN UVSPACE!!!

there is a disconnect somewhere between us....

but rest assured - IT WORKS.

jin

jin choung
01-19-2004, 01:52 AM
hold on for an example....

jin

Karmacop
01-19-2004, 01:56 AM
My result is basically what a uv metaformed would look like though ... but I see your point.

jin choung
01-19-2004, 02:21 AM
hi karmacop,


(actually, look at last paragraphs and come back - that's probably gonna be a hell of a lot clearer)

in maya, if your 'cube' -let's say- is laid out in a cross and then you turn it into a subdivision surface, it would do the same thing it does in lw:

if the base resolution is upped, the existing cross pattern still retains the EXACT SAME OUTLINE and each of the boxes just get subdivided with STRAIGHT LINES.

------------------------------------------------------------------------------------

again, this is JUST LIKE LW.

AND AGAIN, YOU WOULD GET DISTORTION!!!

the thing is, you DO NOT create uvs on this lower density mesh arranged in a cross!!! this is true in maya and lw.

in maya, what you do is REFINE the 'cube' to a density so that it will NOT distort. and then, you create the uvs.

and the ONLY TWO OPTIONS for creating those uvs (on SDS) is with AUTOMATIC (ATLAS) or PLANAR!

thus, when you are at the proper resolution to create UVS, you CANNOT GET THAT CROSS SHAPE! you are absolutely right in thinking that "if we get that kinda smoothed, roundy cross, there's no way of NOT distorting with SDS". THAT'S RIGHT!

but then what you have to do is get that shape out of your mind - it is indeed a case where it cannot be solved.

IF YOU DO WANT TO GET THE CROSS LAYOUT,

you have to grab the large ROUNDED SQUARES and MANUALLY ARRANGE THEM in the cross using vertex snap and such (in lw that is).

yes, you are correct, it is NO LONGER A PERFECT CROSS THEN! the corners of the ROUNDED SQUARES are pulled apart from each other.

but this is the precise thing that then allows us to paint on the resulting UV MAP PAINT TEMPLATE WITHOUT DISTORTION.

the seams from the corners being pulled apart is not the uv mapper's problem. that is for the painter to contend with and it is indeed his (frequently mine) rightful duty.

THAT is how distortion is overcome.

jin

p.s. this is gonna get at two technical reasons why you will never get your roundy cross shape:

1. in the SDS model in 3d space, all corners are WELDED. you only get the kind of rounding at the arms of the cross if those were UNWELDED verts! so the picture that you are showing does not in fact represent the actual shape of the sides of the cube sds.

2. ANGLE OF VIEW or PROJECTION is important. as we've noted, in SDS, a single STRAIGHT EDGE becomes MULTIPLE EDGES that form a CURVE.

but the SHAPE OF THE CURVE DEPENDS on whether you are viewing the curve from the TOP or BOTTOM or SIDE!!!

depending on the angle of view, the curve may be a speed bump, a dip, or even straight.

so to properly project an SDS surface (higher order curve) into UV SPACE (and not poly approximations like both my workaround and maya's method), the app would have to REMEMBER from what ANGLE PROJECTION was used to get it into UV SPACE and would also have to create the ACTUAL SHAPE compensating for WELDED (instead of unwelded verts).

so for the above, in maya, you use a subdivided approximation of straight edges and they only give you PLANAR and AUTOMATIC.
------------------------------------------------------------------------------------

ALSO, think of it like a PAPER MODEL... you COULD in fact unwrap a paper cube into a cross.

YOU CANNOT unwrap the rounded version of the paper cube and still have the corners meet!

and if you think about UV MAPPING as SKINNING A CAT (skin is xyz) and then tacking him onto a FLAT BOARD (which is parameterized uv), then the paper model example is absolutely a faithful representation of the situation.

j3st3r
01-19-2004, 03:21 AM
Hey guys...Have you checked Proton`s head in his topic of male head? He posted a wire on textured shaded image of the subpatch object, and I haven`t seen this dreaded problem on that. Actually, maybe they corrected this bug? I suppose. If Maya could do that, LW could also. I don`t think it`s a big deal, I suppose, it`s just a recomputing the UV for the subpatch model.

jin choung
01-19-2004, 03:28 AM
the issue is DENSITY,

if the proton head is SUFFICIENTLY DENSE ENOUGH, it will indeed uv map without distortion (or visible distortion... same diff).

but if you take the example of the taron head included in lw, if you did a uvmap of that and tried painting it, it would result in HORRIBLE, TERRIBLE, distortion.

it'll make your eyes bleed.

seriously.

well, if it's an easy fix, they're right lazy, culpable wankers aren't they? :)

i actually think it's a legitimately DIFFICULT problem. maya does indeed have a solution but it relies heavily on having a history and its inherently more complex architecture.

given the state of lw's architecture, it would be hard to even CONCEIVE of a solution that is not basically something like the workarounds noted.

jin

Adrian Lopez
01-19-2004, 04:30 AM
Originally posted by j3st3r
I don`t think it`s a big deal, I suppose, it`s just a recomputing the UV for the subpatch model. Edit: Oops... I just realized, I misunderstood what you were saying. I thought you were talking about recomputing UVs for the low-poly mesh, but you were most likely talking about recomputing UVs for the polys that make up the subdivided surface, right? In that case, I take back what I said, although I'm leaving my old post here for reference:


Recomputing UVs would accomplish nothing. There is no possible UV mapping under Lightwave's current rendering engine that would produce a distortion-free image when a low-poly SDS cage is rendered at a high subpatch level. It just can't be done, because Lightwave is taking the texture area occupied by the SDS cage in UV space and "wrapping" that over the corresponding area of the SDS surface. When large differences exist between the shape of the cage and the shape of the subdivided surface, the only way to avoid distortion is to use a properly distorted texture (it's interesting to note that Jin's method addresses the distortion problem by reducing the difference between the shape of the cage and the shape of the subdivided surface).

The only way to avoid distortion that I can think of would be to change the way Lightwave determines which bits of texture go with which bits of surface (in other words, it would require a change to Lightwave's UV interpolation algorithm). Essentially, you would end up working directly with SDS patches in UV space, as opposed to the current method of working with the SDS cages.

jin choung
01-19-2004, 04:48 AM
hey adrian,

the way that i figure it, the only way that you can have SDS in uv space is:

1. it has to remember from WHAT PROJECTION (VIEW ANGLE) it got there in order to correctly curve edges.

and

2. it has to put 'phantom' verts everywhere in uv space so that verts that are welded in 3d space don't get 'curved off' as if they were unwelded.

needless to say, this would result in a hell of a lot overhead - especially when considering that EVERY PART that you project into uvspace would have to have the above.

------------------------------------------------------------------------------------

you are absolutely correct in saying that the workaround method merely avoids distortion by MINIMIZING THE DISCREPANCY - that is, getting the uvs when the mesh is closer to the LIMIT SURFACE than it is to the CAGE.

so it is true that you never get rid of the distortion entirely.

but i figure that at a certain level, it simply DOES NOT MATTER - for all intents and purposes - no distortion.

and basically, i got the idea by figuring out how maya does it. frankly, i can't imagine how the other apps approach the problem - max, xsi, c4d.... what the hell do they do?

jin

Adrian Lopez
01-19-2004, 05:18 AM
Originally posted by jin choung
but i figure that at a certain level, it simply DOES NOT MATTER - for all intents and purposes - no distortion.That's quite correct. If the model were subdivided enough so that a single poly corresponds to a single pixel, there would be no distortion at all, and you probably wouldn't need quite that level of accuracy.

Adrian Lopez
01-19-2004, 05:36 AM
J3st3r,

In case you haven't noticed, please take a look at my edited reply to your post. I misunderstood what you were saying, so I've changed my post to reflect that. I feel so silly :o :(.

Oh well... the only problem I can think of when recomputing the UV values of the subdivided mesh is that the way these UVs are arranged would depend on the model's subpatch level, and changing the subpatch level on a model that is already textured could, in some cases, introduce undesirable artifacts.

Karmacop
01-19-2004, 06:57 AM
THanks for explaining things Jin. I see this work around, and I guess even technique to be fairly useless for the way I create uv maps and models, but if you and others find it useful I guess that's all that matters :)

EDIT: Sorry if it sounds as if I've been getting angry with you or anything, I hope you didn't take it that way. Sorry if you did :(

papou
01-19-2004, 07:47 AM
Originally posted by Hiraghm
where can we find Lynx3d's UV generator?
U can find it in the third party forum:
http://vbulletin.newtek.com/showthread.php?s=&threadid=1272
much better than texture guide.

j3st3r
01-19-2004, 07:50 AM
Check out that head guys. There is NO artifact, and it`s really low polycount subdiv cage. I think they`re over that problem. Check out the video of Texturewire also, you`ll see the same. I risk to suppose that this is eliminated

sire
01-19-2004, 08:23 AM
Originally posted by jin choung
but i have absolutely no idea how to work with motion designer!!! if you're willing, wouldja do a step by step using that solution?
Okay, here's the deal:

1. Set up your animation with the lores model

2. Add the MD_Scan displacement plugin. It has to be the last in the list.

3. In the MD_Scan properties, select an MDD filename. The MDD file is basically a point level bake of your model's animation. Usually the First and Last Frame values have to be changed appropriately, too.

4. Click OK and make a preview of this time span. During this preview MD_Scan retrieves the point positions (it's similar to the F9 render which is required for VIPER to work).

5. Open the MD_Scan properties again. This time only the filename and path will appear. Click OK. Now the MDD file will actually be saved.

6. Now hide or delete the lores object and load or, if already loaded, select the hires version of the object and add the MD_MetaPlug displacement plugin to it.

7. In MD_MetaPlug's properties select the MDD file you just saved. Further on you have to select a Cage Object. This has to be a single layer LWO which just contains the lores version of the object.

8. Click OK and play the animation. The hires model should mimick the motion and deformation of its lores counterpart.

So actually this is not very difficult, compared to really using Motion Designer for dynamics.

However, there is one more thing you should be aware of. If the cage ie. lores object contains skelegons, which will often be the case, the MD_Scan has to be done on a duplicate without skelegons in it. Else MD_Scan will also scan the skelegon's points, which will lead to errors when the MDD is applied to the hires model.

To accomplish this, you can take the separate cage object, which you should save out with removed skelegons therefore. Add it to the scene and in Bones properties set "Use Bones From Object" to the original one with the skelegons. Now copy the displacement plugins (Joint Morph etc.) from the original to the cage object and put MD_Scan at the end.



it's not real time.... you have to finish animation on the untextured version before you bake out the mdscan and then assign that to the textured mesh.

and any changes won't be reflected until you re-scan and re-assign.

That's right, but shouldn't be too bad. Usually you are animating with the lores model anyway and only begin rendering when the animation is finished.

Looking at Proton's demo of FX_MetaLink, it seems to me the basic process hasn't changed that much. I suspect it will still require rescans in LW8.

JDaniel
01-19-2004, 12:58 PM
Overload.....tmi.
Idea, I'll be back. :p

sire
01-19-2004, 02:17 PM
Okay... This is the old school way... :)

Tesselator
01-19-2004, 07:35 PM
Originally posted by jin choung
tess and wacom,

yah, those are great tools and the ones that tess mentions does indeed boast a slick interface and allows you to uv map without the hideously tedious need to CONSTANTLY UNWELD/MERGE which in itself is worth it!

BUT

neither have anything to do with defeating the distortion caused by SDS.

--------------------------------IMPORTANT-------------------------------------

ACTUALLY, if newtek simply gives us a REAL TIME ---> "FOLLOW MY DEFORMATION", that actually might be the IDEAL solution considering the current lw architecture.

------------------------------------------------------------------------------------

rock on

jin

True enough on those tools. :)

"REAL TIME ---> "FOLLOW MY DEFORMATION" huh?

Do you mean calculate distortion, and then
automatically streatch the bit maps in order
to compensate?

jin choung
01-19-2004, 09:20 PM
howdy fellows,

wow... so between jdaniel's, sire's and my workarounds, we now have no less than 3 workarounds that really do work!

never would have thought it possible in lw.

------------------------------------------------------------------------------------

karmacop,

what in your posts sounded like you were getting mad?! nope, didn't take anything in any bad way whatsoever....

oh, and for clarification, when i use caps, it's consistently used in my docs as emphasis on important points. i'm NOT shouting (see...). in case that made ya think i was getting hostile or something.

it's cool. her hitler hairdo is making me feel ill.

------------------------------------------------------------------------------------

jester,

actually, you don't see the distortion because he painted squiggly lines! it's hard to check for squiggly lines if you're drawing squiggly lines!

seriously, if you take the taron head and project a grid on it with uvs, you'll see the distortion.

------------------------------------------------------------------------------------

tess,

the goal is 1. to have a fairly low density mesh that is ideal for skinning, rigging, animating and endomorphing.

2. but that mesh may not be dense enough to uv map without distortion.

SO

the method is to use TWO SEPARATE MESHES.

MESH 1 - the LOW poly cage gets skinned, rigged, etc. and then you hit tab on it - that results in a mesh that is the same density as mesh 2.

MESH 2 - is dense enough to uv map without distortion but was too dense to weightmap and endomorph.

"FOLLOW MY DEFORMATION" would simply look at what the verts of SUBDIVIDED MESH 1 verts are doing (which is the same vert count as MESH 2) and just applying it to mesh 2 which is textured.

and since 'follow my deformation' applies the deformation to mesh 2's base mesh (which is dense), you can also TAB mesh 2 as well to make it even denser if necessary.

shouldn't be too big of a deal of a deformation plugin to slap together either....

jin

JDaniel
01-19-2004, 09:38 PM
Jin, have you ever tried to tab mesh 2 at level 1 after it was frozen from mesh 1? Thus activating nurbs w/out adding polys.

jin choung
01-19-2004, 09:49 PM
hiya jdaniels,

actually, you WANT the base cage of MESH 2 to be higher... significantly higher... you WANT to add polys.

because it is the addition of these polys that gets the cage closer to the LIMIT SURFACE and so reduces and effectively eliminates the distortion.

the only reason it works is to make mesh 2 denser and 'curvier' when it's just polys.

jin

JDaniel
01-19-2004, 10:10 PM
Can you show an ex. some how w/ the Taron head?

JDaniel
01-19-2004, 10:14 PM
Where's that head at , can't find it?

JDaniel
01-19-2004, 10:34 PM
Here's my simple solution theory. Based on my baker tech. and what my friend told me about a script that was written at ILM to counter act distortion on certain areas.
So, we need a script that we can apply in layout to our sds objects , when rendering, that exactly counteracts LW's nurb algorythm on its uv's.
Whatcha think Jin?

Tesselator
01-19-2004, 11:42 PM
Tess wrote:

"REAL TIME ---> "FOLLOW MY DEFORMATION" huh?
Do you mean calculate distortion, and then
automatically streatch the bit maps in order
to compensate?
jin choung wrote:

"FOLLOW MY DEFORMATION" would simply look at what the verts
of SUBDIVIDED MESH 1 verts are doing (which is the same vert
count as MESH 2) and just applying it to mesh 2 which is textured.
and since 'follow my deformation' applies the deformation to
mesh 2's base mesh (which is dense), you can also TAB mesh 2
as well to make it even denser if necessary.

shouldn't be too big of a deal of a deformation plugin to slap
together either....

jin So that's a yes with qualifications? It looks like JDaniel is
thinking about the same thing too. Not sure it would need
to be in layout. And if the solution is to counter distort the
map the plug could be only run once and dump out disk based
images. no?

jin choung
01-20-2004, 12:24 AM
hey guys,

actually tess, my workaround does not involve stretching or futzing with the bitmap at all. you simply texture a high res mesh.

so far, that's one of the differences between jdaniel's method and the maya copy i worked out.

mine forces you to use two separate models connected by a plugin.

his method produces a bitmap that is counter distorted so that the pixels are placed 'weirdly' on weirdly arranged uvs. but that results in a 3d paint job that looks right.

if you keep around the ORIGINAL, unbaked, un-counter distorted version of the texture, and don't mind re-projecting when you edit it, then jdaniel's method will do ya.

but as i said, i just kept looking cuz i've had to re-do paint jobs constantly and it would be an extra step for me.

jdaniels,

actually, the 'compensation' for the uv is the thing that ends up being so difficult. so it seems that maya gets around it by just letting you texture on the high res version of the sds.

as i said in a previous post, that uv compensation would require the software having to remember the angle in which something is projected into uvspace and also keep phantom points around so that the uvs that are cut apart don't get rounded off in weird ways as if they were unwelded in the actual model.

so yah, i only know how maya does it - which basically AVOIDS THE ISSUE ALTOGETHER!

i really wonder how max, c4d, xsi and the guys at pixar are doing!

jin

jin choung
01-20-2004, 12:32 AM
hey sire,

to clarify - the mesh cannot have SKELEGONS but can (and should for character animation) have BONES right?

got it.

i thought you couldn't have BONES! and that would be a huge frickin' problem!

gee, but it should really really be possible to make a real time deformation plugin that just applies the vert movements from one mesh to another....

then again, since you can turn on the TAB for even the low poly version, it's not like you can't see the effects of deformation so ya... it shouldn't be too bad at all!

jin

JDaniel
01-20-2004, 12:57 AM
Jin, can't you do your workaround w/ out the plugin, by using a frozen copy of your low res object at a subdiv level of one for the hi res mesh? :confused:
Maybe we can animate the uvs of the hi res back to the undistorted position in vers8?

jin choung
01-20-2004, 01:11 AM
hiya jacky,

actually you are absolutely correct. if i simply made my 'low density cage' much denser by FREEZING it at a higher resolution and then just UV MAP THAT - NO DISTORTION!

but remember, i was looking for a solution so i don't have to WEIGHT MAP and CREATE ENDOMORPHS for a NEEDLESSLY DENSE MESH.

that's why we're using the plugin: skin/animate/morph on the low poly

uv map and render the high poly.

as for the animating the uvs -

OOOOOOOHHHH.... i see what you're saying. that would be nice but still not possible with lw right now.

because in lw right now, when you hit tab, even though the mesh in 3dspace is subdivided smooth, the geometry in uv space is STILL UNCHANGED! the number of verts DOES NOT INCREASE - unless you freeze. and you don't want to freeze.

so you CAN'T morph because there are simply fewer verts in uvspace for the sds model than in you hires model's uv map.

jin

Adrian Lopez
01-20-2004, 06:14 AM
Originally posted by jin choung
as i said in a previous post, that uv compensation would require the software having to remember the angle in which something is projected into uvspace and also keep phantom points around so that the uvs that are cut apart don't get rounded off in weird ways as if they were unwelded in the actual model.I don't know enough about 3D graphics to say so for sure, but I don't think keeping track of the angle would be necessary. Instead, you could do an (X, Y, Z) to (U, V, z) projection. Essentially, it's just like a UV projection but with an added depth component. This would be enough for Lightwave to determine the angle of the projection, plus it would allow users to manipulate UVs in 3d, like an automatic version of Aristomeni's unwrapping scheme.

As for keeping phantom points to prevent polys from being rounded off at UV seams, this shouldn't be necessary if the UV editor and UV algorithms are engineered to respect and take into account the welds in the model. Essentially, welds in UV space would be separate from welds in model space, and the UV-space curvature of polys along UV seams would match the UV-space curvature of their model-space neighbors (unless disconnected in model space).

JDaniel
01-20-2004, 12:00 PM
Jin, so I guess the plugin automatically gets the hi res mesh from a folder when it renders? Instead of having to manually replace objects when you set up each render.

I wish we could front project textures through multiple cameras surrounding your object, and have the texture stick to polys based on their normal direction. That way there's no stretching pixels caused by the incidence angle of the camera. Then just do one single Bake.
A man can dream can't he? I wish I could write this stuff. But then we'd never have time to do the fun part.

JDaniel
01-20-2004, 08:56 PM
Ok. So it turns out you CAN bake multiple front projections on a 3d mesh all in ONE Bake process. Just FIX the projections on keyframes w/ alphas. They will stick and hold for the Bake! Don't spin the mesh, but rotate the camera around the object. Don't go by open gl, go by the render. Now you don't have to use an unwelded endomorph if you don't want to. Just real 3d projection painting. :eek:

jin choung
01-21-2004, 12:13 AM
hey guys,

adrian:

yah, i don't know enough about the underlying code stuff either - i'm just assuming that if you do want to properly compensate, it's pretty much the same thing as HAVING the phantom points.

but i could be entirely wrong.

jdaniels:

actually, it doesn't load anything from disk - when you set up your scene, you just load BOTH the low and high in.

and the animation of the low drives the deformation of the high. and you just turn visibility of the low off.

actually, the projection thing is a nice balance between the LEGACY PROJECTION method and getting a usable template.

if you use the projections circa 5.6 on the SDS object, you don't get distortion either - and the 'alpha mapping' that one would do to create all the 'sections' of paint to cover the whole model is a known way to do it without uvs at all.

only difference with your projection method is that it is indeed possible to create a painting template simply by rendering. the drawback being that you can't really do cylindrical or sperical projections with the camera.

but then at that point, it's questionable to even BAKE to UVs at all!

actually, if you plan to work and stay in lw, it would NOT be necessary.

but if you wanted to send the low poly cage to SDS in another app, that would be a viable reason to.

alright!

looks like we'll have a book of viable workarounds soon enough!

jin

Tesselator
01-21-2004, 12:52 AM
Originally posted by jin choung
hey guys,

actually tess, my workaround does not involve stretching or futzing with the bitmap at all. you simply texture a high res mesh.
so far, that's one of the differences between jdaniel's method and the maya copy i worked out.
mine forces you to use two separate models connected by a plugin.
his method produces a bitmap that is counter distorted so that the pixels are placed 'weirdly' on weirdly arranged uvs. but that results in a 3d paint job that looks right.
if you keep around the ORIGINAL, unbaked, un-counter distorted version of the texture, and don't mind re-projecting when you edit it, then jdaniel's method will do ya.
but as i said, i just kept looking cuz i've had to re-do paint jobs constantly and it would be an extra step for me.


Ah, I see. Well IMO if it's a choise between working with two
meshes (which will both need bitmaps anyway) or working
with one bitmap and its extraploated brother.... I take the
2 bitmap method. :) Still ya know... So far I've only ever seen this stretching problem
a relatively very few number of times. But then again I don't
often get game char modeling jobs like you guys.

JDaniel
01-21-2004, 11:57 PM
Where is Aura 3D? 3d projection painting and uv paint tools are possible.
I just thought I'd drop another thought. :)

jin choung
01-22-2004, 12:21 AM
hey jdaniels,

well i wouldn't hold my breath on aura 3d... newtek doesn't have anything to do with aura anymore and it's called MIRAGE....

oh well....

jin

papou
01-22-2004, 01:58 AM
yeah!...Where is Aura3d?!
It's too bad...too bad...


:( :mad:

JDaniel
01-22-2004, 12:03 PM
Damn, I had forgotten about that. :confused: How abot Mirage 3d then? :D

Edit: "Newtek, If you build it, they will come."

neversummer
04-06-2004, 11:04 AM
Hi Everybody - for my clarification - I've attached a screen shot of a layout viewport of my heart scene.... you can see the UV Map distortion where the map ends (I only mapped the 'body' of the heart)..... the object has a display subpatch level of 6 in layout..... I can't get rid of those nasty distortions in LW 7.5c.... just wanted to know if this is what jin choung and other members are talkin' about

JDaniel
04-06-2004, 05:09 PM
Try to unweld and merge again w/ mouse over uv viewport.uv viewport.

neversummer
04-07-2004, 06:49 AM
Hi JDaniel:
I tried unwelding and merging with mouse over the uv viewport but I still get distortion where the uv map ends.... I've attached a render with a SubPatch Level of 0 and you can see the distorted poly's...of course the higher the subpatch level, the less noticable it is, but the render times are not feasible for animation....it's driving me insane! I thought about just making a spherical map using ernie wright's unwrap plugins but they don't work with os 10.3.3 :confused:

neversummer
04-07-2004, 08:12 AM
I forgot to mention that the uv map texture looks fine in the modeler viewports... the distortioin does not appear in modeler, only in layout... so I guess it has something to do with layout's sds?:(

jin choung
04-07-2004, 09:05 AM
actually,

that doesn't look like the distortion we've been discussing perse... it just looks like the image that you're trying to map to the uvs is cutting it TOO CLOSE to the border... so that the colors from the pixels from the other side of the border is bleeding over.

can you do a screen shot of your uvs with the texture bitmap behind it...

usually, OVERPAINTING is a good idea... that you're not doing like a coloring book of the uvs and trying to 'stay within the lines' if you don't have to.

also, for the triangles that have the light brown color, try SELECTING those in the model and see what triangles get hilited in uv view.... you may have doubled up geometry or something....

jin

neversummer
04-07-2004, 09:23 AM
hi, here's the uv map with the texture behind it.... I'll try pulling back the yellowish texture even more... and the geometry 'seems' to be okay...if this doesn't work perhaps someone with some 'free' time can take a look at my .lwo file sans textures... perhaps I made a crazy insane neewbie mistake :eek:

neversummer
04-07-2004, 09:36 AM
...and here is the alpha layer......

Roger Eberhart
04-07-2004, 03:36 PM
What do the UV's on the arteries look like? From the screen caps you've shown, I would suspect you're picking up the light color on those, not the heart.

JDaniel
04-07-2004, 11:01 PM
Yes, it's in the arteries uv's, not the heart.

jin choung
04-07-2004, 11:59 PM
hey neversummer,

i'll take a look at it for you. my email is:

[email protected]

and i promise not to rip you off or anything. :)

jin

neversummer
04-08-2004, 09:28 AM
thanks for your help guys, jin has shown me the way, and this is how not to do it:

I assigned the whole heart one surface, then mapped the main 'body' of the heart. Everything was assigned one surface, therefore:

"LW does not know what to do with the polys that are RIGHT NEXT TO the polys that have indeed been uv mapped because they SHARE THE SAME SURFACE AND THE SAME VERTICES. you're telling lw that it has to wrap the texture using the uv map but the polys have no uv map to use... but some of the verts that WERE mapped are shared with the polys that are NOT.... so lw gets confused and starts either repeating weirdly or you get a border."

whooooops!

hopefully any other newbie that has decided to do what I did will end up here and read this thread ........and smack themselves in the forehead!