Welcome, Guest

Author Topic: Downloading the required files  (Read 3894 times)

ovmonk

  • Posts: 8
    • View Profile
Downloading the required files
« on: March 03, 2015, 11:34:49 PM »
Hello,

I was wondering where I can download the required files to make coherentui work in the latest version of cryengine.  I currently have the Plugin SDK working  and I can load that up but I lack a certain bunch of folders and dlls to make the coherentui plugin compile.

Thank you for your time,
~OV

ovmonk

  • Posts: 8
    • View Profile
Re: Downloading the required files
« Reply #1 on: March 04, 2015, 12:16:30 AM »
I feel that I should add I requested a download on the download page as well.

Hristo

  • Guest
Re: Downloading the required files
« Reply #2 on: March 04, 2015, 12:30:49 AM »
Hi ovmonk,

Yes, you should request a download from our download page - http://coherent-labs.com/download/

Also please note that currently only version 1.* of Coherent UI is available for CryEngine.

ovmonk

  • Posts: 8
    • View Profile
Re: Downloading the required files
« Reply #3 on: March 04, 2015, 12:40:22 AM »
I have submitted the request.  How long will the trial version last and how much would it cost a single developer to purchase the full version?  Also, for the ETEX_Formats, is there a way to force dxgi_format_b8g8r8a8_unorm into Cryengine or am I stuck copying the texture like a chump?

Thanks for the help.

Hristo

  • Guest
Re: Downloading the required files
« Reply #4 on: March 04, 2015, 09:21:12 AM »
Hi ovmonk,

The trial period of Coherent UI is 30 days. Please contact our sales team at sales@coherent-labs.com for the license cost.

Regarding the copying of texture - Can you elaborate how exactly do want to use the textures and which copying do you want to avoid?

There is a branch on github that demonstrates how a Coherent UI view on the HUD can use shared textures. That way the texture does not have to be copied from the GPU and back.

However if you want to create the textures directly from the game engine without copying it this is not possible because we use different texture formats.

ovmonk

  • Posts: 8
    • View Profile
Re: Downloading the required files
« Reply #5 on: March 04, 2015, 11:30:09 AM »
What about for surfaces then and not the HUD?  This is what I'm wondering about:

CoherentUISystem.cpp
Code: [Select]
 Coherent::UI::CoherentHandle CCoherentUISystem::CreateSharedTextureDX11( const CreateSurfaceTask& task, TexturePair* outTexturePair )
    {
        // The shared texture's format for DX11 must be DXGI_FORMAT_B8G8R8A8_UNORM.
        // There is no corresponding ETEX_Format and after injecting the created
        // texture, COM errors occur.
        // TODO: Find a way to fool CryEngine into accepting a DXGI_FORMAT_B8G8R8A8_UNORM texture.
        ...
      ITexture* pCryTex = gD3DSystem->InjectTexture( pD3DTex, task.Width, task.Height, eTF_A8R8G8B8, 0 );
        ...
    }
And then in CoherentViewListener.cpp we have
Code: [Select]
 void CCoherentViewListener::DrawFrameDX11SharedTexture( Coherent::UI::CoherentHandle handle, int width, int height )
    {
             ...
             pContext->CopySubresourceRegion( pDestResource, 0, 0, 0, 0, pSourceResource, 0, NULL );
            ...
    }
You're saying that injecting the texture does not involve copying it?  If so then that's pretty cool.  I've just been trying to figure out if there would be any conversion between eTF_A8R8G8B8 and the DXGI_FORMAT_B8G8R8A8_UNORM formats. And if there is a conversion that needs to be done I was wondering if any DXGI_FORMAT at all would be compatible so that no copying would have to take place.  Of all the formats found here I mean. https://msdn.microsoft.com/en-us/library/windows/desktop/bb173059%28v=vs.85%29.aspx

Nick

  • Administrator
  • *****
  • Posts: 475
    • View Profile
Re: Downloading the required files
« Reply #6 on: March 04, 2015, 12:02:24 PM »
The surfaces created in ViewListener::CreateSurface are ones that Coherent UI draws into and don't really need a corresponding ITexture. When drawing is done, it's signaled through the ViewListener::OnDraw callback where you need to copy the surface - no matter whether you use shared memory or shared textures. That's because there's no guarantee that Coherent UI won't draw into that texture while you try to display it later, so you'll have corrupted results. The shared textures transport avoids copying the texture between the Coherent UI GPU process and the game, which saves a lot of time and is the way to go, but it can't eliminate copying completely. The good news is that the copy you need to do is GPU->GPU memory so it's as fast as it can be.

The branch in github that Hristo talked about implements shared textures for HUD views and the idea was to extend it for 3D objects as well, but unfortunately it was never finished. Basically, CreateSharedTextureDX11 needs to create a texture through the D3D device and not care about getting it into an ITexture object. Later, when OnDraw is called for that texture, you need to copy it into an existing ITexture so CryEngine can display it. This ITexture is already created in the plugin and basically you need to change the ID3D11DeviceContext::CopySubresourceRegion call because it can't copy a BGRA surface (the Coherent UI one) into a RGBA surface (the ITexture object). You can easily do that with the fullscreen triangle shader, just set the ITexture as a render target and the BGRA surface as a shader resource.
R&D Director @CoherentLabs

ovmonk

  • Posts: 8
    • View Profile
Re: Downloading the required files
« Reply #7 on: March 05, 2015, 01:14:43 AM »
This all is good to know.  It's cool you went so in depth too.  As a hypothetical, if the Coherent UI textures started as RGBA instead of BGRA would you need CopySubresourceRegion at all?

Also, could someone please tell me how I go about getting the 1.* version of CoherentUI? Hristo was nice enough to mention that and I thought I would get a choice in the download link but I automatically got the latest version.  Trying to compile the plugin defintely fails with 2.5.3.0.

ovmonk

  • Posts: 8
    • View Profile
Re: Downloading the required files
« Reply #8 on: March 05, 2015, 10:36:13 PM »
Last time I mention it in this thread but I would definitely appreciate a tad bit of help with the download.  Should I contact sales or is everyone busy with GDC meaning I'll meet them tomorrow?

Bobby

  • Posts: 87
    • View Profile
Re: Downloading the required files
« Reply #9 on: March 06, 2015, 01:36:23 AM »
Hey Ovmonk,

Sorry for the late reply. Indeed we are busy with GDC right now.

There is no need to contact sales I will send you a PM with the download link for the version you need.

However, bare in mind that v2.x is the supported product and there are a lot of improvements in it.
With that in mind, if you have the time and desire, it would be graet if you could migrate the plugin for the 2.x API.
Most changes are trivial but just require some time. There won't be any problem to extend your trial
by 1-2 months if you decide to update the plugin.

Also, if you are in San Francisco you can find us at GDC! I am sure our guys there will be glad to discuss any
ideas or questions you might have.

Tags: