Texture Position
-
Hi,
i imported a 3ds file into Sketchup. The result was the textured model, but the texture was kind of twosided. from the outside it was for example a wall and from the inside the same face had a texture of the roof. (model is 100% ok, passed STL check and has no double sided faces).
The solution to fix this is to select every triangle go to texture-> position , do nothing and klick done. So my idea was to make a script that does this to every face. What i did is the following, i put every information in an array. Now iam searching for the functions to do this. ( something like face[1].setPosition(getcurrentPosition(face[1])) ).
Maybe you can help me with some snippets.Thank you
Marco
model = Sketchup.active_model
entities = model.active_entities
selection = model.selectionfaces = []
entities.each do |e|
faces.push e if e.is_a? Sketchup::Faceend
puts "Total Faces : " + faces.length.to_s
-
Not sure what you're trying to do... Remove the texture from the backsides? Transfer them?
Why do you need to do Texture->Position ?The API methods you want to look into in regards to position textures are:
Face.position_material
http://code.google.com/apis/sketchup/docs/ourdoc/face.html#position_material
UVHelper
http://code.google.com/apis/sketchup/docs/ourdoc/uvhelper.html
TextureWriter
http://code.google.com/apis/sketchup/docs/ourdoc/texturewriter.htmlI got two plugins that works with UV mapping. One is transferring front side to back side, and the other fits texture materials to quad-faces.
-
Do you have a sample model?
-
transfers front side to backside sounds nice. ill take a look. thank you
installed your uv tools. selected a face and tried to transfer...nothing happened.
i think somehow sketchup is not able to import a 3ds correctly with uv coordinates.
what i was trying to to fixes the wrong "pseudo non existing double faces".if i understood right you use that method to transfer the uvs. hmm so what i want to do will not work, because the transfer does not work.
your plugin is working if i first do a "fit texture to quad faces". problem is mine is triangulated and already textured correctly from the outside
-
-
have you seen what i meant?
-
The material was transferred to the backside fine - No problems or error. (SU7 - PC)
What version and OS are you using?
-
Did you select all the faces first?
-
I use
Sketchup 7.0.8657
Windows Vista Ultimate 64 bitIs it only working if i select all faces (without edges) ?
i chose all faces and klciked FRONTFACE TO BACKFACE and nothing changed
Where did you get the output ?@unknownuser said:
The material was transferred to the backside fine - No problems or error. (SU7 - PC)
-
Advertisement