@jason_maranto said:
Yes, it is part of the Maxwell plugin, the grass is generated inside Maxwell at render-time based on the parameters you specify.
Best,
Jason.
So Maxwell is payware?
@jason_maranto said:
Yes, it is part of the Maxwell plugin, the grass is generated inside Maxwell at render-time based on the parameters you specify.
Best,
Jason.
So Maxwell is payware?
Do I need Maxwell to run this if not how do I install and use it?
@glro said:
@hfm said:
okay, very nice script... but could you please also make it work on X and Y axis? And make it so that you can select a shortcut for the tools?
Tried to edit it myself but my knowledge of ruby is lacking
[did get the 15 degrees to work though ]I don't know much about ruby either, but here is a simplified version of the plugin:
rotate around the component origin instead of center
only around z axis and 90 degrees
no context menu, a line in the plugin menu instead (so you can add a keyboard shortcut (pop up menu, window>preferences>shortcut
require 'sketchup.rb'
> ##
> ## Rotate selected component instance 90 degrees around Z axis
> ##
> ## Copyright (c) 2010 Clark Bremer (aka daiku)
> ## Northern Lights Timber Framing
> ## clarkb@northernlightstimberframing.com
> ##
> ## 05/02/12; rotation autour de l'origine du composant, axe z seulement, acces menu deroulant ou raccourci clavier
> ## 9/10/2010; Multiple Groups/Comps
> ## 5/17/08; All 3 axes. Input from Matt666
> ## 4/24/08; Use center as rotation point instead of CI origin. Also works on groups now.
> ##
>
> # Add a menu item to launch our plugin.
> UI.menu("PlugIns").add_item("rotation90z") { rotate90z }
> # -----------------------------------------------------------------------------
>
>
> def selected_comps_and_groups
> mm = Sketchup.active_model
> ss = mm.selection
> return nil if ss.empty?
> ss.each do |cc|
> return nil if not ((cc.instance_of? Sketchup;;ComponentInstance) or (cc.instance_of? Sketchup;;Group))
> end
> ss
> end
>
> #def rotate90(sel, axis)
> def rotate90z
> sel = selected_comps_and_groups
> # axis == "z"
> rv = Geom;;Vector3d.new(0,0,1)
> # rv = Geom;;Vector3d.new(0,0,1) if axis == "z"
> # rv = Geom;;Vector3d.new(0,1,0) if axis == "y"
> # rv = Geom;;Vector3d.new(1,0,0) if axis == "x"
> ra = 90.degrees
> #rt = Geom;;Transformation.rotation(rp, rv, ra) #autour du centre de la boite enveloppe
> sel.each do |ent|
> # rp = Geom;;Point3d.new(ent.bounds.center) #rotation point
> rp = Geom;;Point3d.new(ent.transformation.origin)
> ent.transform!(Geom;;Transformation.rotation(rp, rv, ra))
> end
> end
>
>
>
> #if( not file_loaded?("rot90.rb") )
> # UI.add_context_menu_handler do |menu|
> # if menu == nil then
> # UI.messagebox("Error setting context menu handler")
> # else
> # if (sel = selected_comps_and_groups)
> # sbm = menu.add_submenu("Rotate 90")
> # sbm.add_item("Around Red") {rotate90 sel, "x"}
> # sbm.add_item("Around Green") {rotate90 sel, "y"}
> # sbm.add_item("Around Blue") {rotate90 sel, "z"}
> # end
> # end
> #
> # end
> #end
>
>
> #file_loaded("rot90.rb")
How do I use this plugin I put the file in plugins and there is nothing in plugins dropdown and nothing when I right click.
@tig said:
But... why ???
Keep them with the MTL file where they belong, and change the path to a relative path inside the MTL file's code.
Not even sure that a \ works in MTL absolute paths - it should be a / ???
The originator needs shooting for making the MTL file that way in the first place...Does it work ?
Either way ??Have you tried fixing the TGA file otherwise ???
Fixed the problem by changing
map_Kd C:\london_map.tga
to
map_Kd london_map.tga
@tig said:
The MTL path is 'absolute' NOT relative
map_Kd **C:\**london_map.tga
etc
For the code to find the image it must either be in the root of the drive [bad idea] or in the same folder as the MTL, so edit it to read
map_Kd london_map.tga
etc
Can't guarantee the TGA file is 'good' but we won't know until you set the paths right...
I put the files in the root of the drive.
@tig said:
Perhaps it's the TGA image format that's unsuitable ?
Try moving the origin of the TGA to top-left and re-saving... and/or having no TGA RLE-compression in the image [Gimp it].
If a TGA file's format is not suitable for use in a SKM texture it will fail.
I have just maually replicated this error by trying to use a bottom-left/RLE-compressed TGA as a texture - it fails... because there is no suitable image file specified...Alternatively try making PNG versions of the files [with Gimp] and editing the MTL file to look for .PNG not .TGA file names...
See if these ideas works...
Tried converting to the .TGA to a .PNG it converted fine but still the textures do not import. I do not know what GIMP is so I can't try the first one I have uploaded the files now (you can get them here: http://testsite21.weebly.com/uploads/5/5/0/6/5506080/sketchucation_trimble_sktechup_.obj_error.zip) if you could try and import them and send me the .SKP it would be extremely appreciated I did change it to PNG but I changed it back to .TGA I have included the .PNG in the zip still though.
@tig said:
To import materials associated with an OBJ file you need the matching MTL file.
These files are readable when opened in a plain-text editor like Notepad.exe.
Near the start of the OBJ code [let's assume it's calledFilename.obj
] there is a line specifying the MTL - saying something likemtllib Filename.mtl
.
This MTL file should be in the same folder as the OBJ file, unless the line of code specifies a subfolder.
The MTL file defines all material e.g. namenewmtl WoodColor
, colorKd 0.890196 0.882353 0.870588
, transparencyd 1.000000
etc.
If a specified material uses a texture then the name of its image file is given in the material's MTL code on a line starting withmap_Kd
.
If there is a folder-path [given as sayTextures**/**oak.png
] then the image file is expected to be in that subfolder, that is itself in the MTL file's folder; however, if there is no subfolder given in the path then the image file is expected to be in the MTL file's own folder.The Importer is not clairvoyant - it can only work with the data in the file[s] that you give it.
The most common reason for 'missing materials' is that they are simply missing!
I have the .OBJ .MTL and .TGA I have opened both the .OBJ and the .MTL withe Notepad and all paths and file names are set correctly but the textures I have tried ataching a .ZIP archive with the files attached to yesterday's post and this post but it will not work I will upload it to a different site later today
Hi, I recently tried this .obj importer but it did not import textures I have tried all the different settings if someone could please work out what the error is even better import it and send me the .skp it would be most appreciated.
Is there anyway to Import .MAX into Trimble Sketchup with textures or convert it for free and then import with textures? As I am not entirely sure where to post this I have also posted it under 'Resources'