Logo by AGUS - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. April 26, 2024, 06:20:06 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1] 2   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: My first Fragmentarium movie  (Read 2066 times)
0 Members and 1 Guest are viewing this topic.
JosLeys
Strange Attractor
***
Posts: 258


WWW
« on: June 18, 2013, 11:36:58 AM »

With some help from Knighty to get me started, here is my first attempt to create something in Fragmentarium :


<a href="http://www.youtube.com/v/hFsihHKTUmk?fs=1&amp;amp;hl=en_US&amp;amp;hd=1" target="_blank">http://www.youtube.com/v/hFsihHKTUmk?fs=1&amp;amp;hl=en_US&amp;amp;hd=1</a>
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #1 on: June 18, 2013, 12:28:38 PM »

nice one, how did you manage the different camera pathes ?! sticking together independent parts of the rendering ?!
that mountain type rendering i like very much, a little bit more zoom depth would be welcome
Logged

---

divide and conquer - iterate and rule - chaos is No random!
JosLeys
Strange Attractor
***
Posts: 258


WWW
« Reply #2 on: June 18, 2013, 01:27:34 PM »

Thanks!

The camera path consists of 12 consecutive sub-paths, obtained by combining the time parameter with some function of the camera position, target, up-vector en field-of view parameter. To render a sub-path, I comment out all the other ones.. One has to be careful to make sure that the movement between sub-paths remains smooth.

Zooming more does not work very well as one hits the single precision accuracy : to show the fractal detail some accuracy setting gets too small for single precision.
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #3 on: June 18, 2013, 01:40:41 PM »

ah, right the 3d view needs a higher precision, fragmentarium can handle double uniforms/variables as well, but for that you would need another gpu,

beside of that, i sense that the cuttings of the sub pathes are somehow not really smooth, i mean, i just see when a camera path is changing,
are you sure you interpolate all values correctly? be sure to use a interpolation method that exactly hits the points

the whole animation this is quite messy with fragmentarium, because the logik for the animation is handled in the scripts, which blows
them unneccessary up

arrh, i think i really have to look into the code to check how hard it would be to assign a controller to a variable, as a starter i would love
to just have an assignable sinewave option for each float param wink
Logged

---

divide and conquer - iterate and rule - chaos is No random!
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #4 on: June 24, 2013, 06:46:19 PM »

A trip to the mountains is always refreshing  A Beer Cup skiing anyone?
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #5 on: June 25, 2013, 12:08:19 AM »

Great animation, Jos. Guess that proves it is possible to do moving camera animation in Fragmentarium - even though it takes some effort!

beside of that, i sense that the cuttings of the sub pathes are somehow not really smooth, i mean, i just see when a camera path is changing,
are you sure you interpolate all values correctly? be sure to use a interpolation method that exactly hits the points

The camera uniforms look continuous to me. I think the transitions are visible because the derived quantities probably are not.

Quote
arrh, i think i really have to look into the code to check how hard it would be to assign a controller to a variable, as a starter i would love
to just have an assignable sinewave option for each float param wink

It is easy to assign the uniforms in the code, but hard to come up with a general scheme, I guess.
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #6 on: June 25, 2013, 12:26:02 AM »

the scheme would be as easy as possible, each axis - one sine wave defined by frequency and amplitude, ideally this should be stackable for each axis, including a general weight for the additions to get it smooth in or out cheesy

haha, this is just my basic idea how i would like to hack it into, it is by far not the best way to do it, or even something that could lead to a keyframe animation system, but hence it is a realtime application anyways, why not think about the realtime animation possibilities ? to achieve stuff like kali did with his living sea creatures, that just rely on various parameters animated - in realtime ....
Logged

---

divide and conquer - iterate and rule - chaos is No random!
JosLeys
Strange Attractor
***
Posts: 258


WWW
« Reply #7 on: June 25, 2013, 12:30:11 AM »

I'm still using the scene in the film to test and learn about other features.
When I try to use a jpg file as a background, I get an ugly black vertical line in the middle.
I'm converting to sperical coordinates as follows:
Code:
vec3 equirectangularMap(sampler2D sampler, vec3 dir) {
// Convert (normalized) dir to spherical coordinates.
dir = normalize(dir);
vec2 longlat = vec2(-atan(dir.x,dir.z),-acos(dir.y));
// Normalize, and lookup in equirectangular map.
  return texture2D(sampler,longlat/vec2(2.0*pi,pi)).xyz;
}

Any ideas?


* HF_test001.jpg (44.27 KB, 894x513 - viewed 260 times.)
Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #8 on: June 26, 2013, 05:05:17 PM »

I'm still using the scene in the film to test and learn about other features.
When I try to use a jpg file as a background, I get an ugly black vertical line in the middle.
I'm converting to sperical coordinates as follows:
Code:
vec3 equirectangularMap(sampler2D sampler, vec3 dir) {
// Convert (normalized) dir to spherical coordinates.
dir = normalize(dir);
vec2 longlat = vec2(-atan(dir.x,dir.z),-acos(dir.y));
// Normalize, and lookup in equirectangular map.
  return texture2D(sampler,longlat/vec2(2.0*pi,pi)).xyz;
}

Any ideas?

Yes, I also see that on JPG's. There is line when the first argument to atan(y,z) is close to zero, and the second argument is negative. There is a discontinuity in atan2 here: the result jump from -pi to pi depending on the the sign of the first argument. Now that shouldn't matter, since the texture wraps (is periodic). But it does. It might be a half-texel offset interpolation thing, but I haven't found a work around.

What is really weird is that I don't see this error on the HDR textures I use for backgrounds.
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #9 on: June 26, 2013, 05:08:34 PM »

i think i has to do with a division by zero error, check that when using the atan function... just my 5 cents
Logged

---

divide and conquer - iterate and rule - chaos is No random!
JosLeys
Strange Attractor
***
Posts: 258


WWW
« Reply #10 on: June 27, 2013, 09:04:37 AM »

No I don't think it is division by zero. This only happens when dir.z=0.

I got rid of the tangent by changing to the code below, but the result is the same : still a black line :
Code:
vec3 equirectangularMap(sampler2D sampler, vec3 dir) {
// Convert (normalized) dir to spherical coordinates.
dir = normalize(dir);
vec2 longlat = vec2(-sign(dir.x)*acos(dir.z/length(dir.xz)),-acos(dir.y));
// Normalize, and lookup in equirectangular map.
  return texture2D(sampler,longlat/vec2(2.0*pi,pi)).xyz;
}

If I leave out the sign of the x-direction, I obviously get an imaged mirrored on the vertical axis, but there is no black line!

Fragmentarium seems only to recognize jpeg and hdr images, but png works also (and with png, the black line is there also)
Are other formats possible, like tiff ?
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #11 on: June 27, 2013, 10:13:08 AM »

you might try a very big image as well, with the goal to make the line as small as possible with the hope to get rid of it completely
Logged

---

divide and conquer - iterate and rule - chaos is No random!
JosLeys
Strange Attractor
***
Posts: 258


WWW
« Reply #12 on: June 27, 2013, 10:56:24 AM »

The solution for using jpg files as a 360° background is to convert them to hdr using Picturenaut (http://www.hdrlabs.com/picturenaut/index.html).
We need to adapt some signs as otherwise the image gets flipped :
Code:
vec3 equirectangularMap(sampler2D sampler, vec3 dir) {
// Convert (normalized) dir to spherical coordinates.
dir = normalize(dir);
vec2 longlat = vec2(-atan(dir.x,dir.z),acos(dir.y));
// Normalize, and lookup in equirectangular map.
  return texture2D(sampler,longlat/vec2(2.0*pi,pi)).xyz;
}

This gets rid of the black line!
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #13 on: June 27, 2013, 09:30:59 PM »

As syntopia noted, it is due to the discontinuity of atan() function. More specifically, the derivative (which is used for mipmap) is not defined at the discontinuity. It is possible to remove the artifacts by using texture2DLod() instead. Just give a good value to the "lod" parameter by trying a value of 0. first then bigger values. It could be computed as function of the zoom factor.

IIRC, float textures (which are used for hdr) don't support mipmapping. Right? That should be the reason why there is no artifacts when using hdr format.

Very nice video BTW!
Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #14 on: June 27, 2013, 11:48:00 PM »

As syntopia noted, it is due to the discontinuity of atan() function. More specifically, the derivative (which is used for mipmap) is not defined at the discontinuity. It is possible to remove the artifacts by using texture2DLod() instead. Just give a good value to the "lod" parameter by trying a value of 0. first then bigger values. It could be computed as function of the zoom factor.

IIRC, float textures (which are used for hdr) don't support mipmapping. Right? That should be the reason why there is no artifacts when using hdr format.

Very nice video BTW!

Excellent catch, Knighty! I really couldn't figure out why this didn't work.

Now, I think float textures do support mip mapping, but since I handle HDR textures myself (Qt handles png and jpg textures), I actually explictly disables mip maps in the HDR texture setup (because I never got it to work when they were enabled!).

Fragmentarium has support for setting texture parameters, so the easiest way to fix this is by adding the following line after the texture definitions:

Code:
uniform sampler2D texture; file[Ditch-River_2k.hdr]
....
#TexParameter texture GL_TEXTURE_MIN_FILTER GL_LINEAR

Logged
Pages: [1] 2   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
having fun with fragmentarium Images Showcase (Rate My Fractal) ker2x 5 2392 Last post January 14, 2012, 12:26:39 PM
by ker2x
Fragmentarium 0.9.1 Released Fragmentarium « 1 2 » Syntopia 19 4826 Last post June 10, 2012, 10:27:46 AM
by Syntopia
Help in Fragmentarium Fragmentarium Tim Emit 2 978 Last post January 15, 2013, 10:05:24 PM
by Tim Emit
.obj output from Fragmentarium Help & Support 5yF0Rc3 7 1260 Last post April 24, 2013, 10:41:35 PM
by Sockratease
Fragmentarium programming Fragmentarium JosLeys 5 2094 Last post May 26, 2013, 09:30:49 PM
by knighty

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.249 seconds with 25 queries. (Pretty URLs adds 0.015s, 2q)