Recent

Author Topic: Help loading 3d model with uv  (Read 3511 times)

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Help loading 3d model with uv
« on: April 17, 2015, 09:39:03 am »
Hi, attached there is a 3d model i want to show inside my application.

Is a blend file created with Blender. https://www.blender.org/

From Blender it can be exported as obj. File > Export > Wavefront obj.

I ve loaded this in lazpaint the 3d is displayed but texture is not, also I ve changed texture name with no success.

 %)

« Last Edit: June 22, 2015, 10:13:20 pm by 007 »

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: Help loading 3d model with uv
« Reply #1 on: April 17, 2015, 10:00:31 am »
Hi 007!

LazPaint needs the OBJ file, MTL file and image file in the same folder, the MTL file having the same name as the OBJ file.

Does it fix the thing? Otherwise, please send me a zip file with all of that so I can test and see.

And anyway please send the zip to me because dragons rock!  :D
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Help loading 3d model with uv
« Reply #2 on: April 17, 2015, 04:58:35 pm »
ok no, it is not working :(

Edit: I've solved it just was missing "map_Kd" in the .mtl file.
« Last Edit: June 22, 2015, 10:13:43 pm by 007 »

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: Help loading 3d model with uv
« Reply #3 on: April 17, 2015, 08:46:47 pm »
I see.

To have the texturing loaded automatically, the mtl file must indicate the file with a line like:
Code: [Select]
map_Kd dragon_windspro_uv.pngSo that would be:
Code: [Select]
# Blender MTL File: 'dragonwindspropicos.blend'
# Material Count: 1

newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd dragon_windspro_uv.png

By the way, very beautiful!  :)
« Last Edit: April 17, 2015, 08:50:12 pm by circular »
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Help loading 3d model with uv
« Reply #4 on: April 17, 2015, 08:49:42 pm »
Yes, just I was editing my post at the same time you posted it :)

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: Help loading 3d model with uv
« Reply #5 on: April 17, 2015, 08:52:38 pm »
So that's solved.  :)

Can we share a picture here?
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Help loading 3d model with uv
« Reply #6 on: April 17, 2015, 08:54:39 pm »
Sure. Upload it!

It's solved, I now just need to check the lazpaint code and see how it works to use in my application. If I need help I will come back.

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: Help loading 3d model with uv
« Reply #7 on: April 17, 2015, 10:58:12 pm »
Alright!  :)
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018