View Full Version : newtek - i figured out SDS UV MAPPING!

jin choung
10-26-2003, 09:31 PM
newtek engineers,

behold, i have figured out how to do UV MAPPING without distortion onto SDS!!!

actually, i'm just manipulating discoveries by others and the fix doesn't actually involve UV MAPs but it's close enough. :)

first, some prereqs that you must be familiar with for my solution to make sense:

1) http://www.menithings.com/main.php?action=how&how_id=7&manual=1

2) http://www.jackydaniel.com/pages/Tutorial.htm

first of all, i think 1) by itself is just wonky as all hell because it's completely unnecessary! i mean why bother? i can do his results entirely within uv space using the uv projection tools!

second, solution 2) by jdaniels is brilliant because it JUSTIFIES a reason to unwrap your mesh in 3d space as suggested by 1). that reason is that when you do this, when you activate SDS, the edges will curve, getting rid of the distortion caused by still straight edges in uv space.

the only downside to jdaniel's procedure is that it requires a lot of steps and in the end, after baking the surface, you get a 'COUNTER DISTORTED' image map that is not ideal for editing again in the future.

now, what we've always imagined the solution being is having EDGE CURVATURE in the sds be reflected in uv space.

but the problem is that this would require lw to REMEMBER what PROJECTION WAS USED TO PLACE THE POLYS INTO UV SPACE.

that's no mean feat, especially since lw has absolutely no notion of history.


but maybe there's an EASIER SOLUTION if we try to solve the problem instead of trying to stick with the above solution.



we need to be able to generate a reliable painting template for SDS surfaces. sure, 5.6c circa projection texturing works but most people are used to using UVs (since they are industry standard in every other app) and having a painting template is really really helpful for precision painting.


take jdaniel's solution but eliminate the necessity to make UVs at all! never mind making uvs, never mind baking and creating a counter distorted image map.

instead, just enable us to make an ENDOMORPH that we can TAKE APART INTO PIECES and then do a planar projection onto the pieces (just like uvs and just like in jdaniel's and meni's examples). and lw will know to get its mapping info from this ENDOMORPH.

in addition, allow the 'BASE' of this endomorph to be COMPLETELY WELDED!!! right now, if you have an endomorph that is unwelded into separated parts, the base will also be unwelded at the seams of these parts.

but i would wager that allowing endomorphs to be unwelded while the base is completely welded is an easier solution than trying to show curvature of edges in uv space!

this seems to me to be essentially the same problem as allowing UVs to be unwelded while leaving the verts.

of course, lw can't even do that now but all other apps can and therefore it should be possible!

solution in simple terms:

1) a specialized ENDOMORPH THAT DETERMINES MAPPING for model.
a. this endomorph will take a 5.6c planar projection and it is
from this projection that we will take templates from. this
endomorph will tell lightwave that it will provide the
mapping coords.
b. this endomorph can be unwelded into arbitrary number of
'pieces' as in uv space but the BASE will remain welded.


we can forgo uvs for sds then because sds are inherently UNCOMPATIBLE between apps anyway so as long as a solution for distortion free mapping exists inside of lw, it is unimportant that it will not translate directly to other apps.

it seems technologically feasible!!! come on newtek!!! it's possible!!! let's do it!


p.s. the 'solution' for sds in maya is not ideal either and this solution would far surpass them. i am unaware of how max gets around this problem. but as i have been doing research into sds and texture mapping, it is absolutely shocking how ignorant all books are on the subject of this inherent distortion!

p.s.2. and while we're at it, let's get on enabling unwelding uvs while leaving the verts alone. mmmkay?

10-26-2003, 11:47 PM
Really great Idea Jin, I really do hope NT is Listening with ears wide open......

U should work for NT as a consultant...


jin choung
10-27-2003, 12:51 AM
thanks herve,

whew! hopefully that means that you read it and it actually makes logical sense.

it occurred to me kinda half formed in my mind and it could have very well been a quite incoherent, heat addled, pipe dream. (southern california is still hot as heck!!! ack!!! it's very very bothersome)

ya, i hope nt is paying attention too - certainly not me in particular but the entire community when they come up with solutions to current issues in the software.

my hope is that they have an EVEN BETTER SOLUTION... but failing that, at least this is a seemingly technologically workable answer.


10-27-2003, 01:20 AM
I too have my fingers crossed. A solution here is my foremost hope for LW8.
There are a number of issues with uv coordinates that your suggestion will also encounter. For example using uv coordinates to give sasquatch color informatin, one point can have only one uv coordinate, so the corner of at least one poly sharing this welded point grows white fur (no color information).

10-27-2003, 02:58 AM
It's a very interesting idea Jin. especially since it gives you so many tools to work with morphs (like the smooth tool... )

I just hope the unweld idea goes away to allow animatable UV's in 8...

10-27-2003, 04:55 AM
Jin, I think it is done by one of our fellow wavers. He has two plugins one is copy UV2Morph, and Morph2UV. Workflow:

a) create new UV map with the best mapping to the model
b) UV2Morph, and you will get your model in geometry, immediately. Fix overlaps, smooth it, whatever
c) Morph2UV will copy the geometry onto the UV space.

I mapped my Hero head within half an hour with these two plugins, which are available from this forum. Check for it. It`s great!!!!.

Relax UV=smooth on the geometry UV morph.

May thanks to the creators!!!!

10-27-2003, 05:46 AM
I have script that'll unwrap a mesh cylindrically or spherically ... I'm not sure how they work though. I just took an old 5.6 script and made it so it works with 7.0 ... it's very hackish ... I might fix it up one day ...

But I use them all the time to make uv maps from morph maps. In a few weeks I'm hoping to work on some lscripts ...

10-27-2003, 05:58 AM
j3st3r: Were did you get the morph2UV I don't see it in any of the LW forums? I did a search on Flay as well and nothing shows up.


10-27-2003, 06:51 AM
You could also get UVEditpro....does all this in one neat window.

10-27-2003, 06:58 AM
Hmm ... didn't Dstorm make UVEdit pro? :)

10-27-2003, 11:46 AM
has anyone got liks for the above scripts/plugins mentioned?

steve g

10-27-2003, 12:20 PM
The URL for UVEditPro is:


jin choung
10-27-2003, 01:22 PM

those plugins seem only to facilitate meni's method.

but if you need to make a uv map AT ALL, there is DISTORTION once we're talking about an SDS model!

when you make a model into sds, the edges will curve to reflect the limit surface but look at your uv map.... all the edges are still razor straight. this creates distortion.

this is a problem not only in lw but maya as well - you can mitigate the problem somewhat by making your model itself pretty high res. but it is still NOT a solution.

by precluding the need for uv maps - by just 'skinning the carcass' not into uv space but simply into 3d space as an endomorph and then doing a planar projection onto that, your painting template will reflect any and all edge curvature in the sds!

it is the middle step in jdaniels solution... but my proposal is that we make a special kind of endomorph so that we never need to create a uv map from the endomorph and doing a bake.

do a search in this forum on sds and uv mapping to see real examples of this distortion.


10-27-2003, 09:20 PM
I'm very interested in knowing betters ways to get UVs. I'm glad to see others sorting out ideas.

The way I've been doing it is a combination of the mentioned techniques- unwelding the model at certain seems to create the UV as an endomorph, then make a UV map snapshot from the endomorph. To get rid of the seems and some distortion requires deleting the UV endomorph and welding the model. This gives nice UV coordinates, but once the UV endomorph is gone, any rework has to be done in UV space.

I'm getting fair results this way. I prefer using the editing tools in model space rather than UV space. Certainly would be nice to have more control over the whole process.

-Bill C.

10-27-2003, 09:59 PM

I think I understand what you're saying but cant' we do that now?
I tried it out to see and below is picture of a quick subpatch sphere I did and I don't seem to have much distortion.(Mind you, I didn't spend time unwrapping the sphere, I just seperated it into 4 pieces, I was more concerned with the distortion then lining up anything.)
I made a morph map, unwelded my vertices, arranged my mesh in the morph window as I wanted. Then I made a single square polygon around the borders of my unfolded mesh so that when I made a projection, my mesh would keep it's scale and not be elongated to fit in the UV window. Then I made a planar projection UV. Once I had my projection map, I deleted the Square polygon and rewelded the vertices.
Tell me what would be different about your method.

EDIT: Like I said, I didn't bother flattening anywhere or shaping the mesh in the morph window so it's stretching towards the edges because of the curvature of the pieces. Wtih a better example, I could eliminate that.

jin choung
10-27-2003, 10:03 PM

but just getting a skinned carcass into uv space was never the big issue - well, at least not for me.

to be honest, i think meni's technique is nuts. it's jdaniels appropriation of it that makes it makes it at all valuable for me. i mean i can TOTALLY do the same thing just using the uv tools - no need to make an endomorph for that!

that's not to say that i don't wish there weren't some more/better uv tools. a 'smooth' or relax uvs would be very helpful for example, a better unwrapping gizmo would be another boon.

but it seems like much more of a hassle doing endomorphs just to get the skinned version into uv space than any potential benefit i can see....

but in any case, what you're talking about is the SAME ISSUE with raw polys as it is with SDS.

what i'm talking about is counter-acting the fact that for SDS models, you have curved edges in your model and completely straight ones in uv space.


jin choung
10-27-2003, 10:06 PM

and the unwrapping gizmo that i speak of is TEXTURE GUIDE (actually, a user made plugin dubbed texture guide 2 is better and fixes a nasty cylindrical projection bug in newtek's version)... this along with the other uv tools let's me dump sections quick and clean into uv space for regular polys.

just use a grid texture to eliminate any distortions and you're good to go.


10-27-2003, 10:09 PM
Oh, and if anyone isn't familiar with the distortion issue, here's a sphere with a regular cylydrical UV map on it and you can clearly see the waving texture.

10-28-2003, 02:24 AM
I don`t know how MAX, Maya and the others do it, I think, they are rebuilding the UV when they subdivide.

I think, UV should be subdivided as well during render with the same algorythm as with SDS to get flawless UV mapping. It`s much simplier.

Check out the attached image file. The upper part shows the Lightwave way of handles UV with SDS, the lower part show how it should be. This gadget was mapped with Atlas. The first is subdivided after mapping, as usually LW does it. The second was mapped as usual, but I used the above mentioned two UV2Morph and Morph2UV plugins, to put the original ATLAS map onto the geometry space, subdivide it with metaform, and the nicely subdivided UV geometry was put back into UV space. It shows, how it SHOULD be done. Manually it has one additional step, but it is not the subject of this topic

jin choung
10-28-2003, 04:03 AM
i think it's more complicated than that actually - this is not a problem that's been neglected due to simple laziness... there really is a technological hurtle here.

imagine a simple CUBE.

let's say that you do atlas mapping on the cube and somehow it takes it apart into six very nice SQUARES in uv space arranged arbitrarily but so that they do not overlap.

now let's hit tab - and let's say for argument's sake that it subdivides infinitely smoothly - to the limit surface (in your example, you did a single subdivision step but most of the time, we would subdivide much smoother...)

if you look in uv space, according to your method, you will see six OVOID shaped things where the squares were.

but what you would actually WANT is more like ROUNDY SQUARES (what a single quad of the SDS ball would look like if you selected it and did a planar projection onto it).

that is, just because a poly is UNWELDED in uv land, it does not mean it is ACTUALLY UNWELDED in the model. and it MAKES A DIFFERENCE to the curvature of the edges whether verts are or are not welded.


for some reason, i used to think that the app would have to keep track of how you originally projected or unwrapped every poly that you dump into uvspace.

but thanks to your example, i think that i was wrong.

it may be that actually, the only thing that SDS uvs would have to do is 'know' whether it is welded or not!

if that's the case, then it should not be all that difficult to embed that information as a kind of vmap and use that data to inform the edge curvature that you get in uv space!

it's 3 in the morning for me... somebody check me on that....



jin choung
10-28-2003, 04:20 AM

ok, this is why i thought you needed to keep a history and remember how you did the projection to get the polys into uvspace - i thought that was the only way to actually 'rebuild the uvs'.

app would have to remember the projection method, remember the selected polys for operation. do the subdivision - then reproject onto that remembered selection using the same method.


if the app simply remembers which verts are actually unwelded and which are merely discontinuous uvs, the app should be able to simply rebuild the uvs by applying the same subdivision method on the geometry in uvspace.

how does that sound?


p.s. although.... alright someone check me on this... but in order to show sds on 'pieces' in uv space that are not actually unwelded in the model, would it require 'phantom points' (like in the head and tail points can become in lw curves)?

and if so, placement of these phantom points in uv space would certainly influence the curvature of edges. so how would the app place these phantom points in uv space?

it would have to remember the method of projection!!!

ARGH!!! ok, so i guess there was a reason why i thought what i thought! ACK!

jin choung
10-28-2003, 04:28 AM
oh crap....

actually, the issue about welded/unwelded would affect the jdaniels solution too... at the seam edges of the pieces.

it would distort at the seams because they are subdividing as if they were unwelded... even though the actual model is not unwelded there!

[email protected]#$....

i'll think about this in my sleep....


10-28-2003, 06:23 AM
Found the UV2Morph script thread here:


And another great plugin to go with it


These plugins done by users has me hopeful that the programmers at Newtek must be able to do tools at least as powerful.

in the mean time I'll have these to play with.


jin choung
10-28-2003, 09:46 PM

actually, jdaniel's solution would indeed distort too at the edges and corners of any and all pieces that you unwrap into the endomorph... unless of course the model actually had those very edges and corners unwelded as well....

reason i didn't see it is cuz the examples are largely kept in tact with a single seam being created if any - if i'm not mistaken, the dinosaur head has NO unwelded verts in the 'flattened' version.

if we had different examples where the nose was taken apart into several pieces, and then the skin around the eyes and then the mouth... if things were separated out more, we would have seen it.

in the human head example, you would indeed see distortion along the BACK of the head.

so yes, even the workaround does not provide a completely distortion free solution!


so it seems that the only possible solution is:

1. remember what projection method is used to place EACH POLY into uv space (!)

2. use 'PHANTOM POINTS' to actually properly draw the edges of that are not unwelded in the model but are unwelded in uvspace.


alas, the consequence of such a solution would increase the overhead for a single model. i'm not saavy as to how much of an increase that would represent but i have a bad feeling that it might be considerable.

and again, it entails features that are completely alien to lightwave like a history.

right now, it appears that the only way to texture an sds model practically is through 5.6c projection mapping.

i will elaborate later but it seems like that is the only way to defeat distortion entirely.

and it may indeed turn out to be the best and perfectly suitable. we will have to resort in using utils like unwrap and unwrap2 on the highres versions of the sds to get our painting templates and we may have to setup cameras for prntscrn and then project texture maps using the camera as reference...

and since sds cannot go between apps right now anyway, it's not that big a deal.



so the answer may be that there is no answer. that there is nothing better than what we now have.

and maybe now i can see little bit why NURBS are still used in movies for organic models. while sds is much much better to model with, nurbs are still more robust.


10-28-2003, 11:18 PM
Jin, you are wrong. NURBS is going out of the movies, just check out LOTR. The first movie the troll was NURBS model, but later all cg character turned into subdiv, as well as in Toy Story, Nem, Monster Inc, Shrek, Final Fantasy, Osiris, etc.

In Maya and Max, and in XSI (and in Cinema4d) this issue is SOLVED FLAWLESSLY. Just our LW suffers from this. The solution as I told would be the smoothed recalculation of UV at rendertime. I`m pretty sure, that both MAX, Maya and rest do that.

Using NURBS is another question. Each NURBS patch has it`s own UV space. Think that if that troll was built out of 1000 patches, those must be textured separately. Therefore new UV must be built to the character...

Don`t be desperate. I hope NT will smooth the UV at rendertime. Currently UV is subdivided with faceted method, but it should be subdivided with metaform. That`s all.

jin choung
10-29-2003, 12:07 AM
hey jester,

no, you are wrong! :)

i think....

that is, SHOW ME how max, xsi and c4d do it!

i KNOW maya and maya cannot resolve the problem perfectly either. in maya's case, you get a projection of not the base mesh but one or two subdiv steps down.

instead of projecting the edges of a 'LIMIT SURFACE', it is still projecting a FACETED EDGES that WILL INDEED DISTORT when push comes to shove.

and actually, please show me a link if you have one that says that LOTR transitioned their character models to SDS. i thought it was really nuts for them to use nurbs for all their FOTR models but according to cinefex they did.

and they had a very elaborate method for creating the displacement maps for NURBS and i would be surprised but gratified to see if they transitioned that whole system to sds.


i am aware that pixar switched over to sds from nurbs but since they do very stylized stuff, most of their texturing seems to involve renderman procedural textures and they might even be projected onto the sds surface just like lw!


if you know for a fact that max, c4d and xsi CAN do it, please ask around and find out HOW!

(i've looked around at borders books and barnes and nobles at max and c4d and maya books and it DOES SEEM THAT THEY DEAL WITH THE ISSUE SEAMLESSLY - BY SIMPLY NOT ADDRESSING IT AT ALL!!!!!! seriously, i've never seen a topic of cgi being so illiterately covered in all my life! nobody talks about it! it may indeed be that everybody suffers it in the other apps and are just simply not aware of it!)

(and it may be that they deal with it by subdividing enough so that the distortion is such that it's not that noticeable!)

let's get to the bottom of this! not just by bitching about how lw can't do it... if others can, let's SHOW NEWTEK HOW!!!

granted, it would be better if newtek did this on their own but i've got no trust that they can or have the resources. given that, let's do some legwork!

come on people, let's put our heads together and figure this out!


jin choung
10-29-2003, 12:10 AM
oh and jester,

take a look at my reply to your post with the image.

your method WOULD NOT WORK!


read my example about the cube. if the subdivision happens in uvspace like you suggest, it would distort like crazy!


10-29-2003, 01:56 AM
jin, I was using MAX for almost 5 years...I know, that SDS UV mapping is solved in MAX. Since I`m not using max anymore, I cannot show you examples, but I`m pretty sure, that MAX uses the same subdiv algorythm for UV subdividing. Since you have to follow the geometry curvature, the only one solution is the same subdiv algorythm for UV as well

jin choung
10-29-2003, 02:07 AM
again... jester,

take apart a cube into 6 quads in uv space.

if you SDS the six quads, it will be WRONG!

you get six circular things in uv space because in uv space they are unwelded.


10-29-2003, 02:39 AM
Look at this example, I`ve attached. This is the MAX way. It simply subdivides the uv when the model is subdivided. It is in MAX for years.

Our problem is that NT implemented UV in a very unusual way, and the other applications work differently. I`m pretty sure, that UV is NOT subdivided in LW during geometry subdivision, that causes the problem.

Believe me, it`s very Lightwave specific issue

jin choung
10-29-2003, 02:54 AM
hey jester,

great images. looks like it's doing it correctly... but-

what do the uvs look like during those subdivision steps? that's the real important thing that will help us get a handle on what's happening.

also - what kind of texture is that? if it's procedural, they may have some kind of method for dealing with distortion....

is it indeed an image map on uvs? i'd really love to see what the uvs are doing....


10-29-2003, 03:06 AM
It`s a simple checkerboard texture made with photoshop.

UV`s cannot be followed, because MAX handles subdivision of the UVS internally. If I put the UV Unwrap modifier (the UV Editor tool) after subdivision, the mapping is connected the subdivided mesh. So, Meshsmooth (MAX SDS) is the last in the history, and it does everything. I`m pretty sure, that LW doesn`t handle the subdivision when UV ing, I think, it`s simple uses a metaform on the model, during rendertime, and doesn`t care with the UV. I`m gonna check how a freezed subdivided UV looks in MAX, but now I have to let my MAX fellow to work...

My idea is that the control mesh UV`s should be NOT recalculated, but the new UVs (created by the rendertime subdivision) should repositioned in UV space with the subdiv algortyhm

jin choung
10-29-2003, 04:40 AM
hiya jester....

say, you're at work now? where are your writing from? it's 3:30am where i am....

last post of the night....

you are right of course. lw does NOT apply any kind of sds in uv space... it simply slices and dices the existing geometry inside of uvspace while maintaining the straight edges of the existing outlines.

but this is what i am saying is the problem... you cannot JUST sds in uvspace. you MUST use PHANTOM POINTS... and perhaps MAX does....

hmmm.... but if you don't have access to the uvs while the mesh is SDS in max, then what the heck would you use for a painting template?

if it is completely, inaccessible, that's a pretty odd limitation.... you cannot open up the uv editor on an sds object? well, in any case, the worst case situation is simply freeze the mesh at an extremely hi res and just open up the uvs to that and use that as a painting template.

hmmm.... and the use of the max STACKS then is probably pretty important which is also what i was saying.

so think about it... if the frozen objects uvs is NOT circles (because a quad would look like a circle subdivided if it was completely unwelded), then max IS INDEED taking into account phantom points and it is probably remembering the methods used to project geometry into uvspace.

in which case it relies on technology that is completely alien to lw.

remember, max, maya, xsi, and even c4d DO have histories and such.

lw does not. at all.


10-29-2003, 04:49 AM
Hey Jin,

Here in Hungary it is 13:00...

Maybe the stack is the clue. I don`t know...Anyway, it is solved pretty well in MAX, so I think it could be solved as pretty and as well in Lightwave also.

Maybe LW8 gives the answer

10-29-2003, 05:38 AM
All of this discussion has me wondering how well animated UV maps are. If they already distort won't moving them around just cause more render errors? Wonder if that is why we have not seen any sign of examples for this feature. It would require some kind of fix of the UV problem?


10-29-2003, 06:15 AM
First off, having a history or stack and knowing how the uvs were made makes no difference, this isn't part of the solution.

Secondly, I'm not getting these errors when I check in lightwave. I've heard they're there but I just uv'd a subpatch object and couldn't see any distortion.

For the uv maps to not distort they'd need to take up the same area as the sub patch does, this however is impossible to do.

Animated uv maps are very simple and the distortion will always be at the same spot (unless they are doing morphing uv maps, but I wouldn't think so).

jin choung
10-29-2003, 03:49 PM
hey sketchyjay,

yup, if there's distortion now, animated uvs will simply give us moving distortions! :) and alas, it doesn't necessarily mean that anything will be fixed to implement it. but we have the problem with sds... not straight polys so it would be 'useful' for them.

i say 'useful' cuz animated uvs is just about the last thing that i would have worked on for the uvs... there's enough core issues to work out without going for flamboyancy....

hey karmacop,

how are you so sure that a history and a stack are not part of the solution? 3dsmax seems to require a very specific ordering on the stack for their solution.... but they do indeed seem to provide a fix.

again, logically, this should work:

1. remember what projection method was used.

2. remember what polys were selected when using that method.

3. use phantom points so that verts that are welded in the model curve properly if they are unwelded in uvspace.

4. perform subdivision in uvspace.

in any case, max really does seem to have a working version so there must be a way. it should not be 'impossible'.


10-29-2003, 04:11 PM
Not to get your hopes up Jin, but from watching Bjorn work on wings3d, sometimes when he went to fix one thing a few new things resulted from it. If we have animated UVs then obviously they were in there tinkering with it. Animated UVs may be a happy bonus to that work not neccessarily an end into itself.


10-29-2003, 05:25 PM
The stack and history don't matter because uv's are uv's, it doesn't matter how you projected to get them, they'll look the same no matter what. If you look at the texture applied to the box it does not distort the uv's at all.

The distortion you're seeing is because of non-flat polygons. This is again because the polygons do not use the same area when mapping. To fix this Lightwave would need to distort sub-uv, so that you wouldn't notice it's even there.

Again, how can I make an object so that I can get this distortion? I made a sphere from a box just like the max guy and I didn't get an distotion?