Results 1 to 6 of 6

Thread: [VB6] Kyodai's Raytracer

  1. #1

    Join Date
    Dec 2011
    Posts
    15
    Thanks
    0
    Thanked 46 Times in 11 Posts


    Downloads
    0
    Uploads
    0
    Mentioned
    14 Post(s)
    Time Online
    4 h 6 m
    Avg. Time Online
    N/A
    Rep Power
    7

    [VB6] Kyodai's Raytracer

    I always wanted to have my own raytracer. Not as cool as 3D studio max or Maya, but still cool from a VB6 point of view i guess.

    The core is from VB Lover of VBFrance forums. He made the basic raytracing math and rendering engine, so most props go to him. Well i started making it more usable, adding material/Light/Objects editors, Image handling, file handling and so on. Some other parts from various sources in the internet.

    I kinda lost interest after it was half done, so the basics work, but for example the material editor shows existing materials but will not let you edit or add any. Same for the lights/objects editors, but at least the mat editor already does a neat rendered preview of the material. The texture projection for spheres is not really highly realistic, it's a classic projection instead of a classic mapping. The mathematical model for this could be overhauled. Also bump/texture settings should become a property of the material class, bump settings are global (yuck).

    Oh yeah and i wanted to add least add some half-asses animation scripting or at least a camera animation. Well never did it though.

    Also added a cute preview rendering function, menus, easier controls and a basic function to save the scene. I kinda stopped at the scene loading mechanism as first the fixed picturebox textures/bumps (hidden to end user, doh!) should be replaced by a neat file loader, file references in the class and so on before it really makes sense to finish the loader/saver. I made a basic save file model that is neat to base on as it's quite easy to load (HTML Tag style).

    SO that's left to do, also some cosmetic stuff like when you click render while it is still rendering it screws up and so on.

    What's really cool in here is the jpeg function which does NOT use a dll, so all JPEG compression/encoding stuff is done in pure VB6, try to find that elsewhere. Also it features common dialogues but doe not require the comdlg runtime references in windows as it's all made completely in VB6. Image postwork effects use GDI library, i always wanted to add some GDI-less effects but been to lazy to do so. Besides that it really doesn't have dependencies. I originally wanted to make a completely dependency free raytracer and completely in VB6. Maybe imma get to it later on again, but for the moment i got bored with it.

    I kinda wanna dedicate it to Joe so i won't post the source anywhere else.

    So enjoy and lemme know if you make any improvements to it. Oh and yay free picture of me as a texture, print out for your dart board!



    http://www.tankraider.com/userup/1342487796.zip

  2. The Following 2 Users Say Thank You to Kyodai For This Useful Post:

    DarkByte (07-17-2012),Infamous Joe (07-17-2012)

  3. #2
    Saiyan Race





    Infamous Joe's Avatar
    Join Date
    Dec 2011
    Gender
    Location
    Hyperbolic Time Chamber
    Age
    26
    Posts
    9,758
    Thanks
    2,780
    Thanked 16,245 Times in 4,239 Posts


    Downloads
    23
    Uploads
    36
    Mentioned
    2986 Post(s)
    Time Online
    293 d 23 h 59 m
    Avg. Time Online
    3 h 44 m
    Rep Power
    10
    Gamer IDs

    Gamertag: Infam0us Joe Steam ID: infamousjoe
    This is really interesting to look at. So much about working with images and whatnot, I really enjoy tracing these kinds of projects. Much props on this Kyodai!

  4. #3
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 35 m
    Avg. Time Online
    16 m
    Rep Power
    15
    Would be a ton nicer in VBNet (just my two cents)

  5. #4

    Join Date
    Dec 2011
    Posts
    15
    Thanks
    0
    Thanked 46 Times in 11 Posts


    Downloads
    0
    Uploads
    0
    Mentioned
    14 Post(s)
    Time Online
    4 h 6 m
    Avg. Time Online
    N/A
    Rep Power
    7
    Pfffff, vb.net. I wouldn't be surprised if there's a raytracing class in .net anyways. But feel free to port it if you're bored.

  6. The Following User Says Thank You to Kyodai For This Useful Post:

    DarkByte (07-17-2012)

  7. #5

    Join Date
    Dec 2011
    Posts
    15
    Thanks
    0
    Thanked 46 Times in 11 Posts


    Downloads
    0
    Uploads
    0
    Mentioned
    14 Post(s)
    Time Online
    4 h 6 m
    Avg. Time Online
    N/A
    Rep Power
    7
    Well it's a strict anti-.net project as the original challenge was to make it dependency free (hence the jpeg and comdlg classes). Still feel bad about adding the GDI effects option but they just looked so neat. I should kick these and add pure VB6 effects instead. I know .net is nice but this just ain't the challenge, adding a 100 MB (More or less depending on version of .net) framework to run a 2 MB app (including textures). And besides the JPEG and comdlg handling this would not have saved me much work i fear. Heck if i was a better programmer I'd rather make a 16-bit Win 3.0 app running in real mode.

  8. #6

    Join Date
    Dec 2011
    Posts
    15
    Thanks
    0
    Thanked 46 Times in 11 Posts


    Downloads
    0
    Uploads
    0
    Mentioned
    14 Post(s)
    Time Online
    4 h 6 m
    Avg. Time Online
    N/A
    Rep Power
    7
    I don't like just everything having the microsoft brand name but imho some stuff is quite good. I still like the original "rapid form development" approach in VB which does spoil a bit of the "art" of programming GUIs by hand but it admittedly shortens development of some less complex apps. I also think with Version 2 onwards .net became quite powerful, with 4+ you now have such a shitload of classes that work fine, you can basically just "click together" rather complex appz while not even attempting do make low level functions, api references or classes yourself. I also like the VB syntax style. If you're a kinda native c++/java developer you'll prolly never wanna touch anything that won't require a ; or { but I still consider the syntax one of the best object oriented ones because of the simplicity.

    The only reason why i won't use BasicForAndroid instead of eclipse is that it lacks mainstream support from google for obvious reasons. But yeah i guess while you can generally argue about my programming skills i think it's save to say that my java and c++ skills are exceptionally poor.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •