Been having a blast with Sunflow. It is very sad the developers put so little effort into helping getting started / docs but hey, I haven't had as much fun since playing with Renderman when it first came out.
Not sure how I fold changes into the exporter, so I'll post the diff changes to "su2sf.rb" here to support textures and UVs
629c629,638
< @stream.print "\n\tuvs none" # TODO fix uv mapping
---
>
> # @stream.print "\n\tuvs none" # TODO fix uv mapping
> # AMB added
> @stream.print "\n\tuvs vertex"
> meshes.each do |m|
> m.uvs(1).each do |p|
> @stream.print "\n\t\t#{PRECISION % (p.x)} #{PRECISION % (p.y)}"
> end
> end
> #####
680c689,710
< else
---
> # AMB added
> elsif mat.texture
> # check which extension it is
> filepath = File.dirname(mat.texture.filename) + "/"
> filename = File.basename(mat.texture.filename)
> filename = filename.split(".")[0] if filename.split(".").length > 1
>
> [".jpg",".png",".tif",".bmp",".gif",".tga"].each do |ext|
> testfile = filepath + filename + ext
> if File.exists?(testfile)
>
> @stream.print "shader {",
> "\n\tname \"#{name}\"",
> "\n\ttype diffuse",
> "\n\ttexture \"#{testfile}\"",
> "\n}\n\n"
> return name
>
> end
> end
> ######
> else
Adam
PS And here's a snapshot of a Sunflow rendering of Quake exported from Sketchup... because I can in case you ask!