PDA

View Full Version : fing maya ocean - jin's journey through most of the 3d apps in the known universe



jin choung
10-08-2008, 03:29 AM
warning: long and ranty, but can serve as a grim ward of dead ends that you can/should avoid and a free solution for all those who might face similar hurtles if you skip to end

--------------------------------------------------------------------------
chapter 1 - maya ocean

so i've been tasked at work to create a simple undulating ocean that can be exported from maya into a proprietary renderer which will only accept polys.

ok, so fine. no problem. for this project, i've done several ponds and pools and maya fluids have performed admirably. nice results, create fluid behavior, great looking wakes. i've been able to tesselate a pond to polys, bake the deformations into maya's geometry cache, delete polys that don't need to be seen (you always get a rectangle pond) and export to the renderer. boom, no biggie.

problem: maya oceans (unlike maya ponds) will NOT tesselate with a history connection to the deformation animation. you can tesselate but you get a frozen, static ocean. f!

i can see the verts right there in the maya interface! all maya has to do is let me treat the "ocean object" as it is - a deforming nurbs or poly object and i'm all set to export but the ocean deformation is only visible in maya through some kind of conceit called a "preview plane"... this preview plane contains verts... i can see those verts... RIGHT THERE IN FRONT OF ME.... but it's treated as a "special object" and you have no access to it like you would with a poly plane. i'm absolutely positive that there's gotta be a way of accessing that special object as just a vanilla poly or nurbs object... but having scoured the docs and highend3d for hours, i couldn't find anything....

(you could also apply the ocean shader [that's all the ocean is btw, a displacement shader {with a few knickknacks}]

problem: maya treats shader based displacement (which is maya's ocean) essentially as a render effect. in lw, we b1tch that the displacement is NOT handled by the renderer, creating detail only during the render process where it's needed... but in this case, where i would NOT be rendering in maya - where i needed access to the lowest common denominator - POLYS - maya's displacement ocean left me high and dry.
--------------------------------------------------------------------------
chapter 2 - maya alternate strategies

basically, according to the look that the animation director wanted, i just needed to throw some animated noise on a frickin subdivided plane and i was done! the simplest fing thing to do in lw.... but that's an impossibility with maya out of the box! ACK!

there's a separate category of deformation generators in maya called nonlinear deformers and these do simply deform poly objects - with animation even. but they proved unsuitable because there was no ability to introduce randomness in the waves or sine deformer.... it looked very regular and even. i could attenuate the affect with distance, i could add crossing deformers hoping for interference but it all ended up looking very very "grid-dy".

ack... all i needed was some simple fing noise man....
--------------------------------------------------------------------------
chapter 3 - goin' to lw

alright... so i've got a plan. f maya ocean.

i'll just do it easy breezy in lw and (i figure hazily in the back of my mind) i'm sure that somehow, i will be able to export the displacement animation to maya.

WORST CASE SCENARIO: i shell out $99 for point oven. so there. at the very worst, i just end up buying something i was figurin' on buying at some point anyway.

so animation done in less than 5 minutes in lw. just threw on a few choice noise shaders and i've got 240 frames of precisely the look the anim dir wanted.
--------------------------------------------------------------------------
chapter 4 - nothing will export displacements/vert animation to maya

- lw .fbx or .dae (collada)... nope... absolutely nothing... i'm not sure what is getting exported but the resulting file either freezes in the midst of exporting in lw or crashes everything (maya, deep exploration, etc) attempting to open it.

(it's 90,000 quads but since when the f was that ever a deal breaking number?! come on! is this 1995?!?!?!)

- deep exploration - my prime tool fails miserably. i cannot see the lw animation in it and nothing it exports contains any animation whatsoever.

i have a feeling that polytrans might but that was always way too rich for my blood so it was not in my arsenal.

- .mdd! lots of things take .mdd! worst case scenario is purchasing point oven to handle it but maybe i can use an intermediary app that i have access to that will successfully export to maya.

- BLENDER - i'm really really really impressed... loads the .obj export from lw like a champ, reads the .mdd like it was born to do it and i can see the ocean animation perfectly in blender! wow, at least now i know first hand that animation interchange between lw and blender is rock solid through .mdd! blender has export options of .fbx, .dae (collada) and some raw and directx game engine stuff... nothing exports vertex animation. f!

- XSI - again, i'm really really impressed with seeing full fledged animated polys actually transition over from app to app. xsi actually COMES WITH point oven and i was hoping that through crosswalk, there would be a way to convert the .mdd to the maya readable "geometry cache" vert cache format.

no dice. there is no such provision.

BUT, xsi was the closest that i got to successful export to maya. after you bake the .mdd to xsi mesh anim format, you can export that using dotXsi format via crosswalk.

then, using a dotXsi plugin in maya, open that file that you exported.

UNFORTUNATELY, the only thing dotXsi could do was convert vertex cache animation to a series of MORPH TARGETS (or "blend shapes" in maya parlance).

in theory, i could just setup the morph targets up in maya animating over time and then bake that to maya's geometry cache, delete the morph targets and i'm golden.

UNFORTUNATELY, having 240 morph targets of 90,000 quads each created a situation of nonstop application errors in maya. crashy crashy.

i thought about baking 5 frames at a time and then splicing the cache together that way but that would be a slow, dull trip to slit wrist city.
--------------------------------------------------------------------------
chapter 5 - there's gotta be SOMETHING that will get an .mdd to maya for free right? no

there's nothing. m2lw is primarily for export going the other way and there is NOTHING that will get maya to take a .mdd file.

but i look over the python script in blender that parses the .mdd file and i think... WTF?!?!?! why isn't there a simple little script somewhere that either gets maya to read a .mdd like blender or else simple convert the .mdd to maya's geometry cache?!?! i mean seriously, how hard can it be?!

and now i'm looking at point oven burning a hole in my wallet and i so would have bought it for this project already if it were not for 2 things:

1. restrictive license - point oven is stuck on one machine.... there is no way that you can take it from station to station, job to job.... you're stuck in one computer. you can unregister it and then request another license if you ever upgrade your computer or whatever but it's not a system where you can unlicense quick and jump to another computer and activate there (like with adobe or zbrush).

this is MUCH BETTER than what i THOUGHT the point oven license was - that it had to be locked to every individual piece of software that you use it for (xsi, maya, lw, etc).... that truly would be a nightmare especially if i have to use different dongles at different times.

it's too bad point oven doesn't come a usbkeylock that contains the app in its entirety and be portable that way....

2. while there is every indication that mark will get back to you promptly with your license, it's still a manual thing that you have to wait for - not automated - and i was tackling this on a sunday.... the site mentions a day or two for your license anyway and that was just a bust for me.

(i probably will still get point oven though... timing just wasn't right for this)
--------------------------------------------------------------------------
chapter 6 - digression: jin gets a non-trivial programming exercise

the biggest hindrance for me getting better at coding is that it's very difficult for me to find things that are meaningful and useful and at the same time not already abundantly available for free on the web.

trivial exercises just make me numb....

that's why i'm so psyched whenever i get an opportunity to code something at work. but this time i had no time to figure this out.

but especially with the resource of the blender python script, i should be able to make a script that parses an .mdd and spits out the geometry cache and xml file that maya takes.... that should be very very very doable...

and i don't need any kind of .mdd manipulation in maya beyond simply getting it into maya in one form or another.... once it's in maya as a geometry cache, i can do all the cache manipulation i need through the TRAX editor that enables all kinds of cool editing of its own cache files.
--------------------------------------------------------------------------
chapter 7 - http://www.hajimenakamura.com/hajime/cg/mll/displaceD/displaceD.shtml

God bless this guy.

after an eternity and an age of fruitless searching i finally come upon what i needed all along.

with this simple maya plugin, you can apply a noise texture as a deformation to a subdivided plane ala lw.

f.
--------------------------------------------------------------------------

the end

jin

Red_Oddity
10-08-2008, 04:31 AM
Hey, welcome to my world, where i find myself wanting to 3d less and less because Maya (our primary app) takes the fun out of my work.

Have you tried Maya 64bit btw, i found it to be a lot more stable though, unfortunalty (even after emailing the guy numerous times in the last 2 years, even offered to do the recompiling myself) there still is no displaceD x64 version...

sigh, but this is my daily routine...do 1 week creative work on a scene, then spend 2 to 3 weeks trying to get the scene to actually render without errors...ah yes..i can see why the whole world uses this stellar program.

Best solution, just render an orthographic depth map of your ocean shader and use that to displace a normal subD-ed plane, but i'm guessing that won't work because you proprietary renderer is tied into Maya?

jin choung
10-08-2008, 03:58 PM
well personally, i've never felt that way about maya in general. there's a lot there to like, even love - especially if you're doing TD work and animation.

and as i said, for this ocean thing, there are a lot of people on the lw side that want the render-time displacements too... it's just that in this case, where i needed access to simple polys for render somewhere else, i got screwed.

but as with all apps, thank goodness for free plugins.

but i HAVE run into the situations that you're talking about where a render simply fails... not an error or artifact in the final image... it just ceases rendering... and that's caused me many a late night of tearing my hair out so...

my condolences. luck.

jin

cresshead
10-10-2008, 03:13 PM
did you watch the siggraph 2008 live autodesk video steams this year?

watch the ocean scenes in journey to the centre of the earth that was simulated using 3dsmax and rendered out via 3dsmax and the 3rd party renderer galeto...they simulated an ocean of water 6ft deep by 3 miles by 3miles [if i remember right]

i have the feature film dvd on order btw!

Dirk
10-10-2008, 04:22 PM
Hey, welcome to my world, where i find myself wanting to 3d less and less because Maya (our primary app) takes the fun out of my work.

That's actually what I see whenever I come close to somebody who has to work with Maya.

toonafish
10-11-2008, 03:41 AM
You had the look you wanted in Lightwave right ?

Maybe you could export an MDD from Lightwave, load the mesh into XSI as an Lwo or Obj, use PointOven to apply the MDD, and use the Sequence export function in the Obj exporter in XSI to get the object sequence you need ?

If that does not work either, you could also try the displacement map route by rendering out an image sequence with a Zbuffer from the ocean seen from the top.

jin choung
10-11-2008, 05:24 AM
yeah tried that... like i said, the closest i got to success was the dotxsi import into maya which gave me 240frames of 90k poly blend shapes... maya wouldn't have it. crashy crashy.

and the displacement map would be pretty hirest and 240 frames worth.... didn't have great faith that would work.

anyway, the plugin link that i put up allows you to do lw style deformations in lw. just what i needed.

jin

zapper1998
10-11-2008, 06:37 AM
holy...... wow ...
I hope you have a great day :)

cresshead
10-11-2008, 07:37 AM
article on the ocean fx in journey to the centre of the earth

http://movies.consumerelectronicsnet.com/articles/viewarticle.jsp?id=448921

http://images.digitalmedianet.com/2008/Week_28/6bn6l5hf/story/j3d.4k.0226.jpg

toonafish
10-11-2008, 08:58 AM
yeah tried that... like i said, the closest i got to success was the dotxsi import into maya which gave me 240frames of 90k poly blend shapes... maya wouldn't have it. crashy crashy.

and the displacement map would be pretty hirest and 240 frames worth.... didn't have great faith that would work.

anyway, the plugin link that i put up allows you to do lw style deformations in lw. just what i needed.

jin


nono, I did not mean exporting the object sequence from Lightwave, but use an MDD from Lightwave to deform the imported mesh in XSI and export the object sequence from XSI.


I tried it with a 140.000 poly mesh, and it worked just fine on my Laptop with 2 Gigs of memory.

But you already solved the problem, so what's the point.:hey:

lgolden
10-11-2008, 12:33 PM
Maybe this would work (but already got the job done! :thumbsup:)

http://blenderartists.org/forum/showthread.php?t=105959

LW --(MDD)--> Blender --(PointCache)--> Maya :stumped:

Luis
______________________

creacon
10-11-2008, 02:04 PM
Hi Jin,

we were struggling with the exact same problem last Friday and didn't know about the plugin you mentioned. Because it was getting late we moved the problem to Monday and if this plugin works you have probably saved us a lot of time. thanks.

As far as pointoven is concerned we bought a site-license and it's worth every penny.

creacon

Cageman
10-11-2008, 05:24 PM
LOL

It's always wonderful when you spend a whole day trying all kinds of creative ideas that ALMOST work, and then... BANG, someone have a solution that, if you had it from the start, you would have saved a whole day of problemsolving.

I really urge you to get PointOven though... if you are proficient in LW with certain tasks, PointOven will save you alot of time and troubles in Maya. That said, if you have time for RnD in Maya, do that, but, as you've vitnessed, there are times when RnD is out the door. For me, LW has been a timesaver in the Maya-pipeline many times and I don't see that stop anytime soon.

jin choung
10-11-2008, 06:02 PM
nono, I did not mean exporting the object sequence from Lightwave, but use an MDD from Lightwave to deform the imported mesh in XSI and export the object sequence from XSI.



yeah! that's what i did. as i said, my dotxsi file had blend shapes for every frame.

jin

jin choung
10-11-2008, 06:04 PM
Maybe this would work (but already got the job done! )

http://blenderartists.org/forum/showthread.php?t=105959

LW --(MDD)--> Blender --(PointCache)--> Maya

Luis


NIIIIIIIIIIIIIIIICE!

still, the link that i provided will do the ocean thing completely inside of maya but this is a GREAT little replacement for point oven!

thank you very much! this is the kind of thing i spent the whole day sunday searching google for but was not available!

hahahaha! thanks fellows, this thread is becoming exactly what i hoped it would - becoming a resource to others stuck with the same problem!

jin

jin choung
10-11-2008, 06:09 PM
I tried it with a 140.000 poly mesh, and it worked just fine on my Laptop with 2 Gigs of memory.

ohhhh, you were exporting obj seq? well the dotxsi exported blendshapes (separate obj for each shape) but it was very crashy crashy.

how many frames did you try? i needed 240 and maya just couldn't handle that many objs/polys/whatever.... application error city.

jin

jin choung
10-11-2008, 06:51 PM
Maybe this would work (but already got the job done! :thumbsup:)

http://blenderartists.org/forum/showthread.php?t=105959

LW --(MDD)--> Blender --(PointCache)--> Maya :stumped:

Luis
______________________

hmmm, i tried looking around and i don't think maya reads max's point cache format. it seems like maya requires an attendant .xml file too....

do you know if maya takes the pc format?

jin

lgolden
10-11-2008, 09:34 PM
hmmm, i tried looking around and i don't think maya reads max's point cache format. it seems like maya requires an attendant .xml file too....

do you know if maya takes the pc format?

jin

Well, really dont have touched Maya for a couple of years but there is some additional tools for writing and reading .pc2 files:

http://www.kai-wolter.com/resources/maya/maya_pc_tools

KP_PointCacheReader would do the trick (didnt tested as I aways was exporting stuff from Maya to LW but never backwards...)

Luis
__________________________

lgolden
10-11-2008, 09:50 PM
This thread may help too:

http://www.xsibase.com/forum/index.php?board=33;action=display;threadid=35519

in the post #12 there is a nice tip:

-----------------------------------------------------
i do it by hand finally, here is how to do it :

Make a cache of your mesh, put the created pc2 and xml files in this example folder c:\cache

In the script editor type this :
cacheFile -pc2 0 -pcf "c:/cache/fileNameToBeCreated.pc2" -f "xmlFileName" -dir "c:/cache/";
-----------------------------------------------------

Luis

jin choung
10-11-2008, 10:06 PM
awesome luis!

thanks very much for the links and i'll check out that pc2 maya plug... that might just be the ticket!

jin

Mike_RB
10-12-2008, 08:02 AM
xsi can write out pc2 directly.

cresshead
10-12-2008, 08:07 AM
maya 2009 and max 2009 can share point cache...was talked about on the live siggraph 2008 video feed.

Stooch
10-12-2008, 02:15 PM
you probably cant export mayas geometry from the ocean because its a constantly adapting mesh thats is meant to center around the camera detail wise.

although you could use the ocean shader as a displacement/deformation shader and just apply it to a normal geo plane.

also if you want mdds back and forth from maya, there is always the beaver project.

jin choung
10-12-2008, 03:56 PM
this is my post in the blender forum - anyhoo, you can indeed export from blender to maya and so, blender is a great (AND FREE) converter to go between lw, max, maya and xsi!

howdy everyone,

thanks to lgolden who pointed me this way from the lw forums! anyway, just wanted to say that broken's pc2 exporter works great for import into maya 2008.... but attention must be paid in the .obj exporter in blender.

you must turn OFF - "APPLY MODIFIERS" button! (the tool tip even says it break vert order)

you must turn ON - "MORPH TARGET"!

and that's it.... inside of maya, you can either use the cacheFile() command to convert the pc2 to maya cache format (haven't tried it yet but i don't expect it to be an issue) or use a plugin from a fellow named kai to just read the pc2 directly (method i used).

http://www.xsibase.com/forum/index.p...threadid=35519

thanks again lgolden for providing all these links and thanks broken for the script! now blender is an excellent go between between lw, xsi, maya and max!

jin

Cageman
10-12-2008, 04:18 PM
Great thread!

Another thing that's bothering me is the way LW scans (or creates) the MDD-files. If you can't bother to buy PointOven (which scans multiple items at once directly to disc) you may run out of memory as LW scans to memory and then save out the MDD.

Solution for those who can't afford PointOven:

You can go with an L-script called Save Transformed Sequence (http://www.interialabs.de/lw/lscript/index.html) (scroll down and look for the L-script) to output an LWO-sequence and then convert it to an MDD-file. (http://www.ef9.com/ef9/PO1.5/PointOven_Downloads.html) (scroll down to the very bottom of the page and download MDD Compiler, which is a free tool). I did this with the CodFish, (http://www.newtek.com/forums/showthread.php?t=88877) since Maya wasn't cooperating with the displacements (so, essentially I applied the displacements to the animated object in LW and exported an LWO-sequence). The good thing with Save Transformed Sequence is that it respects the Display SubPatch Level... so, it essentially takes each frame, freezes the mesh, exports the LWO *loop* until it has saved out whatever frames you need. The resulting LWO-sequence worked perfectly well with MDD Compiler.

EDIT: The reason why PointOven didn't work is because PointOven scans the object before subpatching occours, so in order for me to export the animation with displacements intact I had to go with Save Transformed Sequence. ohh...and once the MDD-File was compiled, PointOven did the rest of the work for me in Maya. :)

erikals
03-31-2009, 01:49 AM
LOL

It's always wonderful when you spend a whole day trying all kinds of creative ideas that ALMOST work, and then... BANG, someone have a solution that, if you had it from the start, you would have saved a whole day of problemsolving.

one day... maan,... i just found this thread trying forever to find that IL_SaveTSeq ... [aagh!] the pain.

hehe :)
here's what i'm trying to do,
>export maya obj seq
>import maya obj seq in lw
>convert obj to lwo sequenze
>use mdd compiler

so far so good, i hope this will give me motion blur in LW?
a mini-hatch is is that IL_SaveTSeq gives a "obj has non planar poly" at times, but it is just a matter of placing a can of beer on the enter button.

btw, i found something cool,
if you use the realflow plugins for lw and maya, http://www.realflow.com/descg_240107_02.htm
you can export e.g. clothfx from lw to maya via the plugins.
(no need for installing realflow itself)
however it doesn't work the other way around, exporting Maya SD, for then import the SD in LW.

here's a small video preview on exporting cloth from LW, the "hard" part
http://puffysky.com/backup/lw_export_SD.zip
(never mind what i say at the end about Fbx, and my whisper voice,
that's the price of staying up late and living in an appartment with neighbours)
[edit,.. hm, the audio recording failed... just video for now]

anyways, after that, importing the SD in Maya is piece-of-cake,
just install the Maya plugin, click the import SD button, and off you go :)

erikals
03-31-2009, 02:14 AM
LW SD export can be imported in Max too btw ;)

faulknermano
04-03-2009, 08:53 PM
maya2lw2, since last year is able to get MDD converted to PC2. however, because of other duties i don't think i've been able to update the site. don't be afraid of shooting me an email if things like this come up: i don't bite. ;)

erikals
04-08-2009, 04:46 AM
http://maya2lw2.faulknermano.com/

sweet http://forums.cgsociety.org/images/smilies/smile.gif
thanks nermano http://forums.cgsociety.org/images/smilies/smile.gif

quick question, does this make maya read mdd files as well? (i assume it does?)

garynb
04-08-2009, 07:12 AM
Hi Jin

I have worked with Hajime at a company called postmodern, a very talented guy.

www.postmodernsydney.com

I will tell him next time I see him that you used his plugin.

Cheers

Gary

dpont
04-08-2009, 07:16 AM
I can get animated obj and pc2 files, exported from Blender,
directly in Lightwave,
(but link to export pc2 from Blender seems broken...)
and don't know about point order with other softwares
like MAX or XSI, if somebody would test it,
http://www.newtek.com/forums/showthread.php?t=97375

Denis.

nemac4
04-08-2009, 10:18 AM
it's too bad point oven doesn't come a usbkeylock that contains the app in its entirety and be portable that way....

jin

jsut a note.. You can have it keyed to your LW dongle.

http://www.ef9.com/ef9/PO1.5/Licensing/PointOven_License.html

jin choung
04-13-2009, 10:21 PM
jsut a note.. You can have it keyed to your LW dongle.

http://www.ef9.com/ef9/PO1.5/Licensing/PointOven_License.html


??? for the maya component as well? the maya scripts? that WOULD be handy.

jin

virtualcomposer
04-13-2009, 10:30 PM
jin choung is like the technical king! I've learned so much since the time I've joined this forum. You should write a comparison book on all 3D apps. I don't think anyone has done that yet and it's long overdue in my opinion. :D

jin choung
04-13-2009, 10:39 PM
jin choung is like the technical king! I've learned so much since the time I've joined this forum. You should write a comparison book on all 3D apps. I don't think anyone has done that yet and it's long overdue in my opinion. :D

i certainly can't address ALL the relevant apps but i'd love to see a book like that. probably would have to be a tag team though between several people. (hahaha.... it would end up being like that episode of i love lucy where an italian guy talks to another italian guy that speaks spanish who says it to ricky who then has to translate from spanish to english to lucy!)

hmmmmm.... yes.... a "comparative religion" kinda dealy would be awesome.

jin

Cageman
04-14-2009, 06:01 AM
??? for the maya component as well? the maya scripts? that WOULD be handy.

jin

I'll ask on the PO mailinglist... I thought the dongle thing was only for the LW-parts of the plugins...

Cageman
04-14-2009, 04:37 PM
Got the answer back from Mark...

"Hi,

Thats not possible I'm afraid. As a developer you can't access the LW
dongle from Maya.

Mark"

So, locking PointOven to the LW-dongle will only affect the LW side of things...

jin choung
04-14-2009, 04:42 PM
Got the answer back from Mark...

"Hi,

Thats not possible I'm afraid. As a developer you can't access the LW
dongle from Maya.

Mark"

So, locking PointOven to the LW-dongle will only affect the LW side of things...

cool... thanks cagey. that's what i thought.

jin

erikals
04-14-2009, 05:52 PM
i'm looking at Maya2LW2 now, looks to be very good, (free)
http://maya2lw2.faulknermano.com/
you might wanna have a look at that one Jin.... http://forums.cgsociety.org/images/smilies/smile.gif

also there is the camera match plugin for lw/max/maya...
http://www.highend3d.com/maya/downloads/mel_scripts/utility_external/export/4768.html

http://static.highend3d.com/downloadsimages/4768/screen1.jpg

erikals
04-14-2009, 06:00 PM
btw, since some of you are from the demolition world "search and destroy"...
you might wanna have a look at this free Maya plugin,...

http://www.pulldownit.com/

erikals
04-14-2009, 10:14 PM
...don't wanna bump too much, but all links are good links (?)
found this Maya pc2 cache exporter,

http://www.kai-wolter.com/resources/maya/maya_pc_tools

erikals
04-14-2009, 10:19 PM
and LW pc2 reader from DPont...
http://www.newtek.com/forums/showthread.php?p=868483


PointCache