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: 67
Posts: 67   Pages: 7   [ Previous Page | 1 2 3 4 5 6 7 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 6088 times and has 66 replies Next Thread
okh
Advanced Member




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

Thanks for the tutorial, Cec. Brilliant as usual. I suspect quite a few of us have struggled with getting a (mountainous) horizon right.
  • Just to emphasise the point you also made in the cheating thread 7182, using a template for the sky is a good idea to deal with the projection Puybaret explained in thread,5533#24187.
  • There are some nice ways to find real 360° panoramas if you are willing to do a stitching job - and depending on the landscape.
    • Creative use of various street-view images.
    • Google Earth type services, such as Virtual globe (good detail for Scandinavia, less so elsewhere - use numeric input to grab the pictures from consistent hight and correct angles).
    • Or, if the plan situation has a reasonably clear view of the horizon, climb up on the roof and take panorama images.
  • Point is, a template will make the stitching and projection editing significantly easier.
You may also have mentioned this, at least implicitly, but the sky texture starts and ends RIGHT in the SH3D view. I.e. if the SH3D compass points the default North, the panorama texture will begin at due East.

So far, so good - 4:1 (360×90) grid, vertical degrees compress towards zenith to adjust the panorama gives a general feel for the location with approximate views from around the house. Forgetting picture perfect for a second and thinking vertical accuracy: what is the best scale? Sure, I know there is a difference between 3D view and hq rendering (feature request 668). And as long as I can get a general idea what I will see from my favourite chair, I can live with inaccuracy (gave up on an accurate starry night sky smile ). But I have this unpleasant feeling that I am missing something with my 360×90 grid.

The image below is late October midday sun at 60° North(should be some 18° above horizon - placed on in image as illustration). But in addition to the 3D view showing more sky than the rendering, I cannot really make up my mind whether it looks (approximately) right.

Btw. and just for reference for anyone coming across this thread, there are some good tips in the blog too:
Sunlight simulation - an all time favourite, useful for practical planning.
How to add a scenery....

ok

PS. As Xiste pointed out, yours is a perfectly good hjell. Only smell missing.
..stoccafisso and regarded a delicacy...
Tried stoccafisso again recently in Veneto, thinking that my taste might have matured. It had not. But my Italian friends were unperturbed by the distinct taste and smell. Most strange.

[Sep 4, 2018 1:41:50 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 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 6463
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

Thanks for sharing this very nice tip Cecilia smile

I added a link to this thread at the end of the tip about adding a scenery around a home, and I'm going to try to fix the issue that shows a different mapping of a sky texture in the 3D view and in SunFlow. I probably never correctly programmed the 3D view mapping. The problem is that it may break the computability of old files in the coming version, with skies a little different in the 3D view sad
Note that the version 6.0 should also fix the frustum issues that remained.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Sep 5, 2018 9:50:01 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.eteks.com [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




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

I'm going to try to fix the issue that shows a different mapping of a sky texture in the 3D view and in SunFlow...
Maybe, it is just me, but it would be a great help if 3D view and rendering were the same. And even better if I could understand the projection and manage to make a reasonably accurate template... smile

Sorry for messing with your thread Cec, but I could not help thinking about the vertical scale after more testing with your brilliant template. And although I am mathematically challenged, maybe it is as simple as calculating the sine of the angle to place the horizontal lines (???). I put it into an .svg template (which again can link to a panorama file for scaling, link is Inkscape compatible).

pan360.svg


The pan360.svg links to file pan360.jpg (same directory), e.g. a Tromsø panorama to study stoccafisso and hjell-building:
pan360.jpg (3600×900)


Test rendering using sine of angle to place each horizontal line above horizon. At least it looks better.
.
[Sep 5, 2018 3:48:46 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: 418
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

@okh
If this is messing with my thread, you are welcome to mess as much as you like!

I suspect quite a few of us have struggled with getting a (mountainous) horizon right.
Me too!
But there are, I assume, two reasons for wanting this:

One is the aesthetic reason – to get a nicer illustration.

The other is to make close to realistic predictions of the views framed by the windows – using a backdrop as aid when deciding placement and angle of a house.

Achieving the latter (accurately), I think, will not be possible with the simple template I have made, In fact I don't think it's possible to make any template that can be used to completely compensate for the equirectangular distortion. But to perform an inversion might be a possible compensation –at least to a certain extent.


Maybe, it is just me, but it would be a great help if 3D view and rendering were the same.
A matching view between the 3D preview and the rendered image would be great!

And even better if I could understand the projection and manage to make a reasonably accurate template... smile

Tsk tsk tsk... isn't it just a 4 by 1 rectangle projected on a hemisphere? So all we have to do is make an attempt to invert the distortion... right?
Sounds easy... but I know it isn't.
Anyway, let's try a quick & dirty inversion-method:




Example rendering:



It seems I could have curved the sky image bit a bit more. Try and fail is the name of the game. But it seems to work – to a certain extent smile

______________

For illustrational purposes, the challenge with using sky images containing mountainous formations or other sizeable objects, is to match light and shadows, exposure, tint and blurriness.
A quick rendering shows that the sunlight is too bright.
And I have noticed that the colour of the sunlight varies, not only by the time of day, but also by the time of year – and so do the shadows. So colour-matching by changing time and date will not work.



Since the colours and the exposure will be a complete mismatch with sunlight, IBL is the solution. Using IBL, I can colourize the upper part of the sky image to make a better colour-match. The drawback is that the shadow-map will be quite dull and render a lifeless image.

So if I have to use this sky image, I have to add shadows by using a fake sunlight – that I can create with light panels. Like this:


OK, so now the rendering is a bit closer to useable – a bit – but it's not quite there yet.
If I put in a few hours of work, I just might make it work.

I will discuss lighting in a later post – and show examples.

Cec
----------------------------------------
[Edit 1 times, last edit by Ceciliabr at Sep 5, 2018 6:59:22 PM]
[Sep 5, 2018 6:57:33 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 
Xiste
Member
Member's Avatar

Norway
Joined: Apr 18, 2014
Post Count: 81
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

It seems I could have curved the sky image bit a bit more.
Are you sure you don't mean a little bit less?
I just did a quick test, and I got the opposite result.
Btv. this method is great for any kind of backdrop, not just skies and sceneries.

Xiste
[Sep 6, 2018 10:51:59 AM] Show Printable Version of Post    View Member Profile    Send Private Message    http://www.boassen.no [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: 418
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

Are you sure you don't mean a little bit less?
I'm pretty sure, but I have been sure before, only to find I was wrong.

Btv. this method is great for any kind of backdrop, not just skies and sceneries.
Absolutely! And the greatest advantage is that a sky image will always render a perfectly exposed image, no matter the lighting conditions. A backdrop affixed to a box or a wall will need lighting, and even then might not render at it's best.

Cec
[Sep 8, 2018 12:01:14 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 
Xiste
Member
Member's Avatar

Norway
Joined: Apr 18, 2014
Post Count: 81
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

I have been sure before, only to find I was wrong.

Well, it appears it was me that was wrong this time.

Apologies
Xiste.
[Sep 8, 2018 1:27:07 AM] Show Printable Version of Post    View Member Profile    Send Private Message    http://www.boassen.no [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




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

Maybe, it is just me, but it would be a great help if 3D view and rendering were the same.
A matching view between the 3D preview and the rendered image would be great!
And even better if I could understand the projection and manage to make a reasonably accurate template... smile

Tsk tsk tsk... isn't it just a 4 by 1 rectangle projected on a hemisphere? So all we have to do is make an attempt to invert the distortion... right?
Sounds easy... but I know it isn't.
Quite, in theory it is easy, but as you say, making the perfect template is probably not possible. Since last post the (3D) perspective has changed: see
fix in thread 8704 and SF-req 668. @Puybaret: Perfect. THANKS for the fix! The 3D sky now makes more sense.

Thanks for the many hints and alignment/distortions. Yet to find out how to save time with Hugin, but I remembered Stellarium (celestial software) which has customisable horizons and backgrounds and when viewing it is possible to use different projections. Testing default ground image (i.e. horizon panorama) + cylinder projection: a night sky for SH3D with grid match and correctly placed celestial objects (at N46.108° E4.78° at some time I cannot remember).


Using stellarium_horizon.jpg gives this render:


Works for my purposes and suggests that Stellarium could be of help when matching sky imagery, placing sun, but also, I guess for making distorts for alternative rendering perspectives as discussed by Cec above.

I love Cec' beautiful images, but as opposed to Cec' aesthetic approach, mine is simpler and just practical. Say you consider building a lodge in a given position.
- Use a panorama of the skyline (real or with online tool), place in grid template.
- Use some sun calculator to determine how high above the horizon the sun will be during normal holidays.
- Use a satellite calculator to determine the position of you favourite information provider.
- Check out other stuff, like nearby airports.
- Find direction(/distance) to various points, summits for hiking, GSM transmitters for broadband, etc etc.

Place all of the above in the template and use as a Sky texture (starting at 90° in the plan, due East when compass points North). Place terrain, trees, buildings and other close obstacles in the plan. You now can visualise several things. Where to point the dish and broadband antenna. Where to place solar panels. How to orient the plan for sun conditions. Which views you will be able to see from your favourite chair through which windows. Whether the airport flight path could be a problem. In addition to all other stuff, of course: grid/water/road access, meteorological statistics, ground condition etc. Arguably too geeky for most plans, the example is based on a real project. It turned out that it would be near impossible to get decent sun conditions in the winter, we needed a different GSM provider for broadband, terrestrial TV would be difficult, but satellite should be ok, airport might be a problem as afternoon flights would often pass just above. All of this could easily have been discovered without the sky texture, but having the visual while drawing proved very useful: once the lodge was oriented for perfect afternoon sun, it turned out it would be difficult to place solar and dish, and the entire lodge had to be mirrored to avoid getting the entrance blocked by snow in the winter.

A higher resolution of mountain_cabin_texture.jpg renders like this (wide angle virtual visitor gives a distortion, of course):
.

Sunlight simulation is a perfect way of playing with sun conditions at different times. Btw. rendering sunlight seems to consider (the silly concept of) daylight saving, but not equation of time I think. At least I think that is why there appears to be a very slight mismatch (<4°) certain times of the year - or it could just be me. But it makes absolutely no difference for my purposes. I suppose one could also consider elevation of viewpoint / plan and estimate distance to horizon for the template.

Cec' template is probably better and easier to use for most purposes and work with most graphic editors. However, for accuracy and editing I prefer an .svg template to position (and distort) elements on the sky texture. For instance a 360° panorama .svg file with a grid, sky- and ground gradients and with links to other files: skyline, clouds, sun. That way it is relatively easy to place (and transform/distort if need be) each item accurately (with manually/Inkscape). Like Cec, I use a 360×90 template, with a few degrees extra at the bottom to blend with ground texture. Once each item is placed (and grid removed), the image can be saved as .png/.jpg and used as a high resolution sky texture.

sky360_sh3d6.svg, with links to (files placed in same directory):
- sky360.png (skyline with transparent sky from 3D terrain viewer)
- clouds.png (generic clouds)
- sun.png (simple sun created with the Gimp)
- plane.png (plane silhouette)

Same .svg file was used as template for the panoramas, just changing the different backgrounds and elements.

Point of this exercise is 1) to illustrate another way of using sky texture, and 2) to explain an item in the wishlist:

The use described, may be useful but to a few, and not really what the sky texture is intended for. But what would be great, now that the 3D view is more predictable, is if it were possible to set or change the starting point of the sky texture so it can be adjusted with the compass. Just a value in Home.xml would suffice for my purposes.
<environment ...>
<texture attribute='skyTexture' name='sky360_sh3d6' width='360.0' height='90.0' image='1'/>
</environment>

Maybe just startDirection='1.5708' or even startAngle='1.5708' endAngle='1.57079999' ?
[Sep 10, 2018 10:30:59 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 
okh
Advanced Member




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

colour of the sunlight varies, not only by the time of day, but also by the time of year – and so do the shadows
Took a second look at your sundial illustration. Not sure how you generated the image, but if it was SH3D/Sunflow (with a non-daylight-saving time setting close to the middle of a time zone), it looks like it might actually be equation of time(?). In which case I was wrong in my last post and our Azure home banter. Interesting. ok
[Sep 10, 2018 11:28:57 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: 418
Status: Offline
Reply to this Post  Reply with Quote 
Re: Light & textures - rendering examples of this and that.

it looks like it might actually be equation of time(?)

Probably.
The images were ( of course smile ) created with SH3D/Sunflow.
Time zone is GMT + 00:00 and physical placement is Greenwich Park.



So the equation of time is responsible for the wobbly shadows...


In other 3D-programs ( like f.i. Vue eXtream – where I got my first real 3D experience) the sun is just a directional light source used to create atmospheres, so you can grab it and move it about as much as you like. Even if it's a lot 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. That's why I created the sundial – to observe how both the light and the shadow directions changed with time.

Here is my sundial Project-file, so you can inspect my setup.

Cecilia
[Sep 11, 2018 9:20:59 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 
Posts: 67   Pages: 7   [ Previous Page | 1 2 3 4 5 6 7 | 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-2018 eTeks - All rights reserved