Need Help to Create Useful Obj Files
-
I made some picture frames in Sketchup 8 free version and put some of my paintings in them and saved them as components and obj files via Objexporter Sketchup plugin. But when I look at them in Meshlab and Kerkythea, the frames appear but not the paintings (face that's supposed to have painting texture is the wood texture of the frame). Not sure if I was supposed to save all as PNG or not. I suspect it's a backfaces issue but not sure how to proceed. I think I missed an important step in creating the obj files from Sketchup. What is a normal workflow to get good obj models with textures for use from Sketchup?
I am currently trying to make a Model Library for Kerkythea.
-
The .mtl file that is saved with the .obj can be opened with a text editor. In there you'll find where the .obj hunts for the textures. If you export to .obj into a folder named 'Model_001' in there you should have 'Model_001.obj' and 'Model_001.mtl' plus any textures associated with that model.
In the .mtl file you should have, for example, 'Wood.png' mentioned as a texture in this type of format...
map_Kd C;\User\Documents\Model_001\Wood.png
So for MeshLab to open that Textured .obj then you'll need the textures in that location.
-
Thanks Rich! That info was very helpful. I looked at the .mtl file and the texture folder and identified the problem. The face with the painting was reversed and the wood texture was on the other side which was actually the front face. After reversing the face in SU and thoroughly making sure all the faces were materialized correctly, the model is showing correctly in both Meshlab and Kerkythea. I am still concerned about the existence of backfaces in the future when porting over to other applications like Blender. Is there a clean way to eliminate the back faces? I read somewhere that you end up with double faces. Wouldn't that make the model size bigger than it need to be, especially if it is a large complex model?
As far as texturing in Sketchup goes, I find myself fighting with materials that I thought I purged out. I replaced the wood texture with a dark grey color. Even after using the Thrupaint plugin, the wood texture was still being reported to be in the model on the curved surfaces of the frame. I ended up deleting the wood texture from the selection window and it was replaced with the default texture. Not sure what that was about.
-
@unknownuser said:
Is there a clean way to eliminate the back faces?
You can't eliminate a backface only reverse it so it is orientated correctly. Careful modeling to begin is the best practice and use the View > Face Style > Monochrome while modeling to spot any backface issues. Also change the Backface color to something that really stands out like ORANGE as I've found since SU7 the default Backface color is too subtle.
@unknownuser said:
I read somewhere that you end up with double faces. Wouldn't that make the model size bigger than it need to be, especially if it is a large complex model?
There are occasions whereby SU creates duplicate faces that overlap. At times it may even create numerous faces where one face should be. Again careful modeling limits this behaviour. Also Thomthom's CleanUp plugin can hunt down these.
@unknownuser said:
I replaced the wood texture with a dark grey color. Even after using the Thrupaint plugin, the wood texture was still being reported to be in the model on the curved surfaces of the frame. I ended up deleting the wood texture from the selection window and it was replaced with the default texture. Not sure what that was about.
Was the material applied to a group/component? You are able to paint geometry and groups/components too. Also if you have any components in the 'In Model' component browser that have the material applied but not in the modeling work space then this would mean the material would also be in the materials browser too.
Aidan did a good post on how SketchUp paint applied in different scenarios works...
http://sketchupdate.blogspot.ie/2011/08/assigning-materials-to-groups-and.html
-
About eliminating backfaces; I meant in another program after export from Sketchup, not in SU. But I am just speculating at this point. Gonna port the obj into Blender and see what happens.
@unknownuser said:
Was the material applied to a group/component?
Yes I think I did color a group/component trying to save time at one point. I will now change the color of backfaces as you suggest. Great idea....never thought of that. Will be sharing pics of the work soon.
Thanks again.
-
In Blender you can get it to display normals...
Hit 'N' to bring up the Properties tab and under Display you can tweak the normals display from vertices to faces to both.
-
In SU,
As suggested already
But: Add this -difficult to find these days- ruby.
Download it here:
http://forums.sketchucation.com/download/file.php?id=86061This will remove inner faces (non manifolds).
Very important because:
In blender:
-Import the obj
-edit mode (TAB), [W] menu, remove doubles! This will weld all overlapping vertices automatically.
-Hit [ctrl+N], it's the shortcut for fixing normals. (it will be a mess if non manifolds/inner faces exist!)
SU UVs are still there and you may edit them in UV editor.TIGs obj exporter is an excellent tool!
If you love blender (you should lol) and its new render engine (cycles), it's possible to model in SU only and just import.Some important things to know about blender.
-You may wish to re scale SU imported objects. In this case after scale/rotation or other transformations, hit [ctrl+A], this brings up a menu, apply these data transformations. Now, bumps/displacements etc will work correctly.
(blender avoids to do this automatically for a good reason, it has to do with its particles/instancing system)
-you may face depth clipping in 3d view port. Under N panel / view, clip start-end, here your solution
-I suppose, you already edited the default preferences of blender, making it similar to SU.
-You already learned the shortcuts of transformations, yes?
[G] for move-grab, [G]+[x or y or z] for direction, [G]+[shift+z] for moving in xy plane, etc etc , yes?You also learned how to use the excellent snapping methods of blender. If not, ask me.
Advertisement