Loaded model doesn't look right

Hi all.
I’m trying to load a model (purchased from CGTrader) in Obj format into Babylon and it’s not looking as awesome as the demo model, which looks totally amazing!

Screenshot of the demo model on left and mine at right. I played around with the lighting, but doesn’t seem like i’m doing this quite right. Any tips for making the model look more like the demo? Seems like I have problems with shadows + edges in the ocean textures. Would love a pointer on how this is usually done (newbie here).

thanks so much!

I think you should focus on getting those UVs or textures sorted first, as that just looks wrong.
If you want to get closer to that look, I think you should convert your mesh to flat shaded, use proper lighting. Not a hemi light, or at least one with very low intensity together with a proper directional or spot light. A light/shadow map would do wonders as well, although the demo seems to be using dynamic shadows as well. Have you tried using the shadowgenerator with an algo supporting self-shadowing?

Thanks for the response. I’m a javascript pro, but new to 3d modeling, so am going to need to study up on your pointers here. I did get the water texture working properly on a sphere created from scratch… but was hoping that a stock model would ‘just kinda work’ - lighting and shadows and all - without too much tweaking. That is a naive assumption, I take it?

Here’s the water texture on a brand new sphere ^. Looks good, but seems nuts that i would need to re-create the stock model piece by piece, right?

Try checking if disabling UV optimization helps at all:

BABYLON.OBJFileLoader.OPTIMIZE_WITH_UV = true;

I’m sure the object is textured properly, especially if it loads into an engine like Blender without issue. But there’s a few other OBJ loader toggles we expose:
https://doc.babylonjs.com/how_to/obj

I know it sucks, but I would find another set of models to achieve what you’re after.
I took a look at it in Max(The FBX as the OBJ has vertices issues), and it’s 1000+ meshes and 31 materials with some very weird geometry.
Everything is made up of fairly mid-high poly geometry created using circles. It might be a VR- and game-ready model, but it’s not performant in WebGL/Javascript.
If I were you, I would recreate the planet(ocean, landscapes, biomes etc) using a sphere and some low-poly geometry. Then you can use all the “prop” models like planes, trees, bushes, houses etc etc. to fill out the environment. You can then use instances, merged meshes or Solid Particles to add the props. You can even use the original model to export position, rotation and scale of all meshes. This way you won’t have to recreate everything, you just have to load the models and instantiate/clone/particleShape and set position/rotation/scale it n times depending on your export.

Just my two cents. But you might be able to use the model, if performance isn’t your number one issue.

Thanks for taking a look @Raggar. I will try the recreate method as you suggest. At the very least, I’ll learn alot! Thanks for your help. Will post a screenshot back here when I have (hopefully) conquered the beast.

I did a quick JSON export of the positions, quaternions and scales of the meshes exported from the original model tp .babylon. Scaling seems to be fixed at 1,1,1, so transforms have been reset before positions and rotations were applied. Shame. But can always be manually set or randomly generated.
Here’s an idea of how to recreate some of the models(simple geometry for now, replace with actual models):
https://playground.babylonjs.com/#PPXBPT
Very simplified, but should give you an idea for now.

1 Like