Exporting to GLTF & GLB

I am using the following nodes to show the logo on a section of the van.

Will this not be exported as either a GLTF or a GLB file

If not how can I export so I can see the logos in the Babylon playground. I need to be able to use these in a web application using Babylon.js.

Screenshot 2019-01-22 at 21.58.56.png
 
Hi classic12, I think these would be considered procedural nodes/materials, but I may be wrong. I don't think procedural materials can be exported unless they are baked to a texture. I've only played around with the bake option. Someone that uses that feature a lot should be able to help more in that regard than I can.
 
I did a search on the forum to 'Bake Textures' and found this.
https://www.cheetah3d.com/forum/index.php?threads/6679/
And following :

The simple workflow is:

1) Create and texture your model.
1a) Back up!

From here, the simple version:
2) Combine everything into one mesh ( :-( )
3) Add Baking tag to the mesh.
4) Bake coords to UV2 (assuming you're using UV1 for your actual texture mapping; if it's all procedural or simple assignment, you can use UV1).
5) Render the baked image and save it.
6) Create a new material with an image node feeding its color into the shader's diffuse input (this is not quite right, but works best owing to C3D's editor view rendering).
7) Load the image into the image node.
8 ) Apply the material to the mesh.
9) Set your mesh to UV Set 2.

You should now see your mesh with everything baked into it, and it usually looks pretty awesome.

If you're actually trying to produce a pre-lit mesh for a game, for example, you need to jump through some more hoops.

You may want everything in UV1. What you can do is either copy the UVs from UV2 to UV1 at this point or (if nothing has changed) simply bake to UV1 after rendering (you did back up, right?).

I searched on combine everything into one mesh and found this

https://www.cheetah3d.com/forum/index.php?threads/4895/

But this requires import child. This has been removed from ver 7.

Can anyone do an idiot level guide to baking the textures. As in the first part of this post I am trying to export my models to GLTF or a GLB format so I can display them on web pages / apps using the babylon.js library

Cheers

Steve Warby
 
Ok. I am at step 5.
Render the baked image and save it.
Does this mean
1. Render - Back Texture ( just produce grey square )
2. Or Render - Render
I continued with 2 ( Render image attached )

I have followed the steps.
The final result is obviously wrong.

What am I not understanding here please ?

Cheers

Steve Warburton
 

Attachments

  • Screenshot 2019-01-24 at 20.11.34.png
    Screenshot 2019-01-24 at 20.11.34.png
    435.9 KB · Views: 268
  • Screenshot 2019-01-24 at 20.11.51.png
    Screenshot 2019-01-24 at 20.11.51.png
    56.3 KB · Views: 285
  • Screenshot 2019-01-24 at 20.12.04.png
    Screenshot 2019-01-24 at 20.12.04.png
    454.4 KB · Views: 287
  • Screenshot 2019-01-24 at 20.12.17.png
    Screenshot 2019-01-24 at 20.12.17.png
    448.4 KB · Views: 266
  • Screenshot 2019-01-24 at 20.12.23.png
    Screenshot 2019-01-24 at 20.12.23.png
    313.4 KB · Views: 269
Seems you baked to UV2. If so you need the UV stepper.js to swap UV2 to UV1 to render the correct set.
Otherwise: When everything is alright with UV set1 bake to and don´ t hit OK at Baking UV coords.

Cheers
Frank
 
Select the mesh - go in polygon mode - find: Copy UV set in the script and set it to swap UV1, UV2 - click copy and watch the 3d view - if it doesn´t change immediately hit copy again.
Fingers crossed.

Cheers
Frank
 
I had put it into the macro folder.

Its not working. There is a change but not as needed.

Thanks for the help. Goodnight try again tomorrow
 
Your workflow is correct - unless you´re baking lighting conditions take an ambient light to receive flat colours.
(the script to swap UVsets isn´t needed anymore - just tested again:)
BakedMap.jpg

Cheers
Frank
 
Last edited:
Back
Top