sketchucation logo sketchucation
    • Login
    1. Home
    2. Wacov
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.8b introduces important bugfixes for Fredo's Extensions Update
    W
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 46
    • Posts 532
    • Groups 1

    Posts

    Recent Best Controversial
    • 'Graphics'...

      Ok, I for one am tired of the poor effeciency, quality and lack of options available in SU's renderer. There's only so much you can show with 'Sketchy Edges' and a generic shader; what I'd like to see is full use of the graphical hardware to create real-time, scalable quality photo-realistic rendering, which can be used in combination with current line styles (Which should be optimized). It's quite alot, but here's the list:

      • Rendering done entirely by the GPU
      • Scalable quality shadows, from high-performance blocky shapes to semi-realistic soft shadows (All updating real-time)
      • Wide variety of shaders, assigned using materials, to greatly increase the realism
      • Real-time Ambient occlusion (SSAO?)
      • Bump mapping
      • Scalable quality reflections, with options to blur and distort, and go from simple highlights to perfect mirroring (Again, real-time)
      • Skyboxes
      • Full screen rendering
      • Options for all of the above in scene properties
      • Most importantly, retain the ability to edit the model with all of the above turned on
      • Options to stop certain features being used in preferences, to stop lower performance machines crashing
      • Stop the view cutting away the object when zoomed in on an extremely large/highly detailed model
        I know, it's alot to ask, but it's time they used the GPUs properly; running using a GTX 295, what's so far been offered is very dissapointing. Please comment!
      posted in SketchUp Feature Requests sketchup
      W
      Wacov
    • RE: Is this some joke?

      I just go to CGtextures, and I've got a nice little program to tile them... it's much better quality than what Google offers πŸ˜„

      posted in SketchUp Feature Requests
      W
      Wacov
    • Raycasting

      Now that Newton Dynamics supports Raycasting (the collision kind), could we have support for it in SP? Mainly for weapons, but it might also be possible to add sensor capabilities; you could detect whether an object is in line of sight, which would definately be useful...

      posted in SketchyPhysics
      W
      Wacov
    • RE: Tracking with dimensions

      I think I understand what you mean... do you want to save each object's position, in every frame of the simulation? That wouldn't really be a good idea, I could tell you how, but you'd end up with at least 500 x,y,z values for each object. For longer simulations you could be looking at 10,000+ per object...

      posted in SketchyPhysics
      W
      Wacov
    • RE: Working on new scripting system.

      Ok, that's REALLY awesome... first, does it split the actual geometry, or the collision mesh? And one important thing would be efficiency; would we be able to set the generated pieces to noCollision, and delete them after a timer? Or better yet, create the biggest pieces normally, but on a deletion timer, and make the smaller pieces noCollision.

      And I'm pretty sure it won't, but will it break in response to tension and/or internal stress? For example, putting a heavy weight in direct contact, without dropping it, or hitting it with an extremely powerful magnet.

      posted in SketchyPhysics
      W
      Wacov
    • RE: Working on new scripting system.

      With the teleportation, will the camera be moved if it's following a teleported object? And could you have a breakable object, which, when broken, teleports back to the starting position with all its joints intact?

      I think as long as we can break fixed joints on command it should be alright. Oh, and I just thought of a possible solution to the deletion problem; maybe, while the simulation is running, you create a new, invisible layer. When the script 'deletes' an object, just move it into that layer and set its state to ignore... then just change it back and remove the new layer at the end of each simulation!

      posted in SketchyPhysics
      W
      Wacov
    • RE: Nodes...

      Thanks! πŸ˜„ That's basically the system I'll use once the pathfinding has run. I've found a way to use attributes with the Hash variable system I'm using at the moment... it could either be:

      @@n.attr[1]

      Or:

      @@n[1].attr

      The first one invloves assigning attributes to the main variable, and setting them as hashes; the second means assigning attributes to the Fixnum class, which is less dynamic, and, I think, a bit strange.

      posted in SketchyPhysics
      W
      Wacov
    • RE: Working on new scripting system.

      Could I make one small request? Could you set SP to run every script in a model once, when it is loaded? This would stop the error messages popping up when I try and edit a script that uses a method or variable, that's set in another script, which itself hasn't been run yet.

      posted in SketchyPhysics
      W
      Wacov
    • RE: Nodes...

      Ok, I've downloaded the latest versions of Python, PYGame, and something to extract the .gz. I found the folder, double-clicked on the python files, and nothing. How do I run the example?

      Oh, and here's a basic path FOLLOWER. It can't avoid collisions, but it runs through the given list of nodes. It shows that:

      A) It's possible to run a route based on a list
      B) It's possible to create the node framework required for pathfinding
      C) It could be relatively easy to set up the nodes. My system only requires you to give each node a unique number as an entity name; the script does the rest.

      If you want to use the system, go ahead. The script's all in place... you have to include the stuff in the floor and pointer cone's onTick. You can copy the nodes fine, just give every copy a unique number as a name. Anyway, here's the link: http://sketchup.google.com/3dwarehouse/details?mid=6a0e83aefa4869dc6cd8ad826e9017b8

      posted in SketchyPhysics
      W
      Wacov
    • RE: Working on new scripting system.

      AWESOME

      Can we disconnect joints yet...?

      posted in SketchyPhysics
      W
      Wacov
    • RE: Nodes...

      The classes aren't needed... I knew that from the start. It really begun with me testing whether classes worked in SP, then trying out storing information in the attributes... that works, so I can carry on with my little project πŸ˜„ ... The demo itself is basicallly a side product of me looking into slightly more advanced ruby.

      The short way was the first way I tried; it didn't work. Even when classes aren't used, it won't allow it...?

      Ok... I think the pathfinding is possible. It's gonna be complicated, maybe to the point where I can't realisticly use it, but here goes:

      Step 1) Define a node as a target

      Step 2) Determine the nearest node to the AI's current position (Add to the closed list, define as beginning of path)

      Step 3) Find all nodes connected to the first. Add them to the open list, define the start as their respective parents

      Step 4) Find the node on the open list with the lowest F cost (Distance along path from start + distance to target). Add this node to the closed list.

      Step 5) Find all nodes connected to this one. Add them (Excluding those already on the closed list) to the open list, define this node as their parent

      Step 6) Find the new lowest F cost open node. Add to the closed list, and continue...

      Step 7) Once the target node is added to the closed list, you need to find the path. This is a simple matter of 'follow the parent', tracing back from the target to the start. Compile these nodes into a list, reverse it, and you're ready to go.

      This can all be done in a single frame of the simulation... you can detect a change in the target by creating a 'lastTarget' variable at the end of every frame's script. If the target changes, just run the pathfinding again... this allows tracking of changing objectives. Finally, you could track a moving target by finding the nearest node to it, then chasing the target itself once you've 'caught up'.

      All this would be supported by the node variable framework. Each node would constantly be updating its respective global variable, with its distance from the target, the list of connected nodes, and, if applicable, its parent node.

      Oh, and Chris, I just had a peek at the SP3 ControllerCommands... you've added the ability to find the position AND the animation method you used into SP's code πŸ˜„ Why don't you tell us about this stuff? πŸ˜„

      posted in SketchyPhysics
      W
      Wacov
    • RE: Nodes...

      UPDATE: YES! Thank you BTM!! It's accurate now, thanks to that lovely little code from Google. I'm gonna make a request to build the getPosition method into SP for the next release; until then, the code is:

      def getPosition
      return $curEvalGroup.transformation.origin
      end
      

      This can be entered anywhere, and will affect the entire model. Once entered, typing getPosition into any formula field will find the selected group's position, relative to the model's origin. To get just, say, the Red axes, use:

      red=getPosition
      red=red[0]
      

      The [0] finds the first number in the 'list' of coordinates. Use [1] for the Green axes, and [2] for Blue.

      posted in SketchyPhysics
      W
      Wacov
    • RE: Nodes...

      $curEvalGroup, Chris told me about... I figured out how to find the position from what was in the Knight demo's script (the part that finds the speed). The other stuff, I found out from finally completing the 'Try Ruby' tutorial πŸ˜„

      This is really just getting all the pieces together for a pathfinding system... one important thing will be finding the nearest node, and, to add a mobile target, finding the nearest node to that...

      posted in SketchyPhysics
      W
      Wacov
    • RE: Nodes...

      Ok, found out about arrays (lists), classes and attributes. Should all be useful... I'll try and make a route-following demo, where an object runs through a list of nodes to get to the target.

      Update: Managed to get a system that finds the current position of an object working. Have a look at: http://sketchup.google.com/3dwarehouse/details?mid=fcb65ad19dd115f36cd8ad826e9017b8&prevstart=0 , it uses bits of my own knowledge and a bit of help from Chris's Knight demo

      posted in SketchyPhysics
      W
      Wacov
    • RE: Nodes...

      I've done some more research, and what's needed is the A* algorithm... it's more effective, because it doesn't have to search every possible route, and helps with a couple of the technicalities... but the problem then is estimating the distance to the target. I also don't know how to compile lists using ruby script, or how to find the 'cost' of moving from one node to another... you'd really need to calculate the distance from the parent to the open node, which is either hard or impossible in SP. Search AI pathfinding on google to find tutorials etc...

      posted in SketchyPhysics
      W
      Wacov
    • RE: Menu Script

      You know the key detection system I use? That'd work for this.

      posted in SketchyPhysics
      W
      Wacov
    • Nodes...

      I found out a bit about AI coding, and the simplest way to get effective pathfinding seems to be using nodes (waypoints)... I was wondering whether it's theoretically possible to do this using onTouch fields? If there was a way to find the closest node to the character, you'd then be able to search for a route through the nodes... if each one was affiliated with 1 or more other nodes, in direct line of sight, and it 'remembered' which nodes it had previously pased through en route, you'd then be able to stop each routefinding run when:

      • There are no available nodes to move onto
      • There are no nodes, except ones which have already been used, to pass onto
        Finally, when a route ending in the target node is found, 'save' it, and end that run. Once all possible routes have been calculated, the character would follow the one that passes through the least number of nodes.

      Firstly, I obviously don't know how to make this happen... it's all sort of theoretical. Moving between nodes is relatively easy, you just use a system based around lookAt, and even running through a list of nodes wouldn't be too much of a problem. I just can't get my head around the route calculation... there are also other problems, like how the choice of route would be made. Using the number of nodes isn't ideal, what'd be better is finding the distance the route takes. If anyone (Chris πŸ˜„ ) can help with the technicalities, it'd be appreciated.

      posted in SketchyPhysics
      W
      Wacov
    • RE: Menu Script

      Oh, BTM, that's boring! Menus in 3D, with little moving bits and nice effects, that's the way to go! πŸ˜„

      posted in SketchyPhysics
      W
      Wacov
    • Menu Script

      Min and max decide how many buttons there can be. It's quite complicated, and I think this is one of those scripts you're either gonna get, or not:

      #Initialisation
      if frame==1;
      setVar("lrepeat",0);
      setVar("rrepeat",0);
      setVar("main_select",1);
      end;
      
      min=1
      max=2
      
      #key 'events'
      if key("left")==0;
      setVar("lrepeat",1);
      elsif getVar("lrepeat")==1;
      setVar("main_m",getVar("main_m")-1);
      setVar("lrepeat",0);
      end;
      
      if key("right")==0;
      setVar("rrepeat",1);
      elsif getVar("rrepeat")==1;
      setVar("main_m",getVar("main_m")+1);
      setVar("rrepeat",0);
      end;
      
      if key("up")==1;
      setVar("main_select",getVar("main_m"));
      end;
      
      #Menu behaviour
      if getVar("main_m")<min;
      setVar("main_m",max);
      elsif getVar("main_m")>max;
      setVar("main_m",min);
      end;
      

      It's used in this collab between me and Rogue: http://sketchup.google.com/3dwarehouse/details?mid=146cdf2b1a52c8cc234bd3546e70124a#

      posted in SketchyPhysics
      W
      Wacov
    • RE: You Decide Competition!

      No, it has to be through script. There must be a way, because plugins are able to change the material...

      posted in SketchyPhysics
      W
      Wacov
    • 1 / 1