Issue with SU colorized texture

SketchUp Integrated Plugin (Integrated Plugin maintained by OTOY)
Post Reply
ppoublan
Licensed Customer
Posts: 56
Joined: Fri Nov 18, 2011 8:47 am

Hi
It looks like the new plugin does not support colorized textures.
Left object has a unmodified texture, and object at the right the same texture has been colorized within the SU Material window.
Is it something that could be added int the future to the plugin ?
Thanks
Pascal
Attachments
Capture.JPG
User avatar
fuzzybro
OctaneRender Team
Posts: 562
Joined: Mon Jun 03, 2013 7:10 am
Location: Los Angeles, California

ppoublan wrote:Hi
It looks like the new plugin does not support colorized textures.
Left object has a unmodified texture, and object at the right the same texture has been colorized within the SU Material window.
Is it something that could be added int the future to the plugin ?
Thanks
Pascal
Hi Pascal,

Early versions of Octane4SU supported colorization but Sketchup has a very weird colorization method, it is not just plan color multiplication. Result was wrong anyway so I turned this feature off until I figure out how to support it properly.

Thanks!
ppoublan
Licensed Customer
Posts: 56
Joined: Fri Nov 18, 2011 8:47 am

Thanks fuzzybro for your explanation,
Here is a quick and "very" dirty workaround I apply to my models when lot of colorized textures exists.
If it could help others to wait for integrated fix into Octane.

Before :
before.jpg
After :
after.jpg
This ruby script export all colorized textures, reset materials and reload into SU.
Just save it as .rb file into your SU Plugins directory.
Warning: No warranty, no support. Use at your own risks. Save your files before.

Yours
Pascal


module OctaneFixColorizedTextures
def self.savecolorizedtextures()
model = Sketchup.active_model
materials = model.materials
temp_dir = Sketchup.temp_dir
puts "debug:temp_dir:"+temp_dir
tw=Sketchup.create_texture_writer
mats=[]
materials.each { |m|
if m.materialType==2
mats<<[m,m.texture.width,m.texture.height]
end
}
for i in 0...mats.length
g=model.entities.add_group
g.material=mats[0]
tw.load(g)
puts "debug:exporting"
tw.write(g,temp_dir+"/tempmat"+i.to_s+".jpg")
end
for i in 0...mats.length
m=mats[0]
m.color=nil
m.texture=nil
end
for i in 0...mats.length
m=mats[0]
w=mats[1]
h=mats[2]
m.texture=temp_dir+"/tempmat"+i.to_s+".jpg"
m.texture.size=[w,h]
end
end
end
UI.menu("Plugins").add_item("Octane:FixColorizedTextures"){OctaneFixColorizedTextures.savecolorizedtextures}
Post Reply

Return to “SketchUp”