POV-Ray : Newsgroups : povray.binaries.images : I'm writing a sky render program Server Time
7 Nov 2024 06:23:17 EST (-0500)
  I'm writing a sky render program (Message 1 to 7 of 7)  
From: And
Subject: I'm writing a sky render program
Date: 12 Sep 2016 02:55:01
Message: <web.57d6509cf70bb55868ef8a390@news.povray.org>
I posted a POV-Ray SDL version sky-render program a few months ago.
http://news.povray.org/povray.binaries.images/thread/%3Cweb.5707b68461e083edaf5560460%40news.povray.org%3E/?ttop=410795
&toff=50

But it renders very slow(when turns on secondary scattering). So I write it with
Java currently. It performs 50X faster.

This is a demo image:
I calculated the light until fourth scattering. It takes about 5 hours to
render, image resolution 960x480.
For sunset, sun light propagates a long distance in the atmosphere. So the high
level scattering takes an important role.

This time, I get a bottleneck that I don't know how can I output image to an
HDRI image format like .exr or .hdr. I just output a .png that Java build in. I
need some help.


Post a reply to this message


Attachments:
Download 'color_image???.png' (339 KB)

Preview of image 'color_image???.png'
color_image???.png


 

From: And
Subject: Re: I'm writing a sky render program
Date: 12 Sep 2016 03:15:06
Message: <web.57d655a02bb3c72968ef8a390@news.povray.org>
I would like to develop it to commercial in the future.



image:


Post a reply to this message


Attachments:
Download 'sunset.png' (339 KB)

Preview of image 'sunset.png'
sunset.png


 

From: clipka
Subject: Re: I'm writing a sky render program
Date: 12 Sep 2016 07:12:57
Message: <57d68db9$1@news.povray.org>
Am 12.09.2016 um 08:53 schrieb And:
> I posted a POV-Ray SDL version sky-render program a few months ago.
>
http://news.povray.org/povray.binaries.images/thread/%3Cweb.5707b68461e083edaf5560460%40news.povray.org%3E/?ttop=410795
> &toff=50
> 
> But it renders very slow(when turns on secondary scattering). So I write it with
> Java currently. It performs 50X faster.

Make sure you do proper gamma handling. You'll want to use linear
brightness values for your computations, but (depending on file format)
will want to store them in non-linear gamma-encoded format.

Also, I imagine that skies might benefit a lot from spectral rendering,
i.e. using a ton of colour channels for computations, and only boil them
down to RGB format at the very end.


> This time, I get a bottleneck that I don't know how can I output image to an
> HDRI image format like .exr or .hdr. I just output a .png that Java build in. I
> need some help.

Unless you want to wrestle with JNI to call machine-specific compiled
code, I'd recommend to go for Radiance HDR (.hdr) format. It's pretty
simple to implement. (Make sure to use dithering though, as HDR is prone
to colour banding in gradients with saturated colours.)


Post a reply to this message

From: clipka
Subject: Re: I'm writing a sky render program
Date: 12 Sep 2016 07:38:44
Message: <57d693c4$1@news.povray.org>
Am 12.09.2016 um 09:13 schrieb And:
> I would like to develop it to commercial in the future.

Don't steal code from POV-Ray then. ;)

For a commercial sky rendering tool, OpenEXR output is probably
mandatory. The format is comparatively complex though, so you'll
probably want to use a library for that. Unfortunately (for you, not for
POV-Ray ;)) the official library is written in C++, so you'd have to go
for JNI to use that one. A few people seem to have set out to write
OpenEXR libraries for Java, but at present none of those seem to stand
out as the definitive choice, and their legal status may be too poorly
defined for your purposes. (The official OpenEXR library is perfectly
fine in that respect.)

Writing a minimalistic OpenEXR exporter yourself /may/ be possible,
provided you ignore all the fancy bells and whistles that have been
incorporated into the format since its inception.


Post a reply to this message

From: And
Subject: Re: I'm writing a sky render program
Date: 12 Sep 2016 09:15:01
Message: <web.57d6a9422bb3c72968ef8a390@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 12.09.2016 um 08:53 schrieb And:
> > I posted a POV-Ray SDL version sky-render program a few months ago.
> >
http://news.povray.org/povray.binaries.images/thread/%3Cweb.5707b68461e083edaf5560460%40news.povray.org%3E/?ttop=41
0795
> > &toff=50
> >
> > But it renders very slow(when turns on secondary scattering). So I write it with
> > Java currently. It performs 50X faster.
>
> Make sure you do proper gamma handling. You'll want to use linear
> brightness values for your computations, but (depending on file format)
> will want to store them in non-linear gamma-encoded format.
>
> Also, I imagine that skies might benefit a lot from spectral rendering,
> i.e. using a ton of colour channels for computations, and only boil them
> down to RGB format at the very end.
>
Yes, this is what I implement.

>
> > This time, I get a bottleneck that I don't know how can I output image to an
> > HDRI image format like .exr or .hdr. I just output a .png that Java build in. I
> > need some help.
>
> Unless you want to wrestle with JNI to call machine-specific compiled
> code, I'd recommend to go for Radiance HDR (.hdr) format. It's pretty
> simple to implement. (Make sure to use dithering though, as HDR is prone
> to colour banding in gradients with saturated colours.)
>
> For a commercial sky rendering tool, OpenEXR output is probably
> mandatory. The format is comparatively complex though, so you'll
> probably want to use a library for that. Unfortunately (for you, not for
> POV-Ray ;)) the official library is written in C++, so you'd have to go
> for JNI to use that one. A few people seem to have set out to write
> OpenEXR libraries for Java, but at present none of those seem to stand
> out as the definitive choice, and their legal status may be too poorly
> defined for your purposes. (The official OpenEXR library is perfectly
> fine in that respect.)

Thank you for the information! I had no idea for these.


Post a reply to this message

From: And
Subject: Re: I'm writing a sky render program
Date: 12 Sep 2016 09:20:00
Message: <web.57d6aaa92bb3c72968ef8a390@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 12.09.2016 um 09:13 schrieb And:
> > I would like to develop it to commercial in the future.
>
> Don't steal code from POV-Ray then. ;)
>

Ha!..ok.


Post a reply to this message

From: And
Subject: Re: I'm writing a sky render program
Date: 12 Oct 2016 03:20:02
Message: <web.57fde3e32bb3c729e8a99a5c0@news.povray.org>
I added some cloud on it. Just passable.


Post a reply to this message


Attachments:
Download 'color_image.png' (1855 KB)

Preview of image 'color_image.png'
color_image.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.