Anyone got Cheetah3D to work with SceneKit correctly yet?

Anyone got Cheetah3D to work with SceneKit correctly yet?

If you haven't tried it yet, you can try exporting to .DAE a sample object with an animation. Problem is I get two animations, and no matter what I call them, they are simply called Animation 1 and Animation 2 in Xcode.

I know SceneKit has been updated since I last tried this, but I still get nothing new. Anyone had success?
 
If you haven't tried it yet, you can try exporting to .DAE a sample object with an animation. Problem is I get two animations, and no matter what I call them, they are simply called Animation 1 and Animation 2 in Xcode.

I know SceneKit has been updated since I last tried this, but I still get nothing new. Anyone had success?

I did not bring over any animation with it (yet) but I was able to export a textured model and import it into one of the scene kit demo projects. If I get something animated in the future I'll check back here or post an update.
 
My brief experiments with SceneKit were not terribly encouraging. There's no workflow help at all and the tools for working with DAEs are pretty terrible. If you have a nice DAE workflow (Maya?) and/or you're comfortable writing code in Swift/Obj-C to prise apart models, then it may be great. (I've seen one pretty neat game that I think was built with SceneKit.) On the whole, if you want to make a lot of use of 3D content you're almost certainly better off using Unity or Unreal.

It's a shame, because I love Swift (and I don't mind Obj-C) but writing a game in SceneKit would involve way too much infrastructure creation for my taste (it's like the bad old days when you had to roll your own blitter, graphics pipeline, etc. You end up building an engine before you get to start on the interesting stuff).
 
Last edited:
Hi,
I haven't tried SceneKit by myself but Preview.app and Quick Look use SceneKit to display DAE files and in both animations are displayed properly. So I'm quite sure that SceneKit imports the Cheetah3D generated DAE files properly.

For game development I would recommend Unity anyways. It's a full featured game engine and you get export options to Android, consoles, etc. virtually for free.

Bye
Martin
 

Attachments

  • Bildschirmfoto 2014-10-22 um 21.04.47.png
    Bildschirmfoto 2014-10-22 um 21.04.47.png
    107.3 KB · Views: 1,636
OK, I just tried it and it couldn't be (much) easier.

  1. You'll want the latest, greatest version of XCode
  2. Create a new iOS Game, of type SceneKit
  3. Build and run it — you should see a slowly spinning jet plane. That's the default DAE model.
  4. Take a Cheetah 3D file that uses simple image-based materials using images that are in the same directory
  5. Pick a take and export to DAE
  6. Drag the DAE and the images into the XCode Project Window. A dialog asking if you want to copy files etc. appears. You do — click OK.
  7. Click on the imported DAE. You'll see that you can explore the scene hierarchy and actually delete stuff. Delete anything you don't need, and take note of the name of the node you want to play with.
  8. Click on GameViewController.swift
  9. There's a line of code there that reads: "let scene = SCNScene(named: " .... ")" — replace the contents of the quotation marks with the name of your model file ("whatever.dae").
  10. Now look below for a line of code that reads let "ship = scene.rootNode.childNodeWithName("...", recursively: true)!"; change the contents of the quotation marks to the name of the root node you wanted.
  11. Run — voila.

Now, if you were using Unity the workflow would to achieve something similar would be:

  1. Drag Cheetah 3D file and associated images into Unity Project (no export necessary)
  2. Find the file in your project and drag it into your scene
  3. Press Play

There would be a little fiddling around to anchor the root, pick which animation is played by default. And the workflow advantage only increases as you do more complex stuff.
 

Attachments

  • Screen Shot 2014-10-25 at 11.01.39 PM.png
    Screen Shot 2014-10-25 at 11.01.39 PM.png
    294.8 KB · Views: 1,770
Last edited:
You forgot to mention animation. The only real example I have seen of an animated character working is in the sample project Banana.

The character, Explorer is a static model in one .dae file. The animation is separated into other .dae files, without the model (I don't think Cheetah is even capable of this).

I like this approach, but sadly, they used Maya to export, which is the only way to do it right now. I wish there was a solution to this.
 
You forgot to mention animation.

I didn't mention animation — but the example I did was animated and worked fine. I don't know how fiddly it is to actually control the animation (very, I imagine).

Consider that in Unity you can create a figure, assign one animation to each take (e.g. walk, run, shoot, land, breath, fall) import into Unity, set up an animation controller, and tie it to a character controller and you get all kinds of incredible stuff for free (e.g. smooth transitions between animations, such as a character going from "breath" to "walk" to "run" seamlessly based on the internal state of the character controller). This is the kind of stuff every game needs to do and in Unity it's "free" while in Swift or Obj-C it would be, literally, thousands of lines of code.
 
I didn't mention animation — but the example I did was animated and worked fine. I don't know how fiddly it is to actually control the animation (very, I imagine).

Consider that in Unity you can create a figure, assign one animation to each take (e.g. walk, run, shoot, land, breath, fall) import into Unity, set up an animation controller, and tie it to a character controller and you get all kinds of incredible stuff for free (e.g. smooth transitions between animations, such as a character going from "breath" to "walk" to "run" seamlessly based on the internal state of the character controller). This is the kind of stuff every game needs to do and in Unity it's "free" while in Swift or Obj-C it would be, literally, thousands of lines of code.

Sorry about that. I realized your character was animated. I just love the character.

Actually I got multiple animations working in SceneKit in around 30 lines of code.

Thanks for you help.
 
Getting multiple animations working in 30 lines of code is fine (again, zero lines of code in Unity) but that's not what I'm talking about. Unity gives you state machines, animation layering and blending, and so forth for free (and by free, I mean "without writing code you need to maintain and debug"; Unity itself is also kind of free now, but that's beside the point).

E.g. suppose you have a character that walks, runs, jumps, stands around, collides with things, and so on. You can get effects like seamless transitions from walking to running to falling to landing to colliding with a wall all based on your character's state with virtually no code (the only code you'd write would be the character logic — e.g. when I press the forward button the character's velocity increases in its local Z direction).
 
I don't find anything I need to do in SpriteKit worth needing to go to a complete package, and if I did I would choose the Unreal 4 engine. Unreal 4 is hands down the best "complete package there is", and is totally free for games that make under $3,000 and only 5 percent otherwise.

Why anyone would choose Unity is beyond me.
 
Why anyone would choose Unity is beyond me.

Because the Unreal 4 Editor doesn't run well at all on my Mac Mini, and Unity 5 does. :smile:

I'm very happy with Unity 5, though UE4 is incredible as well. For what I need, Unity 5 is fine.
 
Why anyone would choose Unity is beyond me.

Unity is now free up to $100,000 per annum revenue, then you need to pay for a license ($3000 for, say, Pro + iPhone Pro), which is at most 3%.

Aside from "Unity works on a Mac" (and indeed started out on the Mac), there's:

  • Unity supports more platforms than Unreal (e.g. Windows Phone, Web GL)
  • Unity can be scripted in C# (or "Javascript") either of which are easier than C++ (Unreal's "scripting" language). Unreal does have "Blueprints" which are great if, fundamentally, you're working on an FPS.
  • Unity has a ridiculously rich third-party tools/libraries community. Want to write a platform game, driving game, sailing ship combat simulation, role-playing game? Get a framework off-the-shelf and save yourself months.
  • Unity has actual documentation (go look in forums to find out how awesome the Unreal docs are).
  • Unity's workflow is really good. (Cavest: I haven't tried Unreal in the last few years. Unreal is way better for shaders if you're using a higher end package like Maya or 3DS Max — you can do WYSIWYG materials in your 3D tool whereas Unity involves a lot more hand-tuning.)


Unity is better for mobile, which is where the action is. Unreal is playing catchup. Most of the top mobile games at the moment are built with Unity. (If you're developing for Console or Desktop, by all means Unreal kicks butt.)

But, hey SpriteKit is awesome and it's sure a lot less work than writing the entire rendering pipeline from scratch (I've been there, done that). If you want to learn a bunch of stuff, working at a low level is great. If you want to get stuff done, especially as an indie developer or hobbyist, starting at a low level is going to kill you — you'll be working on your engine while everyone else is shipping.
 
Back
Top