sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    [REQ] [WIP] Spherical Harmonics Style

    Scheduled Pinned Locked Moved Plugins
    3 Posts 2 Posters 357 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      matteo
      last edited by matteo

      Wings 3D has many different options to display your model, while working: this means that it's a real-time calculation. One very pleasant "style" is called "Spherical Harmonics 9" and it's like a fake HDRI enviroment. The image attached speaks for itself.

      Is there a way to tweak sketchup's rendering engine to achieve the some effect?

      I don't know where to post exactly this request: it's not something that can be done by tweaking the Style parameters, but it doesn't look like a proper task for Ruby scripting too.


      sketchup view


      wings3D view

      hire me: http://www.nonsolo3d.it/ !

      1 Reply Last reply Reply Quote 0
      • boofredlayB Offline
        boofredlay
        last edited by

        Maybe not the same effect but you can check the "Use sun for shading" box in the shadow settings.


        Shading1.jpg


        Shading2.jpg

        http://www.coroflot.com/boofredlay

        1 Reply Last reply Reply Quote 0
        • M Offline
          matteo
          last edited by

          It's not just a matter of grayscale contrast: I want to achieve a visual style that simulates (fakes) natural light. Natural light comes in a wide range of different flavours, and the difference between them can be enormous. The source of all our natural light is the sun, however it takes on different characteristics at different times of day and in different weather conditions, turning this one source of light into essentially many different ones ranging from hard and warm to soft and cool.

          In Wings 3D, shadows and color are driven by Spherical Harmonics coordinates. Since I have no idea if Sketchup's rendering engine can do this, I found a workaround by painting my model's surfaces.

          I tweaked the ruby script "Color By" by sdmitch, using my personal colour values. The result is a sort of "Cylindical Harmonics" style. My palette is based on the Kelvin Spectrum, which I find pleasant for my eyes.

          Here the part of the script that I changed.

          
          	def self.direction_color(v)
          		v.y = v.y > 1.0 ? 1.0 ; v.y
          		angle=Math.acos(v.y).radians
          		angle=360.0-angle if v.x < 0.0
          		### change these test ranges and/or color to suit...
          		case angle
          			when 11.25...33.75;color=[255,189,124];			#2000 K°
          			when 33.75...56.25;color=[255,217,181];
          			when 56.25...78.75;color=[254,227,203];
          			when 78.75...101.25;color=[253,237,225];
          			when 101.25...123.75;color=[249,237,232];
          			when 123.75...146.25;color=[245,238,239];
          			when 146.25...168.75;color=[238,238,247];
          			when 168.75...191.25;color=[232,237,254];
          			when 191.25...213.75;color=[223,232,254];
          			when 213.75...236.25;color=[214,227,255];
          			when 236.25...258.75;color=[201,219,255];
          			when 258.75...281.25;color=[191,212,255];
          			when 281.25...303.75;color=[181,206,255];
          			when 303.75...326.25;color=[166,197,255];
          			when 326.25...348.75;color=[151,187,255];		#8000 K°
          			else color=[255,255,255];				
          

          Now, it would be nice to drive this with the sun position, and have an imput panel where you can set 2 main colors and let the script generate the gradient between them. In this way we could easlily fake the light of midday sunshine, late afernoon, sunset, dusk and so on.

          Anybody who can help is welcome!


          skechup-test-1.gif

          hire me: http://www.nonsolo3d.it/ !

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement