You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, February 21st 2023, 7:19pm

Textured 3d model

Hi guys

I have questions about a ready-made textured 3d model, to be more precise:
when connecting a model in xml, do I always have to write texurl=" " so that the textures are connected, and if I already have a textured model?
Let's say I have a 3d model, but the baked textures for this model are distributed in separate jpg files, how to make these textures all connected at the same time ? what should the code look like if in texurl=" " we specify the path to only one picture.


Thanks in advance, you will really help me *thumbsup*
Best regards, Nikolai

2

Tuesday, February 21st 2023, 7:39pm

if texurl is not set, krpano by default uses the textures defined inside the obj file.
i think this is always a link to the mtl file which then must exist as well ofc.
(for stl / depth files you need to define a texurl)

3

Wednesday, February 22nd 2023, 10:47am

Hi,

right, just link to the .obj file - the .obj file itself will link to a .mtl file - and that will link to the textures.

Best regards,
Klaus

4

Wednesday, February 22nd 2023, 7:20pm

Thus, the scene with the 3d model to which the material (.mtl) will automatically connect will look like this:


<scene name="model_1" autoload="true">
<image>
<depthmap url="tourmodel.obj" scale="100" hittest="true" />
</image>

</scene>


where tourmodel.obj and tourmodel.mtl are in the same folder

5

Friday, February 24th 2023, 10:37am

Hi,

inside the .obj file (just a text file) there is line like this:

Source code

1
mtllib tourmodel.mtl

That's refers to the name of the .mtl file (a relative to the .obj file path could be used too here).

That means the obj and the mtl files not necessarily needs to have the same base filenames.

Best regards,
Klaus

6

Tuesday, August 1st 2023, 4:39am

Hi,

right, just link to the .obj file - the .obj file itself will link to a .mtl file - and that will link to the textures.

Best regards,
Klaus
In my case. It doesnt link to mtl file. I need to specify texurl

Similar threads