Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Corona is the only runtime not supporting meshes?
Started by ubj3d.android Mar 05 2015 04:26 AM

77 replies to this topic
[TOPIC CONTROLS]
Page 3 of 4 1 2 3 4
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#51

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Corona Geek

  • 1,050 posts
  • Corona Staff

Download latest build or Corona and new Spine runtimes, and enjoy Mesh attachments in action.

Beware it's in open beta. Test well before shipping to production.



[TOPIC: post.html]
#52

kilopop

[GLOBAL: userInfoPane.html]
kilopop
  • Contributor

  • 258 posts
  • Corona SDK

Fantastic work, can't wait to try some tests.

[TOPIC: post.html]
#53

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Corona Geek

  • 1,050 posts
  • Corona Staff

Fantastic work, can't wait to try some tests.

 
Thanks. Also, big thanks to Esoteric Software. However, Corona being first user of Spine Lua runtime, there are a lot of problem there connected to mesh manipulations. That code never had chance to be properly tested before today, really.

There is open issue on Spine's github to fix it https://github.com/EsotericSoftware/spine-runtimes/issues/601

 

I will help as much as I can (I already am, as you can see from the issue)



[TOPIC: post.html]
#54

kilopop

[GLOBAL: userInfoPane.html]
kilopop
  • Contributor

  • 258 posts
  • Corona SDK

Found time to get into Mesh animations in Spine. Seeing some great early results.

 

Question vlads or anyone up with the Corona runtime. If you print to the terminal during skeleton:createImage it outputs the number of attachments in the spine object being created. But printing in skeleton:createMesh causes the terminal to output the attachments endlessly. I don't know how skeleton:createMesh works but is that normal?

 

To be more specific, the current code outputs every attachment in the spine object endlessly in the terminal.

function skeleton:createMesh (attachment, meshParameters)
	print("mesh = ", "examples/spineboy/images/" .. attachment.name .. ".png")
	local mesh = display.newMesh(meshParameters)
	mesh.fill = {type="image", filename="examples/spineboy/images/" .. attachment.name .. ".png"}
	return mesh
end


[TOPIC: post.html]
#55

pau7

[GLOBAL: userInfoPane.html]
pau7
  • Enthusiast

  • 43 posts
  • Corona SDK

Hello,

 

Thank you for adding meshes support. It is fantastic!

 

I've been playing with the new spine runtime. With the spine-boy-mesh example I had no problems, but when I try the "raptor" example some error occurs. Maybe I'm missing something, but it might be a bug of the beta version. Did anybody try to load this example? This is the error:

ERROR: Runtime error
/Users/pauors/Documents/01 Projectes/spine-corona/spine-lua/MeshAttachment.lua:88: attempt to perform arithmetic on local 'vy' (a nil value)
stack traceback:
    /Users/pauors/Documents/01 Projectes/spine-corona/spine-lua/MeshAttachment.lua:88: in function 'computeWorldVertices'
    /Users/pauors/Documents/01 Projectes/spine-corona/spine-corona/spine.lua:225: in function 'updateWorldTransform'
    /Users/pauors/Documents/01 Projectes/spine-corona/examples/raptor/raptor.lua:47: in function </Users/pauors/Documents/01 Projectes/spine-corona/examples/raptor/raptor.lua:38>
    ?: in function <?:169>

Now we are animating our own character. Let's see how it works. Thank you.

 

Pau Ors



[TOPIC: post.html]
#56

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Corona Geek

  • 1,050 posts
  • Corona Staff

Hello, pau7 and kilopop! There is an open bug on spine-runtime repo to fix Lua runtimes. Corona is first Lua runtime to ever support meshes, so there are some issues with it. Comments to that bug also contain some hacks to make Raptor example works.

 

I will take a look on why meshes are constantly being re-created. Anyway. I would suggest to avoid using meshes intensively - they are computationally expensive. Use in moderation.



[TOPIC: post.html]
#57

ChunkyApps

[GLOBAL: userInfoPane.html]
ChunkyApps
  • Contributor

  • 224 posts
  • Corona SDK

Hey guys, just so you know if you are using the latest version of Spine the mesh support will not work. They are in the process of updating the runtimes. If you rollback the version of Spine you are using to the version before (you can do this in the menu) it should work.



[TOPIC: post.html]
#58

yanko_popov

[GLOBAL: userInfoPane.html]
yanko_popov
  • Observer

  • 24 posts
  • Corona SDK

It seems they've changed the name of the "ffd" container in the output JSON files to be called "deform" in the latest version of Spine. It is pretty easy to make it work again - just go to SkeletonJson.lua file in the spine-lua folder and change row 469 

from

local ffd = map["ffd"]  

to

local ffd = map["deform"]

Now even the newest version of spine should work with meshes again. 



[TOPIC: post.html]
#59

landoncope

[GLOBAL: userInfoPane.html]
landoncope
  • Contributor

  • 112 posts
  • Corona SDK

You that have successfully used meshes - which version of Spine were you using?



[TOPIC: post.html]
#60

ChunkyApps

[GLOBAL: userInfoPane.html]
ChunkyApps
  • Contributor

  • 224 posts
  • Corona SDK

I'm using version 3.2.01 and it worked.



[TOPIC: post.html]
#61

landoncope

[GLOBAL: userInfoPane.html]
landoncope
  • Contributor

  • 112 posts
  • Corona SDK

Okay, I got it working with the newest version (3.3.07). I did have to do the change that yanko_popov suggested above, not use the shear tool in Spine, and override the createMesh function to load from my image sheet, and now it's working perfectly.



[TOPIC: post.html]
#62

landoncope

[GLOBAL: userInfoPane.html]
landoncope
  • Contributor

  • 112 posts
  • Corona SDK

Does anyone know if the shear tool will eventually be supported? My animator really wants to use it...



[TOPIC: post.html]
#63

hector7

[GLOBAL: userInfoPane.html]
hector7
  • Enthusiast

  • 47 posts
  • Corona SDK

Hi @ChunkyApps just finished watching the latest CoronaGeek episode where you showed a very cool sample of using meshes in Spine, would it be possible that you can share your sample? A couple of years ago I did a module for implementing Spine animations in Corona (SpineHelper) but I think your example is way a lot simpler than the one I did

[TOPIC: post.html]
#64

ChunkyApps

[GLOBAL: userInfoPane.html]
ChunkyApps
  • Contributor

  • 224 posts
  • Corona SDK

Hi @hector7 I've used your SpineHelper  in the past and even watched all your tutorials. Thank you for the work you've done on that. A lot of people I speak to are still using your library even now. The code I used I believe was from the latest Spine Runtime example at that time. However, a Spine update broke that code a bit. @yanko_popov above in this thread says he fixed it but I have not tested that. I have been waiting patiently for Esoteric to update their official runtime.

 

With that said, I'd be happy to share the code with you as I have it. I was planning to put it on GitHub once I had an up to date runtime so as not to cause more confusion but I can email you what I have if you wish. Is your appsglobal email still  functioning?



[TOPIC: post.html]
#65

hector7

[GLOBAL: userInfoPane.html]
hector7
  • Enthusiast

  • 47 posts
  • Corona SDK

Hi @ChunkyApps, Wow! It is awesome to hear that my code has helped other people. If you can share the code as it is that'd be great, my appsglobal email address is still working, I just need to refresh my memory as it's been a while since the last time I coded something in Corona, but I really want to go back to making apps, I really miss it, I even need to go through my own course to re-learn what I taught there!



[TOPIC: post.html]
#66

ChunkyApps

[GLOBAL: userInfoPane.html]
ChunkyApps
  • Contributor

  • 224 posts
  • Corona SDK

@hector7- I sent it over. Let me know if you come up with any cool ideas. The official Spine Corona runtime should be updated soon I hope. Most of the other runtimes are already updated and I know it's on the list.



[TOPIC: post.html]
#67

hector7

[GLOBAL: userInfoPane.html]
hector7
  • Enthusiast

  • 47 posts
  • Corona SDK

Great, thanks a lot, let me take a look at the code, it will take me a few days as I need to refresh my memory :)

[TOPIC: post.html]
#68

landoncope

[GLOBAL: userInfoPane.html]
landoncope
  • Contributor

  • 112 posts
  • Corona SDK

I also am using your module @hector7. I've had to modify it here and there slightly, but overall it has been a great tool. Thanks!



[TOPIC: post.html]
#69

hector7

[GLOBAL: userInfoPane.html]
hector7
  • Enthusiast

  • 47 posts
  • Corona SDK

@landoncope thanks I'm glad it still working well and that has been helpful to you. I'll review it again to see if I can adapt it to the new features that the new version of Spine has

[TOPIC: post.html]
#70

sirmania

[GLOBAL: userInfoPane.html]
sirmania
  • Contributor

  • 154 posts
  • Corona SDK

@hector7 I am using your Spinehelper and it works great!!! Your tutorials are awesome and have helped me a lot. If you one day would add support for meshes I wouldn't complain  ;)  Great job!



[TOPIC: post.html]
#71

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,676 posts
  • Enterprise

Hey gang. This thread is getting a little long and it's really not about us not supporting meshes any longer. Can I suggest that you start new threads to ask questions about Spine-Corona integration that can be more focused? Spinehelper should certainly be it's own thread.

 

Thanks

Rob



[TOPIC: post.html]
#72

kilopop

[GLOBAL: userInfoPane.html]
kilopop
  • Contributor

  • 258 posts
  • Corona SDK

How is support for Corona mesh going? The runtime hasn't been updated in some time. 



[TOPIC: post.html]
#73

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,676 posts
  • Enterprise

Everything on our side is working. I understand that Spine has various runtimes and that the Lua one is being worked on. But that's a question for Esoteric.

 

Rob



[TOPIC: post.html]
#74

Esoteric Software

[GLOBAL: userInfoPane.html]
Esoteric Software
  • Observer

  • 20 posts
  • Corona SDK

The Lua and Corona Spine runtimes have now been updated to support all Spine features up to the Spine editor version 3.4.02, which is the latest non-beta Spine release. This means you can use meshes, linked meshes, paths, etc and it will work with Corona. :)



[TOPIC: post.html]
#75

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Corona Geek

  • 1,050 posts
  • Corona Staff

You rock!




[topic_controls]
Page 3 of 4 1 2 3 4
 
[/topic_controls]