Using models with or without implemented texture

Hi , i use to create models in blender and then pack image inside a model i do import in jme, as i expect to have many objects of a same model, i was wondering if i’m doing some thing wrong .
Ma images might be some what heavy and as i have a model with packed image ,loaded i was wondering it it would be lighter for a game if i would set a material separatelly ?

My be my question is not clear (as my ideas are not at all) but question is :
do using models with packed image is more expensive then loading and adding it in any other known way ? Like loading only one image separated from model or alse ?
I just try to not consume too mutch resources of pc

One model, with one packed texture. No big deal.

20 different models, each with the same packed texture = 20x as many texture memory used as needed.

Soo i have one house model with packed image , and use it 20 times , it has 20 times that image (even if i clone ? ) is there any thing i could to exept load separatelly ? Its just soo easy to load all in one , without say material ,new material , node get geom , geom set material …
Is there any solution to avvoid all this work? without pay in resources ? Or the only way is to load separatelly and then set in to one thing ?

Spatials have a .clone(boolean cloneMaterials) method. You could use that. It defaults as true if you don’t specify a value.

Soo if i have a node with packed Material

Node nodeMother;

i should clone it without material , like :
Node cloned =nodeMother. clone(boolean false)

and then get parents material like

cloned.getGeom().setMaterial(nodeMother.getGeom().getMaterial )

to avvoid having same material be created over and over ?

soo lets say i could have 20 houses having 20 nodes (same model) and using one same material consuming , 1 mb (one material resuorce of pc ammount) ?
and not 1mb*20
is that right ?


As in not the same model.

not the same .j3o

not the same blend.

The same blend cloned 20 times will continue to share the texture.

20 different (different as in not the same) .blend, .gltf, whatever files with the same packed texture will load the texture 20 times because nothing in the entirety of god’s creation but you knows that those textures are actually the same.

If you have 20 DIFFFERENT (as in not the same, different, dissimilar, not the same) models that should share the same texture then it is better if they share the same texture… which requires NOT packing it… and somehow making sure all of the materials reference the same texture in your assets.

1 Like

But it will still share the textures, regardless.

Material cloning is so that you can set the parameters differently.

Oh soo if i have a car ,with material glass , and house with material glass , they will create own glass .
But if i have just Ferrari model made(cloned) 20 times it will share ,same glass texture ? Thats nice
And if i would asset manager ,load model 20 times will it still be true ?

BTW thanks every one for answers :slight_smile: :kissing_heart: (a not homo kiss :rofl: )