Features

Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Help  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 80
Posts: 80   Pages: 8   [ Previous Page | 1 2 3 4 5 6 7 8 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 32771 times and has 79 replies Next Thread
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1556
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

Thanks. After some experiments it certainly looks as if the rendering considers equation of time.
..more complicated in SH3D, I try to use the sunlight the same way, so I often shift the date and time to change the colour and height of the sunlight...
And you make it work nicely for your renderings. But for me it would only be confusing if I could shift the sun at random, so I am happy it is 'complicated' to 'cheat'.

Anyone coming across this thread and reading about the sky texture alignment, should also know that SH3D 6 (beta 7) introduces X offset for the sky texture so it can be rotated.

ok
[Sep 11, 2018 10:32:31 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Ceciliabr
Advanced Member
Member's Avatar

Denmark
Joined: Jul 7, 2013
Post Count: 474
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

@okh
Anyone coming across this thread and reading about the sky texture alignment, should also know that SH3D 6 (beta 7) introduces X offset for the sky texture so it can be rotated.

Your contributions here are boosting the value of this thread.
Thank you!

Cecilia
[Sep 14, 2018 6:36:18 PM] Show Printable Version of Post    View Member Profile    Send Private Message    http://cecprojects.wordpress.com [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1556
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

Oh well, I am just meddeling. Really appreciate your detailed guide. Meanwhile I am updating my .svg template. Not posted yet. Template works quite well for inserting own images, but when I try to use 3d matrix to recreate your backdrop distortion I run into all sorts of problems. In part it is not supported by Inkscape (and not all browsers), but more annoyingly, even if the image transforms well, it somehow gets so blurred that it is totally useless. But I am on the case. One day maybe a proper man-template will be available. Meanwhile I suppose we shall have to make do with the (better) upside down world. smile ok
[Sep 14, 2018 7:58:26 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Ceciliabr
Advanced Member
Member's Avatar

Denmark
Joined: Jul 7, 2013
Post Count: 474
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

even if the image transforms well, it somehow gets so blurred that it is totally useless.
It's your fear of high resolution that is blurring your vision!

My sky images are 15000px x 3750 px. I normally go at least twice that size when editing, and then rescale to 15000 x 3750 px ( or sometimes as low as 6000 x 1500 px if there are no gradients present).

The jpg-compression algorithm can be tricked by adding a layover of noise, so that even at the lowest (10%) jpg-quality a 15000 x 3750 image will render an acceptable sky at FoV 30.
A 15000 x 3750 low-res jpg @ 10% can weigh as little as 200kb, and still render ok.
For sky images, resolution (size) and quality goes hand in hand.

Cec
[Sep 16, 2018 1:04:23 AM] Show Printable Version of Post    View Member Profile    Send Private Message    http://cecprojects.wordpress.com [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1556
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

It's your fear of high resolution that is blurring your vision!
That could very well be, actually. As you know I work with scaled down images for templates and tests even if I am not quite as cheap with my more private projects.

Still, there is something strange. I can transform the image quite well in the Gimp. But when I try to use .svg so a linked image can distort automatically, I get problems. Cannot remember how intimate you are with .svg, but here is the latest attempt using .svg + css3 to test 'automatic' 3d distort in the template (viewBox="0 0 360 94" ). In Firefox, the rectangle and image distorts, but is too blurred.
<!-- In theory this could distort (transform) an image to improve rendering, but it is not supported by several browsers/Inkscape, and when it is supported (Firefox), the image blurs -->
<g transform="translate(30 60)" opacity="1">
<g style="transform-origin: 32px center 0px; transform: matrix3d(1,0,0.00,.00,0.00,1,0.00,0.01,0,0,1,0,0,0,0,1);" >
<rect width="72" height="36" fill="none" stroke="red" stroke-width="1"/>
<image width="72" height="36" xlink:href="mountainx.png" preserveAspectRatio="none"/>
</g>
</g>
When I can spend a couple of hours to concentrate, I will try some more before I post the template. For the record, this is not an attempt at picture perfect, just a quick approach to create a backdrop that can work with a SH3D scene render. ok
[Sep 16, 2018 8:28:19 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Ceciliabr
Advanced Member
Member's Avatar

Denmark
Joined: Jul 7, 2013
Post Count: 474
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

Cannot remember how intimate you are with .svg,
Not at all intimate I'm afraid sad
But I'm quite intimate with Photoshop, and I know for a fact that scaled down images will produce crappy outputs.

Okay...
We have talked about this before.

A 1024 px image at maximum jpg-quality will not produce an acceptable sky image, whereas the same image at 6000 px, compressed so much that it's weighing the same (both weighing 150 kb), will produce a far better ( almost a tolerable) sky rendering.
Examples:
Sky image 1024 px - Filesize = 150 kb:


Same image 5700 px - Filesize = 155 kb:


Size matters (resolution – not filesize), not only for the sky, but for ALL textures, and the higher the resolution – the more compression can be applied – ergo: The filesize is less important than the resolution.

I prefer sky images @ 15000 x 3700 px, and they normally weigh between 800 kb and 2.1 Mb.


Sky6000.sh3d

TestHorizon_1024.jpg

TestHorizon_6000.jpg

The larger sky image takes four seconds longer to render.


Cec
----------------------------------------
[Edit 1 times, last edit by Ceciliabr at Sep 16, 2018 7:21:22 PM]
[Sep 16, 2018 7:19:05 PM] Show Printable Version of Post    View Member Profile    Send Private Message    http://cecprojects.wordpress.com [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1556
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

..quite intimate with Photoshop...
Picking a tool is a matter of choice. My preference is Gimp for the raster images, which I link into an .svg file for post editing with a text editor or Inkscape. Doubtless, this could be done with the Gimp alone, or Photoshop, with just as good results. The only reason for the .svg detour, is that items easily can be placed, moved, scaled accurately on the canvas by using numeric co-ordinates. And then each item, a hill, a cloud, can be adjusted individually with the Gimp (or whatever) to acceptable resolution, hue etc. etc. But that is just a personal preference.
We have talked about this before.
Yes we have. And, of course, I agree with what you say. Just did a test using the .svg template (which I will post) exporting to .png. at: 7200×1880, 3600×940 and 1800×470. With 6.0 beta and limited access to memory, 7200×1880 maxed out. 1800×470 rendered quickly. The latter is acceptable for planning purposes, but even I would consider using higher resolutions for a nice render. Which is to say, I agree with what you say even if I probably have a lower threshold for crappy.
[Sep 17, 2018 2:08:20 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Ceciliabr
Advanced Member
Member's Avatar

Denmark
Joined: Jul 7, 2013
Post Count: 474
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

With 6.0 beta and limited access to memory, 7200×1880 maxed out
Yes, that's the problem with the web-start-version.

The only reason for the .svg detour, is that items easily can be placed, moved, scaled accurately on the canvas by using numeric co-ordinates. And then each item, a hill, a cloud, can be adjusted individually with the Gimp (or whatever) to acceptable resolution, hue etc. etc.
Sounds a lot like what I do in Photoshop. I don't think I have fully understood how the .svg numeric coordinates work differently than a Photoshop ( or Gimp) template.

Cec
[Sep 17, 2018 5:17:03 PM] Show Printable Version of Post    View Member Profile    Send Private Message    http://cecprojects.wordpress.com [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1556
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

.. fully understood how the .svg numeric coordinates work differently...
Not much to understand, I think. Approach is the same, I just like the more readable and transferable .svg format for constructing a multi-element background. No idea about Photoshop co-ordinates, but in the example below, sun is placed at x="90" y="60", which on a 360×90 canvas (viewBox) converts to degrees.

Probably like your Photoshop approach, at the end of the day, it is just question of combining elements on a sky texture, for instance: sun.png, clouds.png and mountain.png. Unlike the not-so-open formats of Photoshop and the Gimp, .svg displays with any browser and edits with a text editor / Inkscape / the Gimp / OpenOffice etc. maybe even Photoshop. And it can be scaled to any size without any quality loss other than that which comes with the linked raster images. All this fits into a small (and tidy) file: minitest.svg which looks like this opened in any text editor:

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="3600px" height="900px" viewBox="0 0 360 90">
<defs>
<linearGradient id="skygradient" x2="0%" y2="100%">
<stop stop-color="MidnightBlue" stop-opacity="1" offset="0"/>
<stop stop-color="#f0f0fa" stop-opacity="1" offset="1"/>
</linearGradient>
</defs>

<rect id="sky" width="360" height="90" x="0" y="0" fill="url(#skygradient)" stroke="none"/>
<path id="equinoxpath" fill="none" stroke="orange" stroke-width=".1" d="m 0,-30 c 62,0 118,60 180,60 62,0 118,-60 180,-60" transform="matrix(1,0,0,-1,-90,90)" />
<image xlink:href="sun.png" width="20" height="20" x="90" y="60" transform="translate(-10,-10)"/>
<image xlink:href="clouds.png" width="80" height="20" x="0" y="74" transform="matrix(1.6,0,0,.9,0,0)" opacity=".7" preserveAspectRatio="none"/>
<image xlink:href="clouds.png" width="80" height="20" x="00" y="95" transform="matrix(-1.2,0,0,.7,100,0)" opacity=".6" preserveAspectRatio="none"/>
<image xlink:href="mountain.png" width="80" height="15" x="30" y="75" preserveAspectRatio="none"/>
</svg>
sun.png, clouds.png and mountain.png must be downloaded and placed in same directory as minitest.svg for this to work.

Saved as .jpg (3600×900, high compression) the result is a sky texture for SH3D minitest_horizon.jpg (64KB) which gives this render:
Yes, the mountain is crappy: the image linked is low quality at 256×64, compressed to 10,6KB. Which is overdoing it, even for me. On the other hand, the entire mountain can be Base64 embedded in the .svg without taking up more than one line of less than 15000 characters and be used several times in various shapes and sizes:

<image id="mountain" xlink:href="data:image/PNG;base64,xxx"/>
<use xlink:href="#mountain" transform="matrix(.3,0,0,.25,130,80)"/>
<use xlink:href="#mountain" transform="matrix(-.4,0,0,.15,280,86)"/>

A mountain is probably not a good example but embedding can be a convenient way to save simple raster elements inside a still small .svg file. But whether you wish to embed or not, using .svg as a 'container' or list of links, means you can exploit the best qualities all formats, combining .png, .jpg and .svg for different elements. .png for transparency / indexed colours, .jpg for smaller 'photographic' files and so on. Preferably of higher quality than the ones used in this example.

The template I actually use is more elaborate with a grid, some embedded images and gradients. Gradients and blurs can be useful for many things, such as blending skyline with ground colour/texture in SH3D or lighting up parts of the sky. But point is for the file to be simple, readable and compatible so SH3D skyline can be edited with a couple of keystrokes with as many image elements as you like in whatever quality: cityscapes, forests, planes, satellites and so on*, at higher quality. But it is also possible to make the template as advanced as you wish: The sun path is an approximation of equinox sun passage on horizon to be moved/transformed for other seasons, transformed upside down so the path reflects actual degrees above horizon. Something I would not know how to do accurately with the Gimp.

Clearly, all editing is quicker with a familiar interface. So no reason not to stay with whatever works. In addition to my liking for open, human readable formats, I suppose this is also a sales pitch for editing xml in general. For instance, I hardly use furniture libraries when it is possible to add cutouts, door/window and lightsource properties directly in Home.xml.

ok
[Sep 18, 2018 1:24:11 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1556
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

Forgot to post the file with (low-res) mountains, clouds, sun etc. embedded. Easier to edit. Yes, yes, say nothing, the elements will need higher resolution for nice rendering. But you get my drift. A high-res credo is sensible, here is an example of the opposite: how low is it possible to go. smile

minitest_embed.svg < 50 KB, initial resolution 1200×300 px, but can scale to anything when importing to Gimp/Photoshop or changing width height in the .svg.
SH3D does not import the .svg directly so the image needs to be converted to .png/.jpg before use.

[Sep 18, 2018 5:11:31 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 80   Pages: 8   [ Previous Page | 1 2 3 4 5 6 7 8 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2019 eTeks - All rights reserved