Home Technical Talk

max: UVW-unwrap set channel/ open UV channel BROKEN?

sublime tool
Offline / Send Message
renderhjs sublime tool
in short:
how exactly does the irritating uvChannel work in 3dsmax,- cause I got lost in its logic cant automaticly store/ recieve data.


the long run:
been working on my UV scripts and trying to bang my head into the channel stuff - but all I get is non working results. Each time I edit specifically a certain channel number (lets say 2) make my changes based on channel 1 (thats how max works as far as I understand, it copies the last available channel when entering a new one), and then close the UV editor rollout. To be sure I then collapse everything to 1 editable poly object.
then when I add the unwrapUVW modifer set the channel to "2" and hit edit my previous channel 2 edit is GONE.

So I wanted to ask here what the real apprach is to define a new UV channel edit it and then store it into the poly. And then after it load or edit it again from within the UV-edit window. Either the workflow is fucked up in max and I dont understand it or there are serious bugs they really need to fix.



bug No.2 and perhaps related (this is a different observation):
yet another very annoying bug I noticed is that when having 2 instances of ONE object but 2 different materials on each of them with different UV-channel output preview it messes the individual channel preview up. Either after a few seconds one of them switches to the other one or often it stays the same as the other UV channel from the other material until I hit the UV-channel button in the material up and down- but then again after a few seconds it switches back to the other one.
And yes I did disabled in the material editor the "propagate materials to instances" thing



any ideas on booth?




related informations I already found on the net:
1.)
http://users.skynet.be/arketip/maxscript/multiObjectsUnwrap.mcr
after a channel is assigned to the modifer some update hack is used in this script,- through it does not work in my script :(
objUnwrap1.setMapChannel toChannel
	modPanel.setCurrentObject objUnwrapMod -- update

2.)
http://www.cguu.com/3dsmax/3dSMAX9/maxscript/Unwrap_UVW_Modifier.htm
<void>setMapChannel <integer>mapChannel
Sets the Map Channel field in the modifier’s UI

<integer>getMapChannel()
Returns the mapping channel set for editing in the modifier’s UI.

Note that Channel 1 returns 0 instead. This is for backwards compatibility with older max versions where the only UVW Channel was 0 and the Vertex Color channel was 1.

0 - UVW Channel 1

1 - Vertex Colors Channel

2..99 - UVW Channels 2 .. 99
irritating but as long as I just use "setMapChannel" I shouldn't get confused with the 0/1 switch

3.) similar maxscript issue:
http://forums.cgsociety.org/showthread.php?t=320552

4.) some tutorial saying that you need to hit explecitly the save and load buttons in the UV-unwrap modifer:
http://www.blitzbasic.com/Community/posts.php?topic=59680

Replies

  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    here is btw. a image guide of how I would expect of max to work- but it fails that way
    uvwunwrapworkwithchanne.jpg

    so again how to truly edit other channels than 1 without the hick hack of saving the layouts on your HD as seperate files - because thats beyond stupidity
  • Joshua Stubbles
    Offline / Send Message
    Joshua Stubbles polycounter lvl 19
    In max 2008+ you have to hit ResetUVWs every time you unwrap a new chan, or else it just copies the previous channel into that channel. As utterly stupid as it is, it was apparently a requested "feature".
  • shadows
    Offline / Send Message
    shadows polycounter lvl 18
    You need to press the Reset UVWs button once you've changed to a different channel. Atleast that's the case with 2008. Makes no sense whatsoever but that's how i get it to work. :S
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    wow so it is broken by design, wtf!
    ok that seems to be it,- any I idea how I can suppress the stupid dialogue that comes with it?- because otherwise right now I want to fix the utterly stupid behavior of max fixing it with maxscript. It works now in my script just the way it should be except the nagging dialogue each time.

    I got something along the lines
    objs.unwrap.setMapChannel channelNr;--set the map channel number
    modPanel.setCurrentObject objs;--update UV channel,- damn max fucks otherwise up
    objs.unwrap.reset();
    objs.unwrap.edit();
    
  • Mark Dygert
    You can get around the dialog... but its not that simple.

    If you "save current settings as default" with the map channel set to 2. The next time you apply the unwrapUVW modifier it will be automatically set to 2, no need to reset. The problem is that it saves all the other settings, so you might want to "load defaults" set it to channel 2 then save, that way the only thing that changes is channel 2.
  • SHEPEIRO
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    the reason its there is so that you can paste channels into other channels, i use it all the time, but its totally backwards way of doing it
  • glib
    So what does the reset button actually do? It resets the UVs to what they actually are instead of overwriting them with the previous channel you viewed?

    Make cube.
    Unwrap UVW. Channel 1, scale uvs down and move shells to make unique unwrap. Call this unwrap A.
    Collapse.
    Unwrap UVW. Channel 2. Reset UVW (no visible change). Move uvs into different pattern. Call this unwrap B.
    Collapse.
    Unwrap UVW. Select channel 1 and click edit uvs. See unwrap A. Then close edit window, select channel 2 and open edit window again. Still looking at unwrap A. Close window and reset UVs. Now looking at unwrap B.


    So it seems that I should always get reset uvs after I drop a Unwrap UVW modifier? Man is that silly.

    Is there any way in max to determine how many channels have unique information on them? In maya it's often useful to know how many uvsets your object has.
  • Mark Dygert
    If you go Main Menu > Tools > Channel Info. It will show you all the channels assigned to the selected object. UV channels show up as 1:map 2:map ect.

    You can remove UV channels by clicking it and hitting clear, which applies a "UVW Mapping Clear" modifier with that channel dropped in for you, or you can do it manually. In most cases in order for the clear to take effect you need to collapse the modifier stack. If you have the object skinned already its a good idea to move it down the stack and use "Collapse To" instead, so it won't effect the higher up modifiers.
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    thats why I wanted to script a UV-layout channel thumbnail explorer so you get with a single click a overview with thumbnails how the uv-sets in each channel look like.
    The only other thing that does not nag and bahaves correct is the RTT uvChannel option so I might do it that way.

    It's very annoying that by default the default channel of the UV-unwrap modifiert is always fixed - like 1 and that you can't set it ahead before really working with the modifier.

    The way I did things now in
    http://boards.polycount.net/showpost.php?p=930786&postcount=174
    is that whenever you call a method that invokes changing the channel (e.g open UV edit window) this nagging dialogue appears
    warning_channel_switch.gif
    but it works and feels more logical
  • glib
    I just want to know what idiot thought it would be a good idea to display channel 2 (which has unique data) with the same data as channel 1 unless you hit a 'reset' button. Reset in my mind would destroy data, not show me what's actually there!
  • Michael Knubben
    Shepeiro: Sure, but you'd think they could come up with a less retarded way to enable you to do that. I'm very glad I wasn't using 2009 at home, because there I wouldn't have had the coworkers who could tell me what was going on and I very likely would have spent far too much time on finding out for myself.
Sign In or Register to comment.