PDA

View Full Version : preserve uv's in poly object


oviam
03-02-2005, 03:04 PM
preserve uv's in poly object

hi all,
anybody knows how to do "preserve UV" thing in polygon object? basically i am trying to edit one poly object without distrubing the UV's ,but if i move some vertex the texture also moving along with this, i want the texture to be in the same position.(in max there is a option called "preserve uv" on off toggle in editable poly rollout)
pls help me out...

thanks,
-oviam.

oviam
03-03-2005, 03:14 PM
i have posted this quary for second time ,still i am in 0 reply level!...if anyone writes anything about this, that will be great...

thanks,
oviam.

GennadiyKorol
03-03-2005, 05:02 PM
As far as I know there is nothing similar in maya, and it's not that easy to script...

Regards.

gundog
03-03-2005, 05:25 PM
i know what you mean. i remember before v7 you could do this in 3ds by dropping an unwrap or any projection on top of the editable poly and go down the stack to edit.

i'm taking a guess, cause i hadn't found an answer for this either. in maya, for transform edits to propagate, you'd use a move component operation. stack on a projection on top of that and then go back down to move component. this works for simples testing, but not a very practical approach.

GennadiyKorol
03-03-2005, 07:47 PM
I think I have an idea of how to script that, we need to check how the vertex was moved in it's plane( a plane defined by vertex normal ) like if you were looking at the vertex UV from UV Editor, this would be that plane. Every time the vertex is transformed the amount of offset in that "UV" plane is readed and then the script will move vertex UV's accordingly.
One thing though, is there really good use for this feature? I see one for low poly modeling, but where else you can use that?

Andrei2k
03-03-2005, 08:25 PM
You can basically already do this using Relax UV's and Selecting "World Space" in the Edge weights dropdown menu. Select the UV whose Vertex changed on the Model and pin evrything but selected. A script to do this shouldnt be difficult at all. Maybe I will write one tonight. Hopefully Mr Hawk doesnt beat me to it or we can work together :deal:

gundog
03-04-2005, 04:00 AM
You can basically already do this using Relax UV's and Selecting "World Space" in the Edge weights dropdown menu. Select the UV whose Vertex changed on the Model and pin evrything but selected.

very nice.

it would be cool for this to be interactive. an example would be to project an image on a plane as an template and edit the geometry directly underneath that projection without distortion. a little nicer than modeling on top of an image plane. i used to do stuff like that in max all the time.

Andrei2k
03-04-2005, 05:59 AM
You mean by seperating the model out and flattening it then doing all planars so UV editor looks identical to actual model layout in viewport? I tried that before but depending on model density the history would crash my system because i would run out of RAM but that was a looong time ago that i tried it.

ceql
03-04-2005, 11:16 AM
hmm, that "preserve UV" sounds interesting... I'll need to check it out next time I get to check out Max. Does it work with fully unwrapped models (how would it treat seams?), or does it only work with simple projections?

it would be cool for this to be interactive. an example would be to project an image on a plane as an template and edit the geometry directly underneath that projection without distortion. a little nicer than modeling on top of an image plane. i used to do stuff like that in max all the time.

Do you mean having something like... where in Max you can have a UV Projection (say a planar) modifier on top of the stack, and an Edit Mesh modifier undernath? So that when you edit the model, the texture will keep projecting into the same area regardless (makes it seem like the texture is sliding)?

If so and if I am understanding you correctly, then one way achieve this in Maya is to take your model, and then duplicate it, and connect the Mesh.Out of the first object's shape node to the Mesh.In of the second's, and then apply a Texture->PlanarMapping (for instance) onto the second. So, that when you move verts on the first object, the verts on the second one will update, but the second object will still have the projection in tact. So when you move verts, it'll give the impression that the texture is sliding over the top of model instead of moving along with the mesh. But editing the topology (splitting, extruding, etc) on the first model will probably screw up the projection on the second object, however! and of course this is likely limited to simple projections, but it may be enough for working purposes.

gundog
03-04-2005, 02:31 PM
very cool guys. thanks for the info.

ahh. i remember this. i used this method to mimic max's reference/instance copies. it works, but unfortunately takes away from the advantage of direct interaction on the geometry.

k, i just kick started my brain a little. i added a transparent material to the first object and snapped it on top of the second. and then put the second on a reference layer. now the interactivity is there. so that the primitive projections.

looking forward to seeing a solution for an organic surface.

thanks again guys.

GennadiyKorol
03-05-2005, 04:07 AM
Andrei2k: Just checked relax UV's, and it's not doing everything correctly. It's nice if you move a vertex that is not on border, itc inside the layout. But if you for example take a plane and move a row of vertes or perhaps even 2 of them the UV's are going to be destroyed... Unlike the preserve UV for 3d max. So I gues here should be a more complex solution.:shrug:

danne82
03-05-2005, 09:09 AM
I noticed something similair in mayas help some time ago, how to create a waving flag. I think you saved the old version of the boject and then edit the new one, then you selected it to use the old objects uv. SO the waving flag wouldnt distrot, Think it was using some kind of soft body. Also you probably could use transfer to move the old uv to the new one.

former max user so it´s not that easy to explain :) hope it helps

Andrei2k
03-05-2005, 09:42 AM
Mr. Hawk: Yes I see what you mean, very interesting Ill have to try to figure out what Maya is doing more in depth in order to attempt an automated script for auto updating UVs while you model. I am thinking a scriptjob will work but I'm beginning to think plugin/API would work a lot faster for a tool like this.

danne82: Yes Polygons>Transfer>UV's from one model to another is a solution but if the polygonal face proportions between models are drastically different your UV's will still need editing to fix texture stretching. An updating UV script/plugin while modeling and using relative space beween vertices, edges and faces would be the best although might not be efficient on heavy models.

I will look into this more and if theres a lot of interest I will try to cook something up.

Andrei2k
03-05-2005, 09:56 AM
I did a little more prodding and on the edges a Uniform works better than world space and if the vertices are modified in 2D it matters as opposed to 3D even though the UVs are never transformed in the 3rd axis. Even on unwrapped UV's from a plane this holds true....very strange.

Also by selecting single UV's on the edges that provider better Uniform relazing relative to transformation then selecting multiple edge UV's at once and relaxing. Don't know why this is yet, but I assume that since by definition Uniform tries to make edges the same size by selecting multiple UV's the edges between those selected get recalculated amongst themselves instead or UV edge getting compared to model edge when just a single UV selected. I can see sooo many possibilities for a "New Relax UV tool" This is where I wish the senior Maya engineer can answer a couple questions :D I will post more when I have enough info for development.

GennadiyKorol
03-05-2005, 10:06 AM
Andrei2k:
Yeah interesting but still I'm convinced that relaxing UV’s will not help out much. It works in simple cases, but if you try it on a mapped model, low poly for example and move the seam vertex( vertex that has 2 or more uv’s) it will fail.
Actually the idea about this script was long time ago in my mind after I’ve had to teach 3dmax 7 , and I was surprised by that feature and decided to script it after all. But I had no time to work on it much but the script like that is possible not necessarily API . Wish you luck with development :)

]-UnderTOW-[
03-07-2005, 01:16 AM
A preserve UVs tool would be a great feature for the next version of Level Tools. If only we Alias were listening...

oviam
03-07-2005, 01:38 PM
hi all,
sorry for the delay replay, first thing i want to thank all u guys for giving more ideas ...

1. i want to use this preserve uv thing in unwraped model
2.i tried Andrei2k's idea(using uv transfer) but it works only if we have small changes
3.if someone writing a script the idea is the same what Mr.HawK says(3dsmax does the same but in editable poly mode itself ,just a radio button we need to trun it on)

i hope end of this post we will be having a good solution for this issue...

thanks,
oviam.

CGTalk Moderation
03-07-2005, 01:38 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.