View Full Version : obj sequence into c4d?
Zendorf 01-05-2008, 07:07 AM I am interested in getting some help to either script and/or use xpresso to bring in a sequential series of obj's into C4D. Am requiring this specifically to bring in Blender generated fluids. After having searched high and low all over the net , it seems there is certainly a demand for this function in C4D...hell, I would pay good money for a plugin or script that does this:thumbsup:
Since I am not willing to wait for it to materialise (or Maxon to release a fluid plugin) I am looking for any input on what might be required to make this happen. Otomo has kindly sent me his nice little xpresso setup (I will ask him upload it to this thread) which works fine except that all meshes need to be loaded into the scene at once. Great for short simple scenes, but not for epic water masterpieces with fine detail!
I know very little coffee but can get my head around xpresso quite well, which brings me to my main question....Is it actually possible to import one external obj at a time either via coffee or xpresso or am I wasting me time trying? Is there possibly some way to hack into the xrefs or external morphs functions to do this?
Any thoughts or ideas would be most welcome :)
|
|
Kuroyume0161
01-05-2008, 07:53 AM
If you are looking to import an obj sequence as a PLA animation, there are several possibilities:
ePLA
CinePoser LT
interPoser Ltd (by yours truly)
Any of these will import a series of obj files as a Polygon object with a PLA animation track.
The problem arises (and I sense this already with the words 'fluid') when the objects do not maintain vertex and polygon counts. This is difficult to work with.
I think that all of these (though I'm unsure) will allow appending. One thing to note is that even if the append is not automatic, it is usually possible to import a new sequence as PLA and transfer the animation from the new import and append to an existing import (of the same object of course).
Zendorf
01-06-2008, 10:49 AM
Thanks for you input Robert! Alas, you are quite correct that a fluids' vertice counts change on each frame so unfortunately a PLA or mdd solution would not be suitable.
Being the code ninja that you are, do you know if it within the abilities of coffee to load in and out external obj's on the fly? Not sure if you are familiar with the Realflow importer for C4D, but it brings in a mesh sequence one at a time in its own proprietary mesh format(.bin) . It also allows a frame offset. Ideally I would like to be able to do this with an obj sequence from Blender or Houdini (especially since the HD edition is $99...but of course only for personal work).
cheers...
Kuroyume0161
01-06-2008, 07:55 PM
Loading external objects should be possible. COFFEE has all of the necessary functionality to read/write files and create/edit objects.
The caveats to COFFEE are:
- It must be a plugin and not a script (in COFFEE tag or XPresso node or something) since file access is forbidden in the latter. Not a biggie, but does require a different approach.
- How to handle these non-static vertex counts. Unfortunately, COFFEE doesn't provide object plugin functionality - that is, you can't create a plugin object with COFFEE; only C++ plugins can do this. You can create plugin tags though.
- Finally, COFFEE doesn't have means to fully work with animation especially in R10 at the moment.
C++ plugins would allow full control but then it also requires a C++ plugin developer. I'm currently on undercover ninja assignment so don't have the time to devote to this.
Zendorf
01-10-2008, 12:31 AM
Hi Robert, the more I look into it the more I realise that this is way beyond my skills...and I just don't have the time to learn c++ :shrug:
I you or any any other devs out there are looking for plugin ideas, then this is probably easy to code and would sell like hotcakes! Since Blender is free , if there was a obj. sequence importer plugin (simliar to the Next Limit one) available then all C4d users who bought it would have access to fluids inside of cinema...kind of like a poor man's Realflow (though not in terms of quality).
Personally , I think that pros and hobbysts would lap it up if it was priced nicely. Of course it does entail learning the basics of Blender , but learning the fluids is easier than getting to grips with all the parameters in Realflow imho.
For those not convinced, check out:
http://youtube.com/watch?v=-AiLyQWXjIg
http://youtube.com/watch?v=WruTNnF6Ztg&feature=related
http://youtube.com/watch?v=9yEdiIw2VWY&feature=related
and the new upcoming new particle dynamics system:
http://youtube.com/watch?v=oYZ1eybaJHA
Kuroyume0161
01-10-2008, 04:44 AM
I'm not certain how Next Limit or Realflow work, but altering the point and polygon counts on-the-fly for a standard Cinema 4D Polygon object wouldn't be so simple nor could it be implied via PLA animation. These just aren't suited to the purpose. This would truly require some form of alternate approach (a plugin object perhaps).
A really simplistic alternative (probably stupidly simplistic) might be to have an object per frame and simply turn visibility on on a frame basis - then turn it off again in the next frame. You would basically have a long set of stills that could be rendered as an animation. Since each frame is an independent object, the concerns of point/polygon count would be completely avoided. There would need to be an animation track for each object to control the visibility on/off switch timing or maybe a Time track and XPresso could be used similary (?). One interesting problem would be texturing. Imagine having to texture 300 objects separately in a 10 second animation - though it would be possible to use one Material for all of them.
otomo
01-11-2008, 08:35 AM
A really simplistic alternative (probably stupidly simplistic) might be to have an object per frame and simply turn visibility on on a frame basis - then turn it off again in the next frame.
Exactly this is done by this little xpresso-setup which i attach here.
a plugin solution which loads an object at one frame and unloads it on the next frame to get the next object in the sequence would be much better, memoryload-wise.
Doing fileaccess during rendering is a very bad idea. It's one of the most crash prone ways to program an expression in CINEMA 4D.
Cheers
Björn
otomo
01-11-2008, 09:39 AM
Doing fileaccess during rendering is a very bad idea. It's one of the most crash prone ways to program an expression in CINEMA 4D.
Cheers
Björn
Do you have another good idea to achieve the same result? Or is there no alternative to load all meshes at once?
Roberts idea is rather easy to apply.
If all objects have the same topology you can store the different shapes as morph states and animate between them.
Cheers
Björn
otomo
01-11-2008, 11:09 AM
Roberts idea is rather easy to apply.
If all objects have the same topology you can store the different shapes as morph states and animate between them.
Cheers
Björn
but thats the point here! fluid simulation doesnt generate meshes with the same topology.
I never used RF, it was a general hint on how to avoid loading meshes at rendertime.
From what i see loading all meshes and switching visibility as Robert suggested is the best solution.
Cheers
Björn
unseenthings
01-29-2008, 05:46 PM
I've used exactly the scenario described here with an xpresso setup I found a while back to do blender fluids just fine. It fired visibility of one per frame with all objects loaded, one material applied to all of them, and IIRC, one hypernurbs object to smooth. It worked quite nicely, and could be rendered using netrender (which isn't always the case with fluid solutions).
This was the result of my initial blender fluids to cinema 4d test (http://www.unseenthings.net/blender_fluids_test.mov). I also posted about how to get all those files into cinema at once (http://forums.cgsociety.org/showpost.php?p=4510260&postcount=16) without importing one at a time. If you just drag them from the Windows Explorer (for example) -- they'll all come in as individual files. If you use the content browser, though, you can load a whole slew of them into one scene at once.
Anyway.. hope this helps.
soccerrprp
02-20-2008, 06:54 PM
BTW, does anyone have an animated sequence in OBJ format that I can use to try out the xpresso setup?
Thanks.
Richard
EDIT: Request filled. :)
LemonNado
02-26-2008, 03:23 AM
Loosely related to this thread..... keep an eye out for the next version of Groboto, that will have an output for .obj export as alternative for render only output. A nice thing for the mograph enthusiast 8).
Rainer
http://www.groboto.com/
CGTalk Moderation
02-26-2008, 03:23 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.