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

    OricAtmos

    @OricAtmos

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

    OricAtmos Unfollow Follow
    registered-users

    Latest posts made by OricAtmos

    • RE: [Code] Raytest Util

      @adamb said:

      The wavelength of light is small so mostly you can ignore diffraction effects and treat light as moving in straight lines. Audio wavelengths are much longer and have significant diffraction around corners (hence you can hear round corners!), so how does using (straight line) raytracing help here?

      Good observation! Raytracing is essentially just an approximation of how sound travels. Diffraction can't be modeled that way. As far as I know, simulating diffraction is still a hot topic in the field of acoustics and there's no catch-all automatic solution yet. (I'm not an expert in acoustics, I'm just a Computer Science student doing some coding at an acoustics chair/institute)

      posted in Developers' Forum
      OricAtmosO
      OricAtmos
    • RE: [Code] Raytest Util

      @aerilius said:

      I really see no advantage of having an imperfect built-in (or Ruby plugin) raytracer, while there are already so many dedicated renderers with better illumination models, more speed and more realistic output.

      Yeah, I guess the raytest function would need to be able to take an array of rays and do multithreaded casting to be comparable to an external raytracer. By the way, we're doing room acoustics simulation, not visual rendering, with our plugin.

      posted in Developers' Forum
      OricAtmosO
      OricAtmos
    • RE: [Code] Raytest Util

      Thanks!

      @adamb said:

      No, it is not suitable for raytracing etc where you'll be casting millions of rays.

      That's too bad, since this could be useful. πŸ˜„

      posted in Developers' Forum
      OricAtmosO
      OricAtmos
    • RE: [Code] Raytest Util

      Does anyone know how raytest is implemented? Does SketchUp use a BSP or some other data structure to speed up geometry searches?
      In other words, is raytest reasonably fast or is it done in a brute-force manner?

      posted in Developers' Forum
      OricAtmosO
      OricAtmos
    • RE: [SU2014] character encodings and the Ruby console

      Thanks, that might come in handy!

      posted in Developers' Forum
      OricAtmosO
      OricAtmos
    • RE: [SU2014] character encodings and the Ruby console

      I think I should get my plugin working in SU2014 before I try to reproduce the problem. Perhaps everything will just work then.
      So please don't take this thread as a bug report. πŸ˜‰

      posted in Developers' Forum
      OricAtmosO
      OricAtmos
    • RE: [SU2014] character encodings and the Ruby console

      RB and HTML file encoding was never really a problem. But I think I ran into problems when using File Open dialogs and accessing files with special characters in the name (like umlauts). I think the Windows file system sometimes expects CP1252 encoded file names. Then there was another problem with console windows, which are encoded in CP850 or something by default on my system. I'm running some C++ programs with console windows that directly communicate with my SketchUp plugin via sockets. I have WebDialogs where the user can enter text (possibly including umlauts) which is then sent to these C++ programs and displayed in the console window. I think what I did with the console windows was changing the console encoding to CP1252 (UTF-8 is not possible I think). So I guess I'm actually down to two encodings. πŸ˜„
      What I still don't understand is how to cleanly get UTF-8 text input from the WebDialogs to Ruby. I think there's some implicit conversion going on between the two.
      I'm still in the process of converting my plugin to Ruby 2.0 so the above applies to the old version.

      posted in Developers' Forum
      OricAtmosO
      OricAtmos
    • RE: [SU2014] character encodings and the Ruby console

      @tt_su said:

      (Other than it can make people thing their encoding is correct, even though it's not.)

      That's what I'm worried about, because I did have issues with encodings in the past. It's kind of annoying that Windows isn't all UTF-8. Between console windows, the file system, and WebDialogs I have to deal with at least three types of encodings.

      posted in Developers' Forum
      OricAtmosO
      OricAtmos
    • [SU2014] character encodings and the Ruby console

      Hi,

      I've been playing around with character encodings and noticed something in the Ruby console I don't understand. The default encoding of strings in the console seems to be UTF-8, which isn't surprising. Even if I convert a string from UTF-8 to a different encoding, it will still be printed to the console correctly. But even if I then force the encoding of the converted string back to UTF-8 (which doesn't change a single byte in the string) it will still be printed correctly to the console although now the console must think it's a UTF-8 string while it actually isn't.

      I'll attach a screen shot with an example:

      Encodings and the Ruby console

      Does anyone know what's going on here?

      posted in Developers' Forum
      OricAtmosO
      OricAtmos
    • RE: Resolution of pre-distorted textures

      Thanks for the suggestions! You're right, there's no single "tiling factor" in a distorted texture. I think I'll ignore this problem for now and solve more important issues first.

      By the way, is there perhaps some kind of exporter plugin template that does all the complicated stuff of getting the needed model information out of SketchUp? Something that's only missing the actual writing of the target file format.

      posted in Developers' Forum
      OricAtmosO
      OricAtmos