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

Submitted by Chan Ka Ming, posted on March 15, 2001

Image Description, by Chan Ka Ming

It is a screenshot from the map editor of my 3D Engine, ming3D. The engine use Direct3D7 and is still under development. I have just finished the static light and shadow calculating part. The white cross is the light source and you can see the shadows on the floor and the wall.

Here are the features I would like to add to my engine:
  • Octree or Leafy BSP and PVS rendering
  • Dynamic lighting
  • Midmapping
  • 3D Object picking
  • Finally, thank you very much to Tobias Johansson for his excellent lightmap tutorial on

    Chan Ka Ming

    Image of the Day Gallery


    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.
    Tobias Johansson

    March 15, 2001, 12:27 PM

    Looks very nice BTW.



    March 15, 2001, 12:29 PM

    Nice. Like the way it looks, looks like a decent radiosity render. Are you?
    Is this a source available project?


    March 15, 2001, 12:51 PM

    Nice !

    Oh, and it doesn't look like radiosity, not even a tiny bit ;-)

    Is the shadow calculation realtime, or at least a few updates per second ?



    March 15, 2001, 12:58 PM

    Nice, i think this is better than radiosity
    BTW, can you also generate the PVS with octrees used?


    March 15, 2001, 01:27 PM

    Smart. Nice stuff mate. The shadows almost look like they were generated from an extended lightsource.

    Octree or Leafy BSP and PVS rendering

    Can you explain me why you have chosen for this particular spatial organization scheme and cluster-to-cluster visibility?

    I am only asking this because it seems that most hobby engines use this scheme, and I am suspecting the usual reply, which basically boils down to the answer: "well, Quake..." :)


    March 15, 2001, 01:29 PM

    I especially like the not-at-all-common crates :)
    Still: Cheers.


    March 15, 2001, 04:38 PM

    Good job, any chance of us downloading the Editor? I've been working on a game engine but lack the insentive to make myself a *real* level editor. My current level editor is Notepad.exe, and it doesn't have support for pointing and clicking :). It also doesn't do anything that I need it to do except save. Anyways, keep up the good work.



    March 15, 2001, 05:13 PM

    I wonder what midmapping is.......

    Great pic by the way :)


    March 15, 2001, 05:32 PM

    Looks very nice! How do you edit levels here? :-)

    Btw, you are invited to my party for postnig an IOTD like that... bring the midmapping, we'll have a cool time :)



    March 15, 2001, 05:53 PM

    I am surrounded by idiots

    have a good party ;-)


    March 15, 2001, 09:25 PM

    Reminds me of the Unreal Tournament Engine (at least a part of it!) Those japanese or chinese symbols are also awesome :)
    I wonder how you can actually really read those...

    keep up the good "fun" (I won't say "work")

    Lion V

    March 15, 2001, 10:43 PM

    I was making a UT level today....
    It actually looks alot like UTs level editor- which is a good thing. :-) It uses raytracing for illumination.
    Now you need colored lighting, texture transparency, and texture illumination.
    Nice crate textures.


    March 15, 2001, 11:28 PM

    Now that looks cool. That's a very impressive shadow effect. Soft, accurate, and both on floors and walls. Beamtrees?


    March 16, 2001, 01:25 AM

    No doubt he speaks/reads the language... because that is what he is. It's not too strange of an idea for one to grasp.


    March 16, 2001, 03:47 AM

    That's Kanji, both the Japanese and Chinese use them but the Chinese use more of them as Japanese also has phonetic letters. Too small and complex for me to read anyway :)
    Great shot by the way.. must code a light mapping thingy one of these days, before it goes out of fashion :)



    March 16, 2001, 04:59 AM

    looks very nice.
    your lightmap seems to be very precise!
    What are their size?



    March 16, 2001, 10:56 AM

    Very cool. I am going to my engine built one of these days. How long did it take you to make your engine and subsequently your level editor?


    March 16, 2001, 04:06 PM

    I am slowly building a level editor and have I have to say that it looks ver simple to the UT editor (which I am basing it on!) Well what I do is draw flat blue grid and have a wireframe cube follow you, yor really have to see it! However my grid is a lot more advanced; you can change it's color, spacing and height(which is useful for working at different levels. Today was the first day that I realised that may be sometime this editor will actually be finished and quite good :). I haven't even thought about lighting, yours seems a little bright (maybe I am suffering from quake/unreal fever). Actually it seems that the ambient it bright, the lighting doesn't make things much brighter and the shadows are too dark. Maybe it is becuase everything is normaly as dark as the shadow but the light is very, very bright, or it could just be becuase it is a scrren shot. Well it looks very good anyway, well done.


    March 16, 2001, 06:54 PM

    I like the screenshot, it's nice. I'm really starting out with writing graphics engines and using 3d APIs in this way, so it's nice to see other people applying the things that I'm reading about.

    I do however have a gripe about one of the posts... The comment - 'i think this is better than radiosity'. I may not be very familiar with writing engines, but I do a lot of work in proffesional 3d packages, rendering. Firstly, if you know much about radiosity, there isn't much in that scene that would be much different, and it certainly wouldn't be worse by adding realism and utility to the rendering toolkit.

    Here's what I see - a single point light source that emits light (apparently in all directions), usually called an Omni light in most packages. There's soft shadows which I expect are caused by blurring the shadow maps / light maps on the textures, and it seems there's also some ambient lighting (since the shadows aren't pitch black, and there's only one lightsource).

    How would having radiosity change the picture?
    Obviously it depends on your exact implementation (and lighting equations etc) as well as if you maintain the same lighting scheme. Basically what radiosity does is treat all objects as light sources, so that they can be emissive (glow by themselves) and reflect light into areas that wouldn't normally have any. Radiosity might not make much difference in this scene because of the subdued colours - as an artist you'd probably either maintain the ambient light or increase the number of light sources around. Ambient light is basically one of the biggest and cheapest ways to immitate radiosity, which is much more computationally expensive and difficult to implement - in this case since you're preprocessing on to textures, you only stand to gain the fidelity of Radiosity, not lose many cycles. Where you'd benefit though is ever so slightly more realistic lighting, but a big difference when you had vibrant colours that would reflect onto the enviroment around them.

    So no, I don't think you can say radiosity would be worse because it can easily incorporate any effect you see there. If it's actually worth implementing is another thing.

    Sorry for the rant, but please be a little more accurate with statements like that, or you don't really provide much of a compliment by adding them.

    Still, nice work to the author.


    March 16, 2001, 07:43 PM

    Well, q2 vs q3, a radiosity based lighting model vs more of a directly raytraced one (with manually emmisive surfaces), the radiosity in q2 may have been more "realistic" but IMHO the over-reflected lighting just ended up making scenes looking washed out (what was up with the orange??) and lacking in vibrancy.

    As for the "Going out of Style", nah.. I don't think shadow volumes or projected shadow/light textures are going to negate the need for the lightmap technique any time soon... CPU's are being used to massage geometry data in different ways now, that they're not being tied down doing a massive stack of matrix tranforms. One of the more common new munchers of CPU time is silouhette generation, (motion blur, shadow volumes, edge glows & cartoon rendering) so I don't think it'll be too long before we see it being used for other things like procedural textures and meshes, and maybe (just maybe) dynamically calculating these lightmaps.

    Anyhow - back to the here and now - Great IOTD, I like the soft edges on the shadows :) Are they from oversampling your lightmap texture or just a post process blur?


    March 16, 2001, 07:55 PM

    what is a w-buffer?

    Timothy Barnes

    March 16, 2001, 08:12 PM

    W-buffer is like a z-buffer, but it is more accurate. Most cards now have w-buffers and they are much prettier looking...

    also, I notice you have a link to my site on your site. :)


    March 16, 2001, 08:14 PM

    It serves the same purpose as a z-buffer, but the values contain w, which is equal to 1/z, in the buffer


    March 16, 2001, 08:46 PM

    Don't confuse how good the tool is with how well it was used ;)

    Jukka Liimatta

    March 17, 2001, 03:03 AM

    Excuse me, but I just had to correct this ... w-buffer does *NOT* store 1/z, it stores 1/w.

    [x y z 1] * 4x4 matrix results in [x y z w] -- when w-buffering is done, the z can actually be discarded ( tried any glide programming back in the nineties? ;-)

    Arne Rosenfeldt

    March 17, 2001, 11:39 AM

    You are a bit lost in the formalism, aren't you?

    Chan Ka Ming

    March 18, 2001, 08:19 PM

    After I have finished the web site of my 3D Engine, the map editor will averiable for download with source


    March 18, 2001, 08:29 PM

    Actually, it stores 1/z in a floating point format - the difference is the non-linear storage format which enables uniform precision all the way along.

    See Gary T.'s articles on the Reverends Pulpit. And seems he came up with the idea, he knows better than you. :)

    Chan Ka Ming

    March 18, 2001, 08:50 PM

    After I finish my engine I will release the source

    Marc Hernandez

    March 19, 2001, 04:24 AM

    Why not use quark or an editor like that and simply use the brush info?

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