davebac
Topic Author
Posts: 19
Joined: 09 May 2014, 03:21

CryEngine Bindings

01 Oct 2016, 01:34

I have put some of my efforts on hold (which is why I never finished my rewired bindings) while I investigate moving to either UE4 or CryEngine V, and right now I'm leaning more towards the latter than the former.

So -- I'd have to switch from a Unity license to an Indie license to do it, not a big deal probably.

But I'm curious if anyone has tried to write CryEngine V bindings for Noesis?

* I'm just curious if anyone has tried it -- I'm not asking for someone to devote resources to it who is already overworked. ;)
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: CryEngine Bindings

03 Oct 2016, 22:32

I would say nobody tried that. At least nobody tried and told us about it.

But there is always a first time... : ) Don't worry about switching licenses, I am sure we will find a compromise.
 
davebac
Topic Author
Posts: 19
Joined: 09 May 2014, 03:21

Re: CryEngine Bindings

08 Oct 2016, 01:20

It does not look like it would be terrible. Thinking about it.
 
davebac
Topic Author
Posts: 19
Joined: 09 May 2014, 03:21

Re: CryEngine Bindings

11 Nov 2016, 00:33

I would say nobody tried that. At least nobody tried and told us about it.

But there is always a first time... : ) Don't worry about switching licenses, I am sure we will find a compromise.
In CryEngine C# (Mono), they use the Visual Studio 2015 C# compiler set to 4.6.2 profile then run the resultant code in Mono. The C# is structured similarly to Unity.

Canvas derives from SceneObject (GameObject) and owns a Texture2D which is either a DX11 or an OpenGL ARGB32 texture. There are additional SceneObjects for things like buttons or panels in the graph, and then it does an in-order traversal of the scene graph and everything draws itself to the Texture2D, then it maps that to an unlit quad or w/e at an engine level.

There's a separate UIComponent (MonoBehaviour) class that receives the events, and it just has virtual functions for each event type that it's going to receive -- mouse events and whatever -- and just provides a function to do whatever needs done.

So in theory -- I'd use the C# API, and I'd derive from Panel (probably). and have a NoesisPanel -- and that'd do the rendering steps. And then there'd be an event forwarder UIComponent. That'd provide a level of integration similar to the Unity API, I would think. I'd assume, with the C# API, that IPropertyNotify and friends would just work. I'd probably need to write an equivalent to Dispatcher, since I don't think Noesis provides one and I don't think CryEngine does, either -- but I'd want Invoke and InvokeAsync, at least, that could be used to run on the main thread.

Beyond that, I'd want to see if I couldn't provide a SceneGraphDataSource class and appropriate Flow Graph nodes for basic UI stuff, as well as a FlowGraphCommand for mapping ICommand to a Flow Graph.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: CryEngine Bindings

11 Nov 2016, 22:00

I'd assume, with the C# API, that IPropertyNotify and friends would just work. I'd probably need to write an equivalent to Dispatcher, since I don't think Noesis provides one and I don't think CryEngine does, either -- but I'd want Invoke and InvokeAsync, at least, that could be used to run on the main thread.
Yes, there is support for IPropertyNotifyChanged and ObservableCollection in C#. I recommend using the latest 1.3 Beta because there are many improvements in comparison with 1.2. And we are actively working in that version now (next beta is coming next week).

Could you send an email to info asking for access to that version?

Thanks!
 
maconbot
Posts: 14
Joined: 30 Jul 2013, 07:33

Re: CryEngine Bindings

23 Nov 2016, 01:19

If you throw your efforts up on GitHub I will try to find time to contribute. I will say that doing the CPP would have more reach as it would then work in both CryEngine and Lumberyard. But perhaps one then the other after learning is done from the easy path.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: CryEngine Bindings

23 Nov 2016, 09:03

Nice! Ask for help if you need it and remember to use the 1.3 version (not 1.2).
 
davebac
Topic Author
Posts: 19
Joined: 09 May 2014, 03:21

Re: CryEngine Bindings

29 Nov 2016, 05:54

If you throw your efforts up on GitHub I will try to find time to contribute. I will say that doing the CPP would have more reach as it would then work in both CryEngine and Lumberyard. But perhaps one then the other after learning is done from the easy path.
https://github.com/dbacher/noesisgui-cryengine

Haven't started anything yet, but set up a repos.
I'd assume, with the C# API, that IPropertyNotify and friends would just work. I'd probably need to write an equivalent to Dispatcher, since I don't think Noesis provides one and I don't think CryEngine does, either -- but I'd want Invoke and InvokeAsync, at least, that could be used to run on the main thread.
Yes, there is support for IPropertyNotifyChanged and ObservableCollection in C#. I recommend using the latest 1.3 Beta because there are many improvements in comparison with 1.2. And we are actively working in that version now (next beta is coming next week).

Could you send an email to info asking for access to that version?

Thanks!
Sure thing, and yeah -- you guys have been extremely busy. :)
 
davebac
Topic Author
Posts: 19
Joined: 09 May 2014, 03:21

Re: CryEngine Bindings

29 Nov 2016, 06:01

For C++, you'd probably start by copying:
D:\CryEngine\Crytek\CRYENGINE_5.2\Code\CryEngine\CryCommon\CrySystem\Scaleform

That has most of the mechanical stuff Noesis needs -- it's an almost-COM object that manages their interface to Scaleform. My thought is you don't need to interoperate with Scaleform because that would get super ugly super fast and just no, no, no, no no. :)

It looks like it would be straightforward to gut that and map it to Noesis instead, which would get you the same level of functionality that Scaleform has in terms of events, ability to render on panels, etc. I might take a crack at it, I need the C# side worse than the C++ side and so I will be prioritizing that myself, but probably will get around to it eventually if nobody else beats me to it.

When you create the panel, it creates the COM object and binds it -- and then hands it a mesh and a texture. Shouldn't be any problem to render to the texture. There's also an interface used for receiving events, and so it'll tell you that a mouse click has happened, I didn't check, I'd assume that comes with UV coordinates because how the heck else would you do it -- and so probably it's just a matter of forwarding the mouse and whatever events through.

Anyway, it looks straightforward to me.
 
davebac
Topic Author
Posts: 19
Joined: 09 May 2014, 03:21

Re: CryEngine Bindings

17 Mar 2017, 02:43

I have a small change in plans.

I was trying to work the reference renderers against CryEngine, but CryEngine is not exposing enough -- and so what I'm going to do is port the C++ side and write a custom renderer (same as the Unreal Engine 4 integration is doing), and then I think at that point C# can come along with just an additional Init function. Could be wrong.

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 61 guests