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
Issue with SU colorized texture
Hi Pascal,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
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!
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 : After : 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}
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 : After : 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}