About Monkey 2 › Forums › Monkey 2 Development › Marching Cube .ply colours
This topic contains 4 replies, has 2 voices, and was last updated by 
 Hezkore
 1 year, 8 months ago.
- 
		AuthorPosts
 - 
		
			
				
July 31, 2017 at 2:15 am #9607
Assimp (and the Mojo3D-loader) does support Marching Cube .ply files, but the colours from the cubes are missing.
.ply files don’t use any textures, it just sets a colour for each “cube”.Would it be too much work right now Mark to get colours working?
I’ve made a test mesh, which should look like this:

And it loads fine, but the colours are missing in Mojo3D.
Here’s the file itself: https://www.dropbox.com/s/lw4bm36we3puduy/test.mc.ply?dl=0Oh and while I’m at it, MDL animations aren’t working. :3
Give me a shout if you need any other formats to test with.August 1, 2017 at 10:16 pm #9644Ok, looks like PLY uses vertex colors and Vertex3f doesn’t have a color member yet – will add soon.
There’s a cool assimp viewer here (written by one of the authors I think) you can use to tell more or less what things a re supposed to look like, and whether there’s a problem with assimp or mojo3d:
http://assimp.sourceforge.net/main_viewer.html
August 1, 2017 at 10:27 pm #9645Thanks Mark!
And yeah…<rant>
I did give that viewer a go, but it produces some really mixed results heh.The test .ply file I’ve posted above has super flickery lights until you manually move the light source.
And my .obj files all seem to have inverted triangles, so viewing them is… confusing.
And it’s a shame it doesn’t display animations.The “3D Builder” that comes with Windows 10 loads .ply and .obj and displays them really nice.
It’s what the screenshot in my first post is from.
I know that doesn’t mean assimp will load them correctly, but every time I test “Open 3D Model Viewer” to see if assimp can load something, it comes up as a confusing mess, and once I’ve loaded them in Mojo3D it’s worked fine, just like in the Win10 3D viewers.So that viewer doesn’t seem very reliable.
It does however have working textures for MDL files!
Which would be really nice if Mojo3D had. (For my Quake BSP loader)
But the .ply files are what I’m most interested, and is probably the simpest to get working right now (I’m guessing)A few .obj files in “Open 3D Model Viewer”:


This is how they should look (Via “View 3D” which comes with Windows 10):


</rant>
August 1, 2017 at 11:16 pm #9647The “3D Builder” that comes with Windows 10 loads .ply and .obj and displays them really nice.
Unfortunately, ‘3d builder’ is unlikely to be open source software that we can add to monkey2!
Not sure why you’re having so many problems with the viewer – have you looked at import options? There’s back face culling etc there (off by default) and these are all options that mojo3d could realistically expose. How do the problem files like in mojo3d?
It’s also playing animations here OK, but of course only what assimp can load, eg: turtle.b3d.
August 1, 2017 at 11:26 pm #9648Haha most certainly not! x)
It’s just what I use to see if my .ply and .obj files exported correctly.
And usually it’s more accurate than “Open 3D Model Viewer” when testing if Mojo3D can load it. - 
		AuthorPosts
 
You must be logged in to reply to this topic.