Large images

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
momo
Posts: 53
Joined: Tue Jul 19, 2005 5:08 am

Large images

Post by momo »

I'm having problems while rendering large images, i'm not getting the same result i get on 500x500.

See this code:

Code: Select all

startshape START

rule START { BRANCH { r 90 hue 50 b 0.5 sat 0.8} }

rule NODE {
	CIRCLE { }
	CIRCLE { s 0.9 b 1 sat -1 alpha 1}
	CIRCLE { s 0.5 }
	SQUARE { s 0.9 0.1 }
	SQUARE { s 0.9 0.1 r 90}
	CIRCLE { s 0.3 b 1 sat -1 alpha 1}
	CIRCLE { s 0.2 }
}

rule NODE 0.5 { CIRCLE { } }

rule BRANCH {
	SQUARE { y 0.7 s 0.1 0.7 }
	SQUARE { y -0.7 s 0.1 0.7 }
	NODE {  }
	BRANCH { y -1 s 0.715 r -90 b 0.07 alpha -0.08}
	BRANCH { y 1 s 0.715 r 90 b 0.07 alpha -0.08}
}
It renders nice at 500x500 but when i render to a large image, say 1000x1000 i don't get the same result and i need to set the NODE size to 0.5 or less, and i have to change the SQUARE's size too to make it look as i want.

I always render using the default 500x500 and when i'm done i render it to a large image, but i'm having this problem with diferent cfgd files.

How do you work with large images? I thought i would get the same results rendering at diferent image sizes, i think i'm not understanding the way context free renders large images. Should i work on my files rendering always using the wanted size, say 1000x1000 or more? Is this a bug on the context free code?

I tryed to render lagroue's The Age of the machines, which is very similar to the code i posted, and i always get the same results on diferent image sizes, it doesn't make any difference rendering the files to 500x500 or 1000x1000, so there should be something wrong in my code, but don't know what.

aqua_scummm
Posts: 17
Joined: Sat Jun 11, 2005 5:44 am
Location: Redwood City, CA
Contact:

Post by aqua_scummm »

Besides the fact that youre randomizing NODE, and it will look differently based on which 3 characters are at the top of the window...

CDFG iterates until its making points so small you cannot see them.

My guess is that because youre rendering larger, objects start larger, and thus CDFG can go through more iterations to the point where it gets too small. All these tiny iterations are adding up to change your result. I did 2 quick renderings, 500 and 1400 squares. I didnt see too much difference, what is it exactly youre looking at.

Also, the extra iterations allow your colors to change more

momo
Posts: 53
Joined: Tue Jul 19, 2005 5:08 am

Post by momo »

Rendering at 1000x1000 displays a white image, i thought i was running out of virtual memory but resizing the NODE to s 0.5 makes the image render nice, but then i need to resize all shapes to make it look as i want.

If then i render a larger one, 2000x2000 or so, i have the same problem again. I get a white image and i need to make NODE size smaller.

So, did you get the same result rendering at different image sizes? I'm using the Linux version, i will try to render this file on a windows box and see what happens.

I uploaded the images, Take a look

aqua_scummm
Posts: 17
Joined: Sat Jun 11, 2005 5:44 am
Location: Redwood City, CA
Contact:

Post by aqua_scummm »

i was using os x. actually, it was white for a looooong time, then i stopped the render and it showed it almost exactly the same. are you letting it render all the way through?

momo
Posts: 53
Joined: Tue Jul 19, 2005 5:08 am

Post by momo »

Ok, i've been looking into it again.

I stoped the render with the -m option which limits the number of shapes to render. I can render up to 1500000 shapes using size 800x800 and the image looks nice but uncomplet, but when i try to render more shapes it starts saving shapes to temp files and i get that white image.

I'm running out of memory? is this a bug? i don't know whats going on with this one. Is there any way to fix it?

momo
Posts: 53
Joined: Tue Jul 19, 2005 5:08 am

Post by momo »

i've been looking into this and i've the same problem with different designs. I think i'm running out of memory.

This is the same i posted some time ago here

momo
Posts: 53
Joined: Tue Jul 19, 2005 5:08 am

Post by momo »

As i said before i'm having this problem with different cfdg files. Today was trying to render a bigger version of my pink blossom design and this is what i got at 1000x1000.

Image

I don't know if this is a memory problem, shouldn't 512Mb be enough for rendering this image?

Looking into it i saw it happens always when cfdg saves shapes to temp files while generating the image. Sometimes i get an image without shapes rendered on it and sometimes i get this kind of strange images.

Note: Looking some older posts in the forums i discovered this post from joe that fixed this bug.

I added that extra X to the code and recompiled cfdg, now i can render big images. It seems that this bug fix wasn't added to the main code.

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Post by MtnViewJohn »

Oops. I will get this into the next release. I'm thinking of finally tackling animation.

Post Reply