Feedback, enhancements and more

Hi Will and friends! Here is some more feedback for you.

  • There should be a way to upload designs into a new project from an XML. This would make things faster since I could programmatically construct the co-ordinates for a lot of things in XML first, upload it and edit the project before the final publish. HUGE timesaver… I’m willing to help cover development costs for this one.

  • The download feature doesn’t work. When the files are uploaded to my local server, the project never loads. It stops at the 100% point on the progress bar.

  • Is there a way to exclude ‘ammo.443a8cf.js’? It’s big, and I don’t need bullets…

  • There’s a small bug where collision extents are not resized when parent entities are resized.

  • Even when entities are marked ‘cast shadows’, light goes right through them.

I can live with most of these, but an upload feature is super super important :smile:

Thank @taverhills

Some answers!


We don’t have an XML “type” of asset at the moment. I’ll investigate how long this would take to implement. As a work around you should be able to upload your XML files anyway, they will be stored as “text”.

At the top of your script, add the asset as a script attribute:

pc.script.attribute("xmlDocument", "asset", []);

then you can access the XML hierarchy in the initialize() method like so:

var asset = context.assets.find("asset_name");
var dp = new DOMParser();
var doc = dp.parseFromString(asset.resource, "text/xml"); 

You can use the browsers XML API to interact with doc.


Can you check for any errors when loading your project from a local server? I’ve confirmed that other projects work. So possibly there is a configuration issue.


If you are not using the rigidbody or collision components you can force disable loading the physics engine in your project settings. Uncheck the box: “ENABLE 3D PHYSICS”. Note, the game will fail to load if you uncheck this and you are using rigidbodies or collision components.


Can you give us a bit more details? Are you talking about the “halfExtents” property of a collision box changing when a parent is scaled?


Please check that your light has cast shadows enabled.


Hope that all helps. :smile:

1 Like

Thanks for your answers Dave.

Regarding the XML, I was referring to a facility to upload a project as a collection of objects defined in a file. It wouldn’t need to be XML, but preferably in some human readable format. For example:

BOX,0,0,0,10,0,0,…
BOX,0,0.5,0,0,10,5,…
CYLINDER,0,5,5,10,5,0,…
etc.

Then the project could be constructed outside PlayCanvas, and edited in the PlayCanvas editor before release.

Currently each project needs to be created entirely by hand which is time consuming.

One example use is for games that use a large computer-generated landscape.

I have tried uploading OBJ files etc., but those are not editable. When added as a model, the whole model is treated as an atomic unit that cannot be edited.

An XML/CSV upload would be fairly easy to implement. If you can provide an API or code hooks, I could even have some of our in-house developers write it for you. Thanks!

Physics >> thanks for the tip I will follow it up.

Extents >> yes, exactly. When an entity is resized the child entities retain their original extents instead of scaling accordingly.

Light >> great thanks that worked.

Download >> I downloaded the project ZIP file and extracted it into a folder, then used FTP to copy it to my web server. That’s right isn’t it?

We don’t have any plans to allow editing of 3D scenes in PlayCanvas. There are better tools available for that (Maya, 3DS Max, Blender, etc).

That said, for procedurally generating content, you can easily define a file format for your content, as in your example, and write a script which creates Entities at runtime. Beyond procedural generation, I’m interested in what sort of project you have in mind which is quicker to generate outside of the tools.

We already have text and JSON file support. CSV is supported by the text format. It shouldn’t be hard for us to add XML if you really need it, but if you have the option I would recommend JSON at the moment.

If you have a link to the project that doesn’t work online I can take a look and see what the problem is. Feel free to email it directly support@playcanvas.com if necessary. Otherwise, are there any error messages in the console when loading?

Thanks Dave. Runtime is OK for some applications, but I have some ideas that will require import into the designer. It’s OK if I can’t edit models, but why not provide an import function for primitives? JSON seems to make sense. I noticed that you use JSON to store information on the primitives for use by the rendering engine, so it would be easy to allow upload of JSON format directly into a new project?

An example application is for generating 3D floorplans. We are writing software that can generate the boxes and their positions & textures. All that is required is a way to upload that into PlayCanvas. This avoids a week of manual 3D design by a human.

Regarding the project that did not work online - that’s fixed now. I tracked down the problem as a 404 error that occurred because our web server was missing a mime type mapping.

OK, I see. Sounds like a good use case for our API which is in the works but not really ready yet. If you want to talk more about our Plans for the API. Drop us an email support@playcanvas.com

Thanks Dave, check your inbox & have a nice day :smile:

For intutive UI interface… you should try a free BRYCE ( daz3D ) soft version and create a scene with it… It could give you the feeling of creating an world fast and also give you something interesting to learn from! my opinion sir.

@taverhills
How did you solve your 404 error (not found *.json file?)?
Seems I have the same problem running my project on a bytehost server:
After uploading my main *.json asset it automatically gets dissapears from the server.