PDA

View Full Version : New LScript: UV 2 Morph



MentalFish
12-18-2009, 10:28 AM
I have created an LScript that morphs the model into the shape of its UV, this way you can set up HyperVoxels and other effects, to flow across the shape and bake it out easily. Check out Mikael Burman aka Cageman's brilliant tutorial on the subject:

http://bit.ly/uv2morph

Castius
12-18-2009, 11:05 AM
Always nice to see new script from you mentalFish. Keep it up!! :thumbsup:

But i wanted to just mention that Tom Speed wrote a similair script. I don't mean to mention this to diminish your work. But to point out that Toms script will also convert your Morph back to a a UV. So if you find the UV to not work for the effect he is doing you can easily change the morph and have it update back to the UV.

http://www.newtek.com/forums/showthread.php?t=2491&highlight=morph+map

Oh and Cageman hitting calculate on your FX emitter will read your morph data.

MentalFish
12-18-2009, 11:21 AM
No prob, we lacked the intel on it :) not good enough googling on my part (which i did before starting it), but as you can see from the source code, it's a very small script :)

Castius
12-18-2009, 11:39 AM
It's not an easy script to find. Tom never put it on a website and flays search is impossible to find it there. I only know about it because i worked a lot with Tom back in those days.

Cageman
12-18-2009, 02:52 PM
Oh and Cageman hitting calculate on your FX emitter will read your morph data.

Would love to know how to make it work! I've tested this numerous times and never got a surface-based emitter to respect the surface if the geometry is displaced. Is there a checkbox somwhere?

:)

MentalFish
12-18-2009, 06:54 PM
Here is the end result from Maya: http://www.vimeo.com/8268144

Cageman
12-24-2009, 08:37 AM
Oh and Cageman hitting calculate on your FX emitter will read your morph data.

*DOH*

I TOTALY read that wrong when I replied... Now I get it.... *LOL*

Thanks for the tip... I'm so used to not having to hit calc untill I actually want to generate the cache, so I didn't even try that when I used UV2Morph. But of course it works!

:) :foreheads

zardoz
12-25-2009, 01:36 PM
Hi Cageman, I just watched your video where you show how to make those rain drops run across the windshield...I have to do the same with a bottle of beer but I'm not very good with particles. Can you give me some tips?
tx

Cageman
12-25-2009, 02:32 PM
Hi Cageman, I just watched your video where you show how to make those rain drops run across the windshield...I have to do the same with a bottle of beer but I'm not very good with particles. Can you give me some tips?
tx

Oh.. hmm... well... the thing is... I will release an extensive tutorial about that process (a lot more detailed tutorial that is) at a later date, when Radek has delivered the final stuff. That is sometime in the future though...

:)

Could you be more specific on what you would like to know?

zardoz
12-25-2009, 04:38 PM
well I managed to get the particles running down, and I added another emitter and parented it to the first one to get some trails, but I can't change the size to get the trail wider as it 'grabs' other drops. That's the main problem. And yours look really good.
tx for any help.

Cageman
12-25-2009, 08:25 PM
well I managed to get the particles running down, and I added another emitter and parented it to the first one to get some trails, but I can't change the size to get the trail wider as it 'grabs' other drops. That's the main problem. And yours look really good.
tx for any help.

Thanks! :)

In the Hypervoxels panel, make sure that all the emitters have Blending Mode enabled and set to Addative. If you don't see any difference, try creating a Blending Group, and make sure all your emitters are using that Blending Group.

zardoz
12-28-2009, 04:43 AM
hmm, sorry cageman, but I tried all that but can't get that effect. I guess I'll wait for your tutorial.
tx for the tips

Revanto
12-29-2009, 08:00 PM
I just checked out this video tutorial to see what the plugin does and I don't actually see the point. You don't NEED to morph your mesh to achieve the thing that the plugin does.

All you need to do is to export the UV map as an EPS then import it via the EPSF loader. This will give you a proxy version of your mesh so you don't need to screw up the original. The only drawback with this technique is that it doesn't handle nurbed UV maps.

Just thought I'd make an important point. If you can automate the above process as a plugin then it would just do the same thing.

Revanto

Cageman
12-29-2009, 11:03 PM
I just checked out this video tutorial to see what the plugin does and I don't actually see the point. You don't NEED to morph your mesh to achieve the thing that the plugin does.

All you need to do is to export the UV map as an EPS then import it via the EPSF loader. This will give you a proxy version of your mesh so you don't need to screw up the original. The only drawback with this technique is that it doesn't handle nurbed UV maps.

Just thought I'd make an important point. If you can automate the above process as a plugin then it would just do the same thing.

Revanto

Is the UV-map on the exported object intact? Because the UV has to be 100% matched with the UV that is going to be used for the texture (and that object might be located in another application, for example).

EDIT: I just tested this, and here is the main problem using your technique. Once importing the eps, the object itself looks just fine, but there is no UV-map on the object. Further more, creating a UV-map for the object results in a different looking UV-map compared to the original object, and here is where I think you missunderstood the idea with this technique.

It is very important that the UV-map on the flattened object is 100% the same as the UV-map on the original object. This technique is to use LightWave as an advanced texturecreation toolset, where the surface baking camera is using the UV-map to render out the image sequence that then can be used in any application with the original object.

I've attached two screenshots. The first one is the UV2Morphed object, where the UV-map is still 100% matched with the original object. The second screenshot is the eps exported object where I needed to create a new UV-map, since it doesn't have a UV-map once you export it to an eps. The missmatch between the two UV-maps will render this technique useless.

This doesn't mean that you can't make the eps-version of the object have similar UV-map by editing the UV-map, but that would, imho, just add alot more work compared to using just using UV2Morph.

Revanto
12-30-2009, 04:58 AM
When you exported the UV map at the beginning of the process, did you click on 'draw grid'? The thing is that with 'draw grid' on, you should get a square polygon imported with your UV that represents the bounding box of the UV space. With this, you easily make a new UV map for the new object without the hassle.

I did a test then used UV imaginator to export out the UV map captures of BOTH objects and they matched.

I suggest you test it again. Make sure that 'draw grid' is on and "texture UV" is set for when you export the original UV map as an EPS. Then when you import the EPS as an object, create a new UV map for the new object (you can delete the UV 'bounding box' polygon once you have the UV map done). Then compare both UV map texture in Photoshop and you'll see that they are the same.

If you want, do a few tests on some weird shaped UV maps and compare them. If you find any that don't match, let me know and I'll test the object out myself.

Don't get me wrong, it's good that you are making this plugin. It's just that there is already a way of doing it, albeit, requiring slightly more work.

Rev.

Cageman
12-30-2009, 09:01 AM
I suggest you test it again. Make sure that 'draw grid' is on and "texture UV" is set for when you export the original UV map as an EPS. Then when you import the EPS as an object, create a new UV map for the new object (you can delete the UV 'bounding box' polygon once you have the UV map done). Then compare both UV map texture in Photoshop and you'll see that they are the same.

Ah... that did the trick! :) Thanks!

And, I didn't write the script, it was MentalFish who wrote it, but on my request for making the type of workflow I suggest in the video alot more feasable. :)

Anyhow... good to know that this is doable without a script.

As my title says; I'm almost newbie. :D

Revanto
12-30-2009, 08:12 PM
Oh, no problems then. Have a happy New Year and have fun getting better with Lightwave.

Cheers,
Revanto :p