Released: Danae Environment Painter


#1

Supercharged objects placement using physics directly inside the PlayCanvas editor. Speed up your scene creation!

Create natural looking scenes without effort, paint anything on top of anything.

Use cases:

  • Easy to use rules for painting a collection of objects.
  • Paint decals on top of surfaces without worrying about manual placement.
  • Drop feature to create natural looking scenes.
  • Athena Terrain Creator support for painting on terrain models.

Subscribe now: https://pic.pirron-rodon.one/

Speed level design:

Physics Drop Feature:

Decals painting:


#2

This is basically what i’m looking for…raycast paint objects onto scene without having to code it ingame or drag about from (0,0,0) position and try to pinpoint where the heck to go…lol. Great for both end users and developers alike. Does this work with Athena terrain?

By decals do you mean painting onto environment with decal polygons that wrap around the contour of the 3d surfaces while offseting z value by depth buffer precision?


Question about LOD/batching though: Are the brush objects batched? But i guess such optimizaiton can be done later, or only during pre-runtime stage.

Regarding Batching, I don’t necessarily use the default Playcanvas approach though as it’s not scalable (when it comes to memory usage) if you are doing repeatables by the thousands (like a particle system in itself), and if the total quantity of the repeatables might change. Instead, i’ve attempt another approach that allows (with custom management), repeating batched mesh instances that are batched to the same vertex buffer (so it doesn’t duplicate beyond the buffer limit intended by the user) but repeats the same batched instance with the same vertex/index buffer mesh reference. An old script i did up can be found here: https://playcanvas.com/editor/code/574049?tabs=14175633,14173407 on how it’s done (aka. batched painting…) and you can run the main primary build and press/hold G key to delete off a random tree prop in the scene with hardly no overhead (yes, I even avoided array splicing but relied on pop backs…the batch is entirely resizable with zero overhead!.) This allows a thousand (MOVING) trees to be rendered, with only 3 draw calls, and (maybe more on some mobile/old devices…but still reasonalbe number of draw calls.)., while vertex memory usage can be capped according to how much buffer you allocate. I even avoided the overhead of using 1 entity per batched object with this method… since pc.Entity can add a lot of unnecssary features that aren’t necessary for mere environmental props. It’s just raw adding the matrix values into input TypedArray data for each repeatable & resizable batch.

Regarding LOD, it can be tricky since there’s no 1 perfect solution for everything (eg. balancing polycount vs draw calls?), though I have an approach which you might consider (though it’s mre complex than just individual object swapping), since it tries to balance between batching vs LOD (or batched LODs) with a hierachical subdivision approach for ingame props. That way, LOD also avoids the conumdrum of deciding whehter individual LOD swappign is more important, or it shoudl be grouped instead to avoid the overhead of processing individual LODs itself etc. This approach also works with custom onPreCull hooks and such to get the best app specific custom LOD/static or non-static batching/frustum culling approach which might not apply to all projects, so such would be optionals tho. Anyway, the draft (old idea I had) was here: [LOD/Batching/Culling/Collision solution all in one?] to fully customise batched lod groups when dealing with large open-world environments with thousands of props.


#3

We had the same need in projects of ours, the ability to easily paint objects in editor and that’s how this tool came to existance. Yes, it works out of the box with Athena Terrain Creator. If you have a terrain rendered inside your editor all raycasts will work against it. No further action is required, much like shown in the first video.

No, we don’t do any custom polygon creation right now. In its first release Danae Environment painter will be a tool that helps translating the entities painted. Basically what it does:

  • Get the world/local position, rotation and scaling that resulted from the selected rules.
  • Duplicate the entity/entities provided by the brush as an editor entity.

So basically the tool transforms in place the provided entity (with all of its components/children).

After the first version is released we plan in doing more complex stuff, like material painting using masks on top of objects.

So decals for the moment would have to be old-school, planes on top of flat surfaces with an offset z value.

That’s very elegant! Indeed being able to paint thousands of entities/models that way in an HTML5 app can bridge the gap of getting AAA content in the web.

Right now we aren’t doing any custom batching, if your models have standard PlayCanvas batch groups assigned on run time batches will be created in the usual way.

Basically Danae right now is an editor-only tool, there is no run time.

We consider in the future releasing a simple cell based runtime that does visibility/LOD switching based on distance/active cell. We already have it in place in working titles of ours and if it makes sense we might integrate it with this tool.

Thanks again for your feedback.


#4

Decals painting:


#5

Well, what i’d probably do is just create different folder entities to hold different “sectors” so i can easily turn off and on different areas if things get too heavy. It’s possible to paint into different folder entities for organisation , right? Such a scene is used purely for editing only (via reading scene graph of entities), then likely i’ll just Play it once and have my own runtime script convert the scene graph stuff into JSON/binary or something that I can use for actual production runtime build scene. Typically, it’ll be needed anyway since atm I’m also typically running node scripts on localhost to generate navmeshes via RecastCLI by sending packets to localhost node server via playcanvas (and likely also need a basic node/UMD option as well for running some LOD/batching management processing of brushes in the scene). That same code can be used for any scene-graph based projecet actually from any engine (eg. Unity/ Playcanvas/Lumberyard, whatever…), so long as it receives the expected scene graph inputs. Hopefully, the editing is simply enough for end-users that can even allow casual non-programmer users to easily jump in and create their own levels.

I’m not sure is it possible in Playcanvas for let’s say: If i run the scene, can i use a runtime script to upload my placements JSON file or something into my project asset folder or something…without having to manually copy and paste text, or run a node server locally to generate a file on my hard-drive which i must then upload manually on my end, etc.


#6

That’s quite elaborate, not sure if doable at the extact state the PlayCanvas cloud services are set. Thinking maybe we can have different scenes and load them on the fly from a single build.

Quite interesting! Thanks @Glenn_Ko for the food for thought.


#7

Danae Environment Painter is now released!

Free trial available, let us know of your feedback.

https://pic.pirron-rodon.one/

This is a release candidate made available by user demand, we are working around the clock for a stable release. Enjoy!


Released: Athena Terrain Creator