Run-time Creating and Saving a customized Addressable Scene into a CCD bucket

To CCD Staff

We are at the stage of using CCD for prime-time for Creators who are using our Unity apps to design their own new customized Unity apps without using the Unity Editor.

In other words , they will have a Unity application or a third party application that generates Unity landscapes and characters while no Unity Editor used.

In the case of third party apps, we are done!

In the case of an actual Unity app which is an authoring tool as well, so to say, we need to be able to save an addressable scene which was customized by the Creative author straight from the Unity app into a CCD bucket. We are not interested in local Disk IO. Only need save current scene into CCD buckets.

Please send us some sample codes or which APIs to use and please specify a proper pipeline for such save function.

Thanx

Dara

Hi Dara,

Thanks for getting in touch here.
Would it be possible to share the full scenario?

Our understanding is the following: You have an application that lets users create their own assets. When the asset is created within the released Unity Application you would like the assets created by the unity app to save the scene as an addressable package and upload to the CCD bucket?

Please let me know If we misunderstood here. Any additional information will be helpful.

Best,
Seb

Seb

Thank you for your quick response, yes you understand it correctly!

We have the Unity Application, on MacOs and Windows already in place, I will post the application here shortly and I will post the source code into Plastic SCM cloud repo, so you could have an under the hood view if need be.

Before I proceed with my posts, all has to be compatible with 2022.1.0b2 or later , latest Input System, Addressables and Cinemachine.

In the application below, we are exclusively using Unity Terrain.

Dara

Hello Seb

Below is a Terrain Synthesizer, it is in its current form nothing unusually new or fangled, but it allows for runtime Terrain synthesis (we use the Synth word for reasons that would be come clear when we add our AI tools)

The SAVE button, on lower left (Yellow arrow down button) only saves the .obj of the Terrain and saves is into the local disk of the local player.

Goal: Save not just the .obj but the entire Terrain and if possible the entire scene into an Addressable Scene/Terrain stored into a CCD bucket.

If need be we send you the Cloud repo at Plastic to take a closer look.

Note: For Mobiles/Tablets we like to allow for touch-authoring i.e. finger-painting the Terrain, we can manage that ourselves , but any new ideas greatly appreciated.

Video of actual usage:

https://vimeo.com/671027991

Mac
https://www.dropbox.com/s/c6u86yxu4ufrvw7/TerrainAI_OSX.zip?dl=0

Win
https://www.dropbox.com/s/87inu9zrn0a58t8/TerrainAI_WINS.zip?dl=0

  1. Added Materials and 3D Brushes

  2. 3D Brushes control the shape of deformation

  3. Materials are realistic renderers, which shade and render 3D structures as though real

Navigation Operation:

Navigation: letters AWSD and QE and CV (lower caps)

AWSD for driving forward/backward/left/right
QE up/down
CV rotate around z-axis at the correct position

Seb we are not interested in any Editor code or application, as such found in the Asset Store, we are exclusively focused and vested in runtime Unity-Terrain Synthesis.

We are also not interested, at this time, in any third-party Landscape companies, we are focused on Unity-Terrain package.

Dara

Hi Dara,
After looking into this, unfortunately, I don’t think this is something that is possible within the current Unity environment or at least not without significant work arounds. From my knowledge, there’s no realistic way to generate Addressables assets at runtime and uploading that from a player. Now while it is possible to upload files from a player, it would be pretty complicated to do so securely. So at this time, what you’re looking to do really isn’t feasible but it is something that we are looking at to address in the future. If you do have any more questions, please feel free to ask!
Thanks

Thank you and I had guessed that much already.
I am willing to place SIGNIFICANT WORK AROUNDS to piece-by-piece transfer into CCD bucket and again piece-by-piece reconstruction in another player scene.

As long as I have the general recipe, the our team would code the rest and not burden on CCD team.

Could you help with the latter?

Dara

Example for the recipe:

  1. Transfer .obj of Terrain hight-map into CCD external file transfer (just a file, not an Addressable)
  2. Transfer all textures+materials into another external or Addressables content
  3. Reconstruct the Unity Terrain manually via a script in the new scene

Let me know

Hey Dara,

Apologies for the delayed response. I can definitely help you with the first recipe though I don’t really have any recommendations for 2 and 3. For uploading a .obj into CCD via a runtime app, you’ll most likely want to utilize the REST api. Documentation can be found here. Security would be a big concern here as we don’t want to bake an api key into your player. I’d definitely suggest some sort of vault here that your code could reach out to and grab the apikey. Then you would make a request to create the entry within CCD and upload the .obj using the REST api. Happy to expand on this idea if you need, but that would be the basic gist of getting a file into CCD from the player. Not exactly the most ideal solution but it’d get you there.

Thanks

  1. For the .obj we do have an alternative which was developed prior to announcement of CCD. Therefore in case of any difficulty we could always fall back on that system of ours, however that is option B for us.

  2. CCD’s cloud API, REST or not, is much more acceptable for us. So if you would be kind and help us with that RECIPE for .obj we would be in your debt and much obliged to implement and deploy

  3. APIKEY+Vault: We have access to datacenter space in Portland Oregon with some of the finest IT professionals in USA, if you could give us a spec for the APIKEY security, I am sure we could cook up a system that is acceptable.

Textures: We have been able to create and transport custom-textures for CCD/Addressables, so that item is manageable for us.

Materials: ? we need help here

Thank you again

Dara

I modified the Terrain Synth and now it writes into the local disk + into a Cloud Object:

This is our .obj cloud object stored in private Wolfram Cloud for our exclusive use by ours or any other third party application from the given URL.

The above Cloud Object was created, at runtime, from within the Unity applications above and we can easily pass that URL , at runtime, to other Unity apps to read and re-construct the .obj, as we have done 1000s of times before.

But we are concerned about this option for number of reasons, which I will not bore you with. However we like to be able to exactly do the same operations with Unity CCD:

  1. Create 3D object in Unity App at runtime

  2. Upload the String obj object into a CCDCloud object of some kind, at runtime, without any manual steps nor local file operations of any kind.

  3. At the same time or later, in another Unity app, or possibly another third party app read the latter Unity Cloud .obj object and successfully reconstruct it!

Let me know if I am clear.

Dara

Ryan to make your lives easier we could adjust our Unity app as follows:

DECONSTRUCT:

  1. 3D geometries in .obj Streaming JSON which we have the code for, no worries at your end

  2. Textures:

  3. URL based images

  4. CCD Bucket Addressable in some catalog

  5. Materials ??? no idea how to deal with new materials, for now let’s assume Materials are Addressables in yet another CCD catalog

  6. Terrain Brushes: default in Resources of the app or obtained Addressable brushes from CCD buckets via a catalog

CONSTRUCT:
Unity application goes thru the CCD buckets above and some URLs and grab all the necessary pieces that comprise a Unity Terrain and construct a runtime Unity Terrain on the fly. <— is that possible?

Question: The above is a subset of what constitutes a Unity Terrain, there are other computing structures which we need to add to an Addressable Catalog and I need to understand what are these structures?

I have devised another scheme, a bandaid solution for now that might be working great.

  1. Create an empty project, with Terrain already inside but in all defaults e.g. flat geometry and default Unity materials

  2. As I mentioned we have another non-CCD Addressable system which is interactive in the sense that it can generate and exchange geometry with the runtime Unity apps + also we could send new textures as streaming as images , which I am sure we can do

  3. We will not make the Terrain Addressable at this stage

  4. The designers uses the our Synth tool and is able to manipulate the Terrain until such time gets the desired result.

  5. The manipulations will be placed into a Textual file which contains a native language, again we have designed, to avoid using the UI to recreate assets. So upon running that native language in Live running Unity app we can restructure Terrain.

  6. MANUAL CCD export: That native code in #5 could also run when the app is in Unity Editor mode, and then one could actually do a SAVE AS and turn on the Addressables to move the newly created Terrain and design into CCD.

Not happy with it, but at least we could experiment

Dara