Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Jari Komppa, posted on August 21, 2000




Image Description, by Jari Komppa



Here's a screenshot of my flipcode contest entry in hopes of getting other people to enter as well. The shadow algorithm is completely ad-hoc and almost works =) The 'mandatory' reflections were also added in in the form of small ponds.

When I read the competition description the first thing I could think of was one army memory of mine, with flare flying in otherwise pitch dark forest, and the shadows dancing..

I had some misgivings about giving away the source but then again, I'm not planning on reusing the code myself anyways, so why not..

Jari Komppa
solar@icon.fi
http://iki.fi/sol
icq 44620217


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
DooMWiz

August 21, 2000, 10:58 AM

Omg, it's entries like this that make me not enter contests. ;) It's quite beautiful...I love it. =]

 
The Wolf

August 21, 2000, 11:49 AM

very nice effect!!! would love to see it realtime

couple of questions:

did you use textures for the shadows? if how would you account for non flat surfaces? (I have'nt had much luck in that dept)

 
Jari Komppa

August 21, 2000, 12:09 PM

Since couple people have asked me already, I have to point out that you can download the entry already from flipcode:

http://www.flipcode.com/contest/August-September2000/

 
fluffy

August 21, 2000, 01:38 PM

Wolf: Those shadows all look like standard groundplane shadows to me. That said, you can use projected textures to get non-flat shadows, and stencil-based shadows will be implicitly non-flat as well. :)

--

Code. Music. fluffy.

 
ysaneya

August 21, 2000, 01:57 PM

The screenshot is nice but also..weird :) I don't know if it's wanted, but it looks like the trees are
standing on the water ( is it water, btw ? ). And also, it seems there is some color difference between
the trunk's shadows and leaves shadows..?

Y.

 
Max

August 21, 2000, 02:59 PM

"And also, it seems there is some color difference between the trunk's shadows and leaves shadows"

Trunks are typically thicker than leaves, so less light passes through a trunk and thus the shadow will be darker.

Max

 
beeeph

August 21, 2000, 05:06 PM

Damn! I wish I could code like you fools!

 
ktingle

August 21, 2000, 08:42 PM

Y do have misgivings about releasing the source code? R u embarassed of your coding style? I don't think that is a problem here at flipcode, pretty algos matter more than pretty code.

If your concern is that someone will steal your code and submit a demo based off that code then don't submit the code till the day of the contest... BTW I don't think the average flipcode reader is going to do that, this site is about learning after all.

 
Mace

August 22, 2000, 02:55 AM

Fear not dear Jari... because i will also enter the contest :)
The thought of winning a flipcode t-shirt has driven me to try
to do something special this time. I dont know if i have the skill
to make it the way i thought it would be, but i hope will finish something... fps killing. hehe.

Oh, and nice forest.
I hope my entry will turn out as cool as yours...
...just need that damn light-sources to stop acting funny.


-In theory, there is no difference between theory and practice. In practice, however, there is.

 
Jari Komppa

August 22, 2000, 02:57 AM

"Y do have misgivings about releasing the source code? R u embarassed of your coding style?"

Well. For the first bit, yes, I suffer from the common territorialism that causes most people not to give out source. As for the second bit, I hate it when people release nondocumented, unexplained, obscure source code and then call that a 'tutorial'.

 
zed zeek

August 22, 2000, 06:19 AM

as the ground is perfectly flat ill hazard a guess that the shadows are just the alpha channel of the tree sprite blended on top of the ground its what i done here http://members.xoom.com/myBollux (though come to think of it the shadows might be wrong in it)

 
ysaneya

August 22, 2000, 07:03 AM

> Trunks are typically thicker than leaves, so less light passes through a trunk and
thus the shadow will be darker.

The conclusion is false. The shadow will not be darker, unless the leaves are more or less
transparent. Go outside and look at a true tree. You won't see any difference between the
trunk and the leaves shadows.

Y.

 
Michael Kurth

August 22, 2000, 10:44 AM

I can't help but chuckle at this:

> Trunks are typically thicker than leaves, so less light passes
> through a trunk and thus the shadow will be darker.

Ysaneya is absolutely right, the leaves shadow will be just as dark as the trunk shadow. You guys need to get out more! ;-)

-mike

 
Jari Komppa

August 22, 2000, 11:00 AM

Consider this; Each pixel on the texture contains more than couple dozen leaves. These leaves don't neccessarily block 100% of the light that hits the pixel.

 
ysaneya

August 22, 2000, 11:20 AM

The number of leaves shouldn't modify the color of the shadow. But if you suppose they are transparent, then ok. Yet, look at the screenshot: the trunk's shadow seems to be 50% darker than the leaves's. I don't think the leaves are 50% transparent, are they ?

Y.

 
Jari Komppa

August 22, 2000, 12:35 PM

You didn't get it.
Consider every pixel to be a paper with lots of holes in it.
Does the paper have to be transparent?

 
This thread contains 16 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.