Re: questions about JKL/Spec items to CA/Alexei


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]

Posted by Alexei Novikov on January 15, 1998 at 15:09:10:

In Reply to: questions about JKL/Spec items to CA/Alexei posted by MadMax on January 15, 1998 at 11:39:58:

> I'm trying to parse a JKL file but having some slight dificulity in a couple
> of sections.

> First: The section of World Texture Vertices. What exactly are Texture Vertices?

Coordinates of the texture in texels (texture pixels) at this vertex.

> and what do the "u" and "v" texture coordinates mean?

U is horizontal coordinate, V is vertical. Say you have a square texture
64x64 and a square surface. To apply the texture to the surafce to fully cover
it with a single tile, you need to set the texture coordinates as follows:

vertex 0 - 0,0
vertex 1 - 64,0
vertex 2 - 64,64
vertex 3 - 0,64

> Second: In the World Materials section, what are the numbers after the MAT?

Ignore. Set them all to 1.

> Third: In general where you have "0.323440" or "-5.3342344" what datatype/range
> should be used for these numbers.

I use double.

> show sample data at "-5.200000". But in a sample level created by JED,
> I see numbers like "-0.009090909". And in the Texture Vertices section
> on the sample level, I'm seeing numbers like "-4.92E-16".
> Can you shed some light here?

Anything is acceptable as long as it's a valid textual representation of
floating point value.

> Fourth and last: In JED under the tools menu there is the option to Caculate
> Lighting. What is this actually doing to the JKL file? Is caculating light
> intensities from light in the level and filling in the "intensities" fields
> for the surface?

Yes.

> Could you reveal what algorithm you are using to do this?

Nothing fancy.

Clear all vertex intensities.
For each vertex and light:
If vertex is in range of the light
If no surface blocks the vertex from the light
Calculate the intensity of the light at the distance of the vertex
Add it to vertex's intensity

Alex.


Follow Ups:



Post a Followup

Name:
E-Mail:
Subject:
Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]