sketchucation logo sketchucation
    • Login
    1. Home
    2. MattC
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    M
    Offline
    • Profile
    • Following 0
    • Followers 1
    • Topics 4
    • Posts 41
    • Groups 1

    MattC

    @MattC

    10
    Reputation
    39
    Profile views
    41
    Posts
    1
    Followers
    0
    Following
    Joined
    Last Online

    MattC Unfollow Follow
    registered-users

    Latest posts made by MattC

    • Exit plugin from within a function

      Hi

      I was trying to make things elegant, but it seems that I am trying too hard.
      In my plugin definiiton I try to use only functions calls, and to write all definitions in a library.

      def initialize() sel=Sketchup.active_model.selection SPP::test_start SPP::check_selection(sel) SPP::test_end end

      So first function returns messagebox , and the second one checks if anything is selected.
      If not I want to have a error message ( got it ) and then quit the whole tool.
      But somehow the third function also executes returning a message

      ` def SPP::test_start() # display initialisation message
      UI.messagebox "initialised"
      end

      def SPP::test_end() # display finishing message
      UI.messagebox "finished"
      end

      def SPP::check_selection(selection)
      if selection.length >0
      else
      UI.messagebox "Nothing selected ! Aborting"
      exit # HOW TO EXIT PLUGIN ?
      end
      end`

      How to solve it ? Is it possible ?
      Or do I have to check it within a main definition of a plugin ?

      Cheers Matt

      posted in Developers' Forum
      M
      MattC
    • RE: Suggestions for higher quality and more realistic render

      @decumano said:

      maybe I misunderstood some of your words on the pictures, be patient.

      Well english is also not mine native language, and handwriting didn't help, but it was the fastest way to express my thoughts.

      @decumano said:

      -geometry- I will try to correct with photoshop beacause in SU the chair seems round-curved

      It is not exactly what I ment - chair can be round, but at the back of the chair you have one sharp edge, and also where the seat meets wyth the backrest, You can see the shape of t he chair and there it is like cut with the nife.

      @decumano said:

      -make it more round(about the cirle on theroof)-you're right, but in SU it's a circle extruded, i don't know how to get it better. I will try

      I am afraid that the best option is to re-do it .You can try smothing it.

      @decumano said:

      -textures_ are flat, it's true (and should try to use bump and displacement, i'm going to study) but all those are panels and they should be flat, or not? Tiling..yes, ok i'm changing it. The lowe part of the wall are corten-iron panels, they must repeat, but it's true, they sounds bad.

      They can be flat , but usually you will se a crese where they join. The same goes for the floor tiles, usualy the part between them is a bit lower, and sometimes ther is a big difference in refelctions, (tiles reflects preety good , the concrete between not) Corten-Iron, it seems that every panel looks the smae, maybe try to rotate one panel 90 degrees clockwise, it will break repetition.

      @decumano said:

      -lighting.. yes, no shadows,why? Maybe because there are too much lights?

      here I cannot help, but maybe You can post a screen from Your sketchup file ?to see how the ligths are placed?

      @decumano said:

      -No, it's not ambient occlusion, is TEXTDIRT. I tried to use it to give more power to corners, but matbe is better to remove it.

      I haven't tried textdirt, only used AO , but You dont want to overdrive the settings as it will looks unnatural.

      Good luck
      Matt

      posted in V-Ray
      M
      MattC
    • RE: Triangulation and Convex Polygons

      Thomthom's idea should work great in case there is only one hole in a face, and if You make more vertices on the outside loop. The problem with 'spiky' triangles is that You have only 4 vertices to which the edges are drawn.

      Assume that You have two sets of points:
      [inner_vertices]
      [outer_vertices] - for example 25 points per rectangle side

      For every point from [inner_vertices] find closest point from [outer_vertices] and draw an edge between those two.

      (Possible problem) when two outer points have the same distance to inner point. Which point to choose ?

      Cheers
      Matt

      posted in Plugins
      M
      MattC
    • RE: Suggestions for higher quality and more realistic render

      Hi,
      First of all good job! You have asked for CC so few things that I noticed:

      • Geometry - some things should be more round, and in general most of your edges are sharp, in nature it is very uncommon
      • textures - Your textures are flat, ude bump maps where necesarry, and sometimes reflection, it don't have to be 100% reflexive and very sharp. Also notice how tiling and seams are apparent in Your render ( esspecially wood and sandstone (?) near mirror. The rusty tiles (?) on the lower part of wall are repeating - try to make them uniqe.
      • Lighting - well it is a mater of taste, but it also looks quite flat, You have almost no shadows.
      • Render settings - I don't know if it is ambient occlussion that makes a strange pattern near the edges , or something else.

      See attached pictures and keep them coming!

      https://lh6.googleusercontent.com/-1-oAgwouDNU/UTsC6DN-m3I/AAAAAAAABaw/xEOXDgHGkDI/s1200/5.png

      https://lh6.googleusercontent.com/-zXC6-RsROwM/UTsC6Lj2JnI/AAAAAAAABa0/6kh6Egn1k6M/s1200/2.png

      Matt

      posted in V-Ray
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      So it is officially begonnen:
      spin-heads.blogspot.com

      Cheers
      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      Hi Pilou, Hello everybody

      Currently I am rewriting the whole Voronoi 2D plug-in.
      It is going painfully slow, but I have a lot of other things on my head right now.
      Why I am completely redesigning it? Well my understanding of Ruby got a bit better, and also I got some new ideas how to tackle this problem.
      What I want to accomplish:

      1. prepare a nice flow chart for a process of creating 2D Voronoi diagram
      2. based on that define set of standard functions that will be used
      3. compose final version of Voronoi 2D plug-in
      • do steps 1-3 with 3D Voronoi
      • do steps 1-3 with Conic Curve
      • do steps 1-3 with random point generator (2D and 3D)

      Shall I succeed then next step would be a "fracture tool" similar to one in Blender.

      @ Pilou
      So to create voronoi diagram You have to iterate through the message boxes i=1, i=2 ... etc?
      I think that that was one of the first complains and I have disabled it in one of later versions. If not I can do it one more time. the same applies to UNDO in one step. Conic curve on all faces in selection was also made, but I don't know if it was made an official release.

      Your last question is more complicated. Conic curve plug-in was made as a response to the topic in the first post. There You can see that there are multiple curves inside polygons. And all the polygons are convex. So the conic curve , which is a construction based on 3 points (let's say A B and C), is always located inside the smaller angle near the point B. In Your case polygon is Concave and conic curve will go outside. Is it possible to force it inside? Well it is.
      See explanation of how the conic curve is made in first post. You have to set an offset that will sit well inside, and also play with a weight value. But in this version You cannot set different weights for every vertex. Maybe I will get to that in one of the future releases.

      Stay tuned for more details. I will try to make a nice blog (possibly later an e-book) about it.

      Cheers
      Matt

      posted in Plugins
      M
      MattC
    • RE: Unfolding plugin idea

      @gade said:

      Hello, i'm very interested into your plugin but it's not working on my computer... is it possible to use your plugin with mac ? i have sketchup 8? please help me to use your plugin i would like to make a model ...

      Hi I will need some more informations to answer, I havn't used it in a long time, at least this version, but I see no reason why it should not work on Mac.

      You can also take a look here:
      http://www.papermodelers.com/forum/software/18100-spp-sketchup-paper-planes-tools-sketchup.html

      Greets
      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      @ mitcorb - example : If You have polygon with 4 vertices, You can create 4 sets of points ([0,1,2],[1,2,3],[2,3,0],[3,0,1]).
      You can use those sets of points to create rational bezier spline(http://en.wikipedia.org/wiki/B%C3%A9zier_curve#Rational_B.C3.A9zier_curves) by asigning weight to every point.
      Special case is when You set for first and third point weight = 1 , and weight "w" for second point.

      • when w>1 then created curve is a hyperbole
      • when w=1 then created curve is a parabole
      • when w<1 then created curve is an ellipse (in special case circle)
        Hyperbole, parabole ellipse and circle are known as a conic curves or conic sections , because You can create them by cutting cone with a plane.
        For further read : http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/NURBS/RB-conics.html
        http://en.wikipedia.org/wiki/Conic_section

      If You draw square, and apply coniccurve with weight w = sqrt(2)/2 = 0,7071, You will get a circle.

      @ Pilou - This is an implementation of 3DVoronoi - this is my next step, but at this moment I struggle a bit with a code...

      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      Hi
      Yes I got it, Thanks a lot, I am a bit busy at my normal work, but plugin is still alive.
      I will try to get updated version online this weekend, but I was already focused on Voronoi2D version 2.0
      Cheers
      Matt

      posted in Plugins
      M
      MattC
    • RE: [PLUGIN] Voronoi + Conic Curve

      Well... I think 2D voronoi package (delauney triangulation by TIG + Voronoi on XY plane + Conic Curve + Convex hull on XY plane) is almost ready.
      Next step will be: (delauney triangulation in 3D + Voronoi 3D + Conic Curve + Convex hull 3D).
      But it is a lot more complicated.
      So it is a bit to early to decide free / paid - but I think donationware ( if You like it - gratify creator) is the way to go.
      Cheers
      Matt

      posted in Plugins
      M
      MattC