Page 1 of 1

Materials export

PostPosted: Thu Sep 30, 2010 6:42 pm
by timbarnes
I am seeing (this version and previous ones) some cases where materials are translated as "Default Material" even though I specified a material in SkUp (and they look correct in SkUp). What's odd is that the same material translates OK elsewhere in the model. It's hard to fix in Octane, because there are now multiple different materials all represented as Default, and if I change one I'll change them all.

tim

Re: Materials export

PostPosted: Thu Sep 30, 2010 9:35 pm
by TIG
The most common cause of this kind of report is modeling some face 'backwards'.

To see this use a SUp Style where the back_material is say 'bright blue' and then view your model in Monochrome Mode.
All materials will vanish - everything should be showing in the off-white front-material [default] - those faces showing blue are 'reversed'.

The Exporter does what it is told and the faces' front materials are exported and applied to the front faces in Octane. Octane makes all rear-faces the default-material. Unfortunately if you have added a material to a back that's facing the wrong way it won't be rendered: the rendered face is looking the wrong way.

It's a problem with 'sloppy modeling' rather than the Exporter or Octane.

To resolve it you need to flip [reverse] every wrongly oriented face and it's material from the back onto the front - this is a pain - especially if there has been texture mapping done. It really is best to get the model right before texturing and Exporting...

However, all is not lost... I wrote some tools to help - they are included with in the more recent zip versions and there are instructions at the end of the Help PDF... ;)

Re: Materials export

PostPosted: Fri Oct 01, 2010 4:44 am
by timbarnes
Thanks - I think there may be something more to it than that: I changed the material in SketchUp and re-exported: it came through correctly without my reversing any faces. But I've also gone through and reversed other faces that were wrong: I'll try to model more cleanly in future.

My application is architectural conceptual design: I don't consider SketchUp a good tool once the design has been refined, so I am often hacking and messing around with the model as I change and evolve my ideas. I render these models to document and review my thought process. Once I have a concept I'm happy with, I move to Revit or ArchiCAD for a more detailed model, and there I am more careful with modeling.

tim

Re: Materials export

PostPosted: Fri Oct 01, 2010 9:10 am
by TIG
If the issue appears again try using Window > Model Info > Statistics > Fix Problems [and also 'Purge Unused'].
See if it reports problems - Sketchup does sometimes get its data-base knickers in a twist.
This could explain the 'missing' face materials - the Exporter will always export/use the face's material IF it's returned when the data-base is queried. Faces that are inside a group that don't have a material, but the group does, can look OK as they display the group's material in Sketchup and they should export OK too - however, it is best to 'color' the faces direct for rendering, and essential if UV-mapping is intended on any textures.
These two code snippets pasted into the Ruby Console will return the name of a selected face's front and back materials
Sketchup.active_model.selection[0].material.name
Sketchup.active_model.selection[0].back_material.name

If the face has no material a 'Nil' error is displayed.
There's are two options under Window > Preferences > General that should be 'checked'
Automatically check models for problems
and
Automatically fix problems when they are found
these will ensure you model is kept as 'correct' as possible without your intervention...
I've attached a TroubleshootingStyle.zip file - extract the '.style' file that's in it and put it into your 'Styles' folder.
It's useful to show what might be wrong with a model - non-axial edges, hidden lines, unexpectedly reversed faces etc.
I have it as a 'Style' in my default template and set under a 'Troubleshooting' scene-tab [one that doesn't change camera but adjusts other settings] - that way I can quickly toggle between scene tabs [keeping the view unchanged] and see what might be wrong with my modeling - like reversed faces that aren't obvious in a 'textured' view mode...
TroubleshootingStyle.zip
(5.1 KiB) Downloaded 165 times

Re: Materials export

PostPosted: Sat Oct 09, 2010 7:47 am
by bmneu
tim, I just came across the same issue. It dealt with faces within groups, and often groups within groups. To solve it, I never tried fixing, I just exploded the group and then regrouped. One of my groups has almost a million faces and that took FOREVER to do. I need faster ram!! :D