Render Cubemap within PC Editor

Hello,
is there a way to render all sides for a Cubemap within the Editor by for example setting up 6 Cameras with specific settings in the center of a scene, render and save to files? This way I could use those images to manually setup a Cubemap and don’t have to set up everything again in Maya. Unity has something like that.

No realtime necessary.

Or if this doesn’t work, can I export a scenes geometry and materials to FBX or something else to use that in an external 3D app an render there?

Greetz, M.

Hi @Marjan,

There isn’t a way to do that in the Playcanvas editor right now, but you could leverage the unofficial editor scripting API for that. So basically you will have to position the camera for each face, render to texture and save it either as an asset or download it from the browser.

Search for “editor scripting” in the forums and you will find a number of posts on the subject. Here is one to get you started:

adding on this, Reflection Probes are a feature which is to be added

2 Likes

I guess this is somewhat over my scope and over my available time.

But I think this would be a nice feature to have (position a camerconstruct, be it 6 cameras or just one being rotated 6 times doesn’t matter). One click solution. Bam, there you have it.

I guess it’s hard to impossible to incorporate HDI or some render features. For me it would be enough to have rather low res render as I only need quite blurred reflections. Lighting however should be possible by using this. And the docs state the Cubemap must be HDI for this. Hmm.

Anyways, seems a useful thing.

1 Like

This is being worked on, I have a PR for dynamic cubemap rendering - but before this gets released, I want to refactor some layer functionality to make this and other things that render to texture easier to set up. https://github.com/playcanvas/engine/pull/2523

So this likely won’t get release till early next year.

3 Likes

Cool!

Hi all, I’ve been following this thread along with the pull request for it. I can see that the PR has been merged in the master branch here: https://github.com/playcanvas/engine/pull/2757

Does this mean that we are now able to implement dynamic cubemaps in our scenes?

Hi @tb_dev, now that it is in master, it means that it is due in the next release of the engine when we merge to stable branch and test :slight_smile:

Ah perfect thanks!

Hate to be “that guy” but any idea when the next release might be?

We’re hoping for the release by the end of this week, but as always, a lot depends on what problems we identify during testing, as we need to make sure the release is stable.

1 Like

Awesome! Appreciate the quick responses.

1 Like

Is this implemented now? :slight_smile:

It’s in the engine, yes but not integrated with the Editor yet so you will have to create it with code.

https://playcanvas.github.io/#/graphics/render-cubemap
https://playcanvas.github.io/#/graphics/box-reflection

1 Like