BabylonJS / Editor

Community managed visual editor for Babylon.js
http://editor.babylonjs.com/
813 stars 232 forks source link

Add Tool To Create Pure Cube Textures #138

Closed whaqzhzd closed 3 years ago

whaqzhzd commented 4 years ago

https://doc.babylonjs.com/resources/explaining_workflow This article describes an example of using DDS file skybox. Can we use multiple PNGS to create skyboxes in the editor? like this

julien-moreau commented 4 years ago

Hi and welcome! Today it is not possible but I’m adding the feature ASAP.

whaqzhzd commented 4 years ago

Thank you. Excellent work

julien-moreau commented 4 years ago

Keeping the issue opened in order to follow the development :)

the-simian commented 4 years ago

@julien-moreau much like the .env converter, it might be nice to have the editor actually do the .dds packaging itself, too. one thing I noticed is that when I was using tooling to create my own .dds is that there's more than one way to organized the faces

@whaqzhzd there is also

I haven't used it extensively but I opened it and it seems to support the typical settings

image

Try those DXT ones, there.

As for that PS plugin, there's really only a few settings that are good, the ones that are like DXT1, DXt3, DXT5 and the one that is 8.8.8.8 (lossless). The others produce unusual results in my opinion, for a diffuse map. however, that plugin does it all. image

Here's a tutorial I found: http://www.jdgameart.com/PublicDownloads/nVidia_DDSTool_Tutorial_R20_WEB.pdf

julien-moreau commented 4 years ago

@whaqzhzd, for pure cube textures (1 texture per face), I think that babylonjs will need an update. I'm now able to create one but, once it is serialized, it keeps only the baseUrl value and not all the files names in the case we provide each filename per face (in the constructor, see the "files" parameter: https://doc.babylonjs.com/api/classes/babylon.cubetexture)

@deltakosh, I tried to find a solution but I haven't found one. Do you have an idea? Or does CubeTexture needs an update to take care of serializing files list in case of a custom files list?

julien-moreau commented 4 years ago

@the-simian sure it can be a great addition! But not an easy addition ahah. We can keep it in mind and let give a try in future? This would require to learn more about .dds and how it works in deep

julien-moreau commented 4 years ago

@whaqzhzd I'm going to fix this usecase issue and then will be available once done. To unlock you, you can use the tip from @the-simian that looks great enough to start designing your scene. Do you plan to use PBR materials or Standard Materials? Thanks @the-simian for the tip! :)

the-simian commented 4 years ago

@julien-moreau it might be ok if we can find a command line tool that actually makes the .dds or something. After that, its mostly just UI work. you could probably make a little preview not unlike what is seen in that first app.

though honestly, maybe that's feature-creep for now. If I had to prioritize, I'd prioritize the core workflow, such as importing meshes.

I hope my suggestions work for @whaqzhzd .

... one thing. I did, at some point want to open an issue for the .env files. I am still not super sure what is needed for a dds to be a good candidate for env. If you use a dds, such as the one I made with the space skybox maker, that one did not convert correctly with the in-app util. This might be the wrong place to discuss this, and if so, we can move the discussion somewhere else.

whaqzhzd commented 4 years ago

@the-simian dds is great, but the environment in which my program runs does not support dds and env files。

julien-moreau commented 4 years ago

@whaqzhzd it is coming asap!

whaqzhzd commented 4 years ago

@julien-moreau Thank you. Perfect.

julien-moreau commented 3 years ago

Added way to create pure cube textures in editor v4.0.0-beta.1