Search Unity

Cinema4d Release 11 and unity3d

Discussion in 'Asset Importing & Exporting' started by TobiasLingen, Oct 24, 2008.

  1. TobiasLingen

    TobiasLingen

    Joined:
    Jul 29, 2008
    Posts:
    13
    Hallo everyone!

    I am considering to upgrade to the newer Release 11 of cinema4d. Does it work fine with unity3d like the old release 10? If anybody knows, I would be very thankful, because I do not want to get an expensive surprise...
     
  2. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    So far R11 has proven to be the best when it comes to a stable/functioning pipeline between the two apps. FBX has seen some fixes and things generally work better. I am not an animator/rigger so I can't speak for that department. Other than that, I'd upgrade if I were you.

    Thomas
     
  3. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    Thats good news.

    The flawed fbx export of c4d was always a thorn in the paw, but after visiting the maxon roadshow, where i saw the presentation of R11s new features, i really wanted to get it, but i was kept from buying it, because i feared new issues with fbx transfer. Guess, the way is open now.

    Thanks for the info!
     
  4. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,774
    Did they also implement more than one UV set per model, now?
     
  5. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    More than UV per Model is already possible since Version 10.x

    The Problem is, that the fbx-exporter doesnt export them (due to some internal problem with the base code of C4D R10.x,,, so Maxon stated)...

    Is there someone willing to test for us with R11?
     
  6. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,774
    Seriously? I'm on R10.5 now but it does not seem to work for me :?:

    Offtopic - I like your signature, BTW. :wink:
     
  7. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    I just did a tutorial on light mapping where I am using two textures and two uv sets on one model inside Cinema 4D R11 and export them as FBX in the end. Works just fine for me.

    If you are interested then please check my video tutorial and PDF here:

    http://3dattack.us/shop/index.php?page=14#120


    Thomas
     
  8. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    It´s a bit tricky. The UV-Map-Tag needs to be in front of the Material wich should use it. So your Tags on the right should look somewhat like this:

    Phong-Tag | UV-Map-Tag | Material-Tag | UV-Map-Tag | Material-Tag

    Maxon said, its a workaround, but should work (wich it does). The fatal problem is, that you dont get it out of C4D...

    ( "Offtopic - I like your signature, BTW. ;)" | Thanks. ;) )
     
  9. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    UH YEAH! This would (sadly) kick Cheetah3D out of my workflow. But never the less... great news! And i will take a look at your tutorial! Thanks for sharing.

    Frank
     
  10. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,774
    Very cool. I guess I need to invest in R11.
    If they'll implement Object to Object Baking and a Node Editor for the materials, now I'm happy. ^^

    And thanks for the Multi-UV info, Alpha-Loup. :D
     
  11. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    It's not a workaround or buggy it's simply how Cinema currently handles more then one UV tag. It's not really a limitation but surely somewhat "tricky" if you don't know how to set it up correctly. Not even the manual states that properly I believe. Anyhow, in case you guys upgrade to R11 please report any oddities you may encounter so I or you can report this directly to Maxon (bug report).

    That's the only way to make sure we get the best possible pipeline. Something that really needs testing is Character rigging (in R11) and how well it translates into Unity. I am not an animator so it would be pointless if I test this. Anyone else here with R11?

    Thomas
     
  12. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Here is a shot of the tutorial I did (Video and written PDF).


    Thomas
     

    Attached Files:

  13. filmcraft

    filmcraft

    Joined:
    May 26, 2006
    Posts:
    109

    I just bought this video (I had bought all your other ones as we before) and just wanted to tell you this exact problem was bothering me before and this definitely helped me. I would be really interested in buy more of your video's especially the ones that have a direct link/tie-in the unity. Please let me know if you decide to come out with some more.
     
  14. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Hey there,

    Thanks for your comments. Is there anything specific you would like for me to do a video tutorial on?

    Thomas
     
  15. filmcraft

    filmcraft

    Joined:
    May 26, 2006
    Posts:
    109
     
  16. Yann

    Yann

    Joined:
    Oct 20, 2007
    Posts:
    432
    ditto. I have bought all your videos, too :D
     
  17. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Thanks guys! Appreciate your input and support :D

    I will create at least one new tutorial next week. Haven't had that much time lately to create new videos. Quite a time consuming task. I'll keep you folks updated!

    And thanks also for the long list of ideas "Filmcraft"!

    Thomas
     
  18. filmcraft

    filmcraft

    Joined:
    May 26, 2006
    Posts:
    109
    No problem, let me know if you want me to create a more detailed outline on any of those, were your target audience!
     
  19. mia

    mia

    Joined:
    Dec 31, 2007
    Posts:
    83
    edit: disregard this post, I figured it out right after posting! (typical). Thanks again for the video Thomas and look forward to more C4D<->Unity tuts!
    ----------

    I bought the video - good information and great technique to seperate the lightmap from the main tex. It appears this process only works for Lightmapped objects though(?). Is that correct?

    Can anyone explain how to apply > 1 texture to a single mesh (i.e. make object editable, select some polys, apply a texture, repeat) and then have it appear in Unity with > 1 material slots for those textures?
     
  20. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Hi there Mia,

    You can do that simply by UV mapping your object(s) and applying different textures to different UV's. It still is one texture sheet in the end. You could have several objects use the same texture sheet in C4D. Maybe I will create a video on that the coming week :)

    Thomas
     
  21. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    A more detailed request will sure help Filmcraft. I can't however do it all since I am not good at rigging/character animation. Maybe I'll find somebody who can take over that part. Everything else is just a question of finding the time :)


    Thomas
     
  22. phoen

    phoen

    Joined:
    Oct 25, 2005
    Posts:
    94
    i too bought your video-tutorial, it shows how to generate a lightmap.
    but sadly its missing what i was looking for - the use of two uv sets on one model. the exported c4d/fbx file always contains just one uv map.

    please correct me if im wrong.

    greetings p.
     
  23. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    I'm in the same position. I just watched the tutorial and while it was very helpful, the key point of how to get two UV maps into Unity was skipped. If anyone can explain this I'd really appreciate it. Of course, I first I have to work out why Unity won't import Cinema 4D R11 models.

    Thanks.
     
  24. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    I've got the model importing working again and will investigate lightmapping.
     
  25. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Ok to answer your folks questions. The only thing I didn't show in the video was me exporting the model as FBX by hand. I don't trust the current "plugin" that works in the background since it's outdated. Doing the export by hand has proven to be the best solution at the moment.
     
  26. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    Thanks for your reply. I discovered that FBX export disappears when you run Cinema 4D as a 64 bit app. Forcing it back to 32bit mode restores FBX export and Unity seems a lot happier with it. I've tested a model by adding two textures; one tiled tex and one lightmap. This works in Unity as advertised. Now to test things further.
     
  27. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Just to clarify this. FBX is not available (yet) under 64 bit. So this is not a bug but a limitation currently. Besides, quite a few plugins aren't 64bit yet so you would be better of running 32bit for a while.
     
  28. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    Thanks. I'm running in 32bit mode for the moment.

    One thing I can't seem to work out is how to have more than one texture on my model, beside the lightmap. Is this possible with Cinema 4D and Unity? What I mean is that I need to place several textures on my model: floor tiles, desk wood, wall plaster etc, then apply a lightmap over the whole lot. I'm trying this but all I get in Unity is the option to add a single texture.

    Sorry if I'm missing something obvious.
     
  29. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    You will need to uv map your objects of course and then it's possibly to have your objects share textures sheets or use different parts for different textures. If you have/had watched my tutorial you would know that you can use multiple textures per object or like mentioned earlier have several objects use one texture sheet (uv maps have to be made for every object and you will have to arrange them on the UV space accordingly so they don't interfere with each other).

    Hope that helps a bit.
     
  30. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    I watched your tutorial and I'm following the workflow you described. However, once my model is in Unity I only have a single texture slot.

    I may not be explaining the problem very well, so here are a couple of screenshots to illustrate.

    The model has several polygon selections for areas such as the desk surface, desk sides, floor etc. Each of these has it's own texture. I then duplicated the UVW tag and add the overall lightmap texture. In Cinema 4D everything works as expected but when I bring the model into Unity (via direct import or FBX) I can only see one material slot, which seems to be the final lightmap one. Therefore I can get my lightmap working in Unity, but can't use the other textures for the model.

    I tried increasing the Materials : Size value in the Mesh Rendered inspector and while that allows me to add more materials, they simply tile over the entire model rather than corresponding to any polygon selections.

    Is it a limitation of Cinema 4D and the FBX export that models can only have a single texture applied, or am I doing something wrong?

    Any help is much appreciated.
     

    Attached Files:

  31. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    I did some more testing and it seems to be the second UV map that causes problems. Without it and the lightmap texture everything works as expected; I can import models with multiple textures in Unity. As soon as I add the second UV map and lightmap it breaks and I can only have a single texture slot.

    Has anyone found a way around this? I'm a bit stuck until I figure it out.

    Thanks.
     
  32. azeitler

    azeitler

    Joined:
    May 14, 2008
    Posts:
    162
    has anybody actually managed to get a second UV set out of Cinema4D into U3D?
    I have been sitting here for hours trying to get it to work, but it just does not.

    If anyone really managed to do this, could he please put together a small example c4d and unity project?

    Thomas, I bought your Lightmapping video and it is really good, except the fact that you are not even using the 2nd uv in the example scene you provided. and the exported file in the example project that came with your files does not have a second uv set imported.
     
  33. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    I don't think this can be done. I was hoping for a reply on this subject too, but I haven't heard anything. It looks like I'll have to find another way to get my lightmapped models into Unity.
     
  34. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    I am not quite sure why you people aren't getting the same results as I do. Maybe there is a misunderstanding why somebody would use a secondary UV set.

    A secondary UV set is commonly used in combination with using a "Lightmap". So in Unity one would choose the "Lightmapped" shader in order to get "Two Texture" slots.

    Hope you guys follow me so far? Given that fact you want to create one texture that tiles and one that doesn't (the lightmap itself). So in essence, a brick texture that tiles nicely and a baked lightmap that you want to apply in a non-tiling way.

    I just did another test in Cinema 4D (as seen in my video) and I am getting the exact same result. It works for me.

    Hope this makes things clear now?

    Thomas
     

    Attached Files:

  35. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    Thanks for your reply. I understand what you're describing, but what I need is a model with several tiled textures, plus a single lightmap. I'm sorry if I wasn't being clear earlier. If you look at my screenshots you'll see that my model has several polygon selections. Each of these is used by one of the tiling textures. For example, part of the model is the desk which uses the wood tex, another part is the floor which uses the tiles tex, another is the wall which uses the plaster tex. These all use the first UV map. The second UV map is used by the single lightmap texture. When I bring this into Unity I can only access a single texture slot.

    I did some testing and it seems I can have the following in Unity:

    1 - A model with a single tiled texture and a lightmap
    2 - A model with multiple tiled textures but NO lightmap

    What I can't have is a model with multiple tiled textures AND a lightmap.

    I've attached some screenshots to illustrate, plus a test Cinema 4D file.

    Thanks for your patience.
     

    Attached Files:

  36. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Well, your workflow/setup doesn't make much sense to me as a matter of fact. Right now your object uses 4 texture sheets. You can reduce that to exactly 2 (the base texture and the light map).

    Secondly, you are using "tags" to restrict your textures to certain parts of a model. This will not work in every case and I would advise to change your workflow. UV map your object and texture it and then apply your lightmap.

    This is usually the way people create game content. Cinema 4D is very capable of creating more than two uv sets for an object and you can export them as well as I have now proven several times. I think you are not understanding the workflow and that's why you are having the issues you are having (not trying to sound mean, rude or anything here).

    Then again, I could be totally wrong but I manage to get my objects textured and lightmapped just fine. I would uv map your object, texture it with one base texture and then light map it.

    What you could do in your case is to separate the objects (floor, wall etc) and then export. In that case your setup should work.

    Thomas
     
  37. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    Sorry if the workflow seems odd. If I combined my textures into one map I'd have to make it enormous to get the necessary quality. My reason for using separate textures is that I can tile a smaller texture over an area to get the desired effect. These textures are also used by other shaders within the project, so it pays off. I thought this was quite a common way to work. For example, texturing a landscape model is done using tiled textures and a splat maps, rather than having one enormous texture map.

    Are you saying I should simply use one texture map for my entire model? If so, how can I get decent texture quality but keep the file sizes and memory usage down? I'll try splitting the model as you suggest and see how I get on.

    Thanks for your help.
     
  38. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    No you don't HAVE to make it one texture sheet. You should separate your object if you want to stick with your workflow. Right now your model is one piece and Unity doesn't know which texture goes where. So separate your object into "Wall, Ceiling etc" and then export.
     
  39. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    Will do. Thanks for the advice.
     
  40. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    Hypothetical question, so I can get my head round all this: If I have a large model of a building which I need to texture and lightmap what's the best approach? Up till now I was under the impression that the best way was to create polygon selections for different areas such as the walls, wood frames, roof surface etc. and give these separate tiled textures. Then I'd add a lightmap on top. However, you say this isn't the best approach and that I should split the model into parts. Are you saying I should have a separate mesh for each texture section? E.g. one mesh for walls, one for frames, one for the roof surface? Wouldn't this make collision detection more complex than necessary, and wouldn't I need separate lightmap textures for each mesh, rather than a single one?

    Sorry if I'm missing the point, but it's always easy to miss things on a text based forum. Thanks for all your help.
     
  41. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Like I said earlier. Get rid of thinking in "texture tag" terms. It is best to UV map your object and apply textures to certain areas by setting up the UV's accordingly. Simply the best thing to do is to have several objects use one texture sheet if possible. Most hardware doesn't have a problem with poly count that much anymore but texture sizes can quickly become a problem.

    In Cinema 4D you can easily have several objects use one texture sheet yet each object uses only a certain portion of the UV space. Doing so is common practice.

    Google around and look around on how people set up props or environments. Have a good look at their uv set up. Browse forums that deal with "game art" mostly so you get a better understanding of how things generally work (workflow / pipeline).

    Thomas
     
  42. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    pdrummond,
    Seriously check out the following book by Luke Ahearn:

    http://www.amazon.com/3D-Game-Textu...bs_sr_2?ie=UTF8&s=books&qid=1229980655&sr=8-2

    He also has released another recently...
    http://www.amazon.com/3D-Game-Envir...bs_sr_1?ie=UTF8&s=books&qid=1229980655&sr=8-1

    Then get yourself a copy of 3DKiwi's Bodypaint DVD training http://www.c4dcafe.com/3dkiwi/bpshop/index.html

    and even Thomas "UV Basics" video tutorial. The 8 page PDF is worth the price alone http://3dattack.us/shop/index.php?page=14&PHPSESSID=e97e9d06ad6ba799b9173d06fb28464c
    He also has a Specular mapping PDF for C4D that is just awesome.

    Everything Thomas has mentioned in this thread is clearly covered in the above resources. Bodypaint is your best friend. I avoided it for years doing Archviz choosing Selection Tags instead, but would never be without Bodypaint when designing for Unity3D.

    You have so many choices with C4D/Bodypaint to texure for Unity.

    - 3D Projection Paint entirely in Bodypaint
    or
    - UV map in Bodypaint then paint/create textures in Photoshop (roundtrip)
    or
    - Bake textures objects from C4D
    or
    - Use Bodypaint to share UV's for multiple objects on one texture map.
    - Tile textures using Bodypaint
     
  43. pdrummond

    pdrummond

    Joined:
    Jun 23, 2005
    Posts:
    185
    Thanks for the info. Will check it out.
     
  44. azeitler

    azeitler

    Joined:
    May 14, 2008
    Posts:
    162
    Thomas, thanks very much for the carification, I get it now and I think I should be able to use the 2nd set properly :)
     
  45. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,774
    I'm sorry to bump this thread again, but it's not working for me. If I apply two textures with two UV layouts only the first one in the list is recognised by Unity. Maybe it's something has changed with R11 but it simply does not work. I either get the tiling on the lightmap right or on the color texture but never on both at the same time.

    For me there's several thing not working with the way you described:
    1. In C4D the Texture tag has to follow the UV tag in order to be (at least in the program) be displayed correctly.
    2. No matter how I arrange the tags within C4D it's always just the texture tag closest to the object (the left-most) that is recognised by Unity. The other one seems to be ignored.

    I know that I'm doing it right inside Unity because if I'm trying to use two UV sets from within Blender it works flawlessly inside Unity.

    This is the only way I get it to display correctly inside C4D (see picture). I'm not using any exporter but let Unity import the .c4d file. And it's not working :(

    What am I doing wrong? I think I'm going crazy, here ....

    [edit] Allright - I just noticed I was supposed to export as FBX. The problem remains the same as Alpha-Loup mentioned on the first page, though. I don't seem to be able to get it out of Cinema. No matter how I arrange the tags after the object.
     

    Attached Files:

  46. n0mad

    n0mad

    Joined:
    Jan 27, 2009
    Posts:
    3,732
    Hello there,

    I'm actually planning my next 3D tool license, and C4D did catch my interest.

    As my iPhone game have a lot of char animations (fighting game ...), Thomas' request would be vital for my final choice.

    Did anybody tested interoperability between C4D Unity3D when it comes to skinned chars ?

    Thank you


    edit : oh and I'm talking about FBX export here.
     
  47. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    Unfortunately C4D cannot export more than one UV set per object via FBX, hence why you only see one set or the other mapping correctly in Unity.

    The only way to get the TextureMap UV and Lightmap UV set on the same object from C4D to Unity (that I know of) is C4D>Cheetah3D>Unity. I explain how in this thread http://forum.unity3d.com/viewtopic.php?t=20541 besides this bit of extra work in your pipeline and the $99 for Cheetah3D purchase it does work how you want.

    Please submit a feature wish to Maxon asking for Multiple UV set export via FBX.
     
  48. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572

    I came across this set of free video tutes http://www.webspaceinvader.com/ explaining how to get rigged C4D characters into Unity (the site takes about 30 seconds to load but videos stream fine). The guy who did these tutes actually works at Bournemouth Uni with Will Goldstone, creator of other Unity video series http://www.learnmesilly.com/
     
  49. n0mad

    n0mad

    Joined:
    Jan 27, 2009
    Posts:
    3,732
    Thank you for this link ;)

    So there is still this joint incompatibility ...

    Which gives a point to 3DS (where bones aren't joint based but pivot transform based, which is fully copatible with Unity).
     
  50. tolm

    tolm

    Joined:
    Feb 4, 2008
    Posts:
    61
    Joints import perfectly fine into Unity with R11. You just have to bake IK and XPresso.