Quick Search for:  in language:    
RUN,COLOR,MODE,VoxelSpace,demo,based,classica
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,011,557. lines
 Jobs: 115. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic.
CAPS Trigger
By Trevor Burley on 6/30


Auto clip picture
By Kenneth. Jakobsen on 6/30


Click here to see a screenshot of this code!Game of life clone (cool math)
By Johannes B on 6/30

(Screen Shot)

String to CHR()
By Nikhil Raj on 6/30


Encryption Decryption Demo
By Nikhil Raj on 6/30


Click here to see a screenshot of this code!Serial Registration
By Christian (eXonite Team) on 6/30

(Screen Shot)

Click here to see a screenshot of this code!Danger:Can pc kill me? interesting article
By Xasan on 6/30

(Screen Shot)

AniViewer
By Jerrame Hertz on 6/30


Click here to see a screenshot of this code!Raw Packet Sniffer
By Coding Genius on 6/30

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

VoxelSpace - Realtime 3D using Native VB

Print
Email
 
winzip icon
Submitted on: 4/19/2001 9:41:46 AM
By: Wolfgang Kienreich  
Level: Intermediate
User Rating: By 19 Users
Compatibility:VB 6.0

Users have accessed this code 11579 times.
 

(About the author)
 
     VoxelSpace is a 3D demo based on classical voxel rendering algorithms. VoxelSpace features 3D terrain rendering using 24bit depth, texture mapping, dynamic lighting, atmosphere effect, animated water, semitranslucent overlays and more. VoxelSpace has been developed in pure Visual Basic, though some external library calls to the win32 api have been un- avoidable. System Requirements: The faster your machine, the faster a framerate you will get. No OS restriction (works fine with NT), no libraries (forget DirectX, OpenGL or someone elses dlls). No display restrictions. Runs at 20+ fps on a P266. Note: Always evaluate the compiled executable, running the application from within the VisualBasic environment is too slow and guarantees frustration! Note: ALWAYS RUN IN 24bit OR 32bit COLOR MODE!

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzipto decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
3)Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 5 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
4/19/2001 10:13:12 AM:Mike Canejo
Now this is a good piece of work bro. 
Good job...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/19/2001 11:09:20 AM:Eric Tomlinson
This keeps crashing under NT 4.0 WS 
service pack 6.0a.  It crashes in the 
Render sub on the last line of code on 
the copy from memory.  It seems like a 
viable system but I do not know enough 
about graphics programming (yet <G>>.  
Please let me know what could possible 
be crashing this.  I am very interested 
in learning more.  Thanks
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/19/2001 11:16:42 AM:Almar Joling
Hehe, what a coincidence, I just 
started my own project yesterday, and 
downloaded tons of source code, about 
bilinear filtering and heightmapping, 
and now I see this?!
Thanks for 
sharing
Almar.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/19/2001 1:54:16 PM:Simon Price
That's amazing! NLS keeps coming out 
with the best stuff! These are the best 
graphics I've ever seen in pure VB 
code. Just to back up what you already 
said: everyone make sure you run in 24 
or 32 bit color, otherwise it looks 
very very different and starts writing 
into invalid memory as I found out the 
hard way...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/19/2001 2:25:59 PM:Almar Joling
On my Win2k it didn't start, until I 
changed from 16bit to 32bit... so I 
know what you mean =-)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/19/2001 6:05:26 PM:Elvir Bahtijaragic
Sorry mine says, Sub-script not found. 
Any thoughts?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/19/2001 6:44:24 PM:Derek
Great stuff
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/19/2001 8:53:16 PM:MarkS
I'm in the same boat as Eric re the 
crashing in NT 4 with SP6a.
Any 
ideas?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/20/2001 12:44:12 AM:Robert Rayment
Yes works fine (the subscript error is 
because not in 24 bit color), I've 
written some David Brebner stuff myself 
but you've managed to add some nice 
effects 5/5
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/20/2001 3:16:14 AM:NLS - Nonlinear Solutions
Hi there,
let me first thank you for 
the positive feedback. I felt that 
David Brebners original voxel code 
could use some updating, as modern 
machines can easily handle bigger 
viewport, full color depth and advanced 
effects. In addition, his code has been 
too close to C++ for my taste, this is 
not how VB is ment to be used, imho. 
Again, glad you like it.
For the 
color mode problems, I can only 
emphasise YOU HAVE TO USE MORE THAN 
16BIT COLORS. 16 bit mode would be next 
to impossible to handle, all the bit 
extractions necessary and the various 
subformats would take up much too much 
frametime. And remember, for the gfx 
card, 16 bit is actually slower than 24 
bit.
Have fun with 
VoxelSpace
Wolfgang Kienreich
NLS - 
Nonlinear Solutions
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/20/2001 3:26:47 AM:CodeChief
Runs nice on my machine, under NT. 
Could you make some solid objects 
appear in the scene?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/20/2001 6:38:07 AM:Hayati TASTAN
Very good job! Runs on Win2K w/SP-1.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/20/2001 8:43:28 AM:magic
When I started your program I got the 
following error message.
The 
instruction at "0x77f64d8a" reference 
memory at "0x043afffd".
The memory 
could not be "read".
I'm still new 
to VB.  Could you please 
advise?
magic1521@hotmail.com
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/20/2001 8:46:25 AM:Steve Henning
Great Code!!!!
For those of you 
getting a memory exception error, do 
the following.
Open the Forms code, 
goto the Render Sub.
Select & Cut 
the line:-
Dim L_bytDat() as 
Byte
Goto the top of the code, and 
paste the line below the Option 
Explicit
The reason why the program 
is crashing is that the L_bytDat if 
left in the Render sub has not be 
initialised, it is actually intialised 
in Form_Load, as to why the VB compiler 
is not complaing about it not being 
declared is a mystery as Option 
Explicit is there.
Save the file and 
run the program.
You may get an 
exception when exiting the program (by 
pressing ESC)
I compiled it and did 
not get any memory exceptions even when 
exiting, it also runs faster as an .exe
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/20/2001 8:46:39 AM:Mel Grubb II
It doesn't work for me at all.  I get a 
subscript out of range error on line 
151 of frmV.  Graphics settings don't 
seem to make any difference.  I'm 
running on NT4 sp6.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/20/2001 9:56:13 AM:Pooh
Excellent job!
5 Big ones from me as 
well!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/20/2001 11:15:55 AM:NLS - Nonlinear Solutions
Hi again!
Let me first ask those of 
you who have NT4 SP6 to search for the 
error ... obviously VoxelSpace is not 
working under this OS, and I cannot 
figure out why. Any help would be 
appreciated!
Second, let me note 
that the solution Steve Henning is 
offering above is not valid. The 
declaration of L_bytDat in FORM_MAIN is 
unnecessary, I just forgot to remove 
it. And L_bytDat doesnt have to be 
initialised in sub RENDER ... its 
filled by that array-points-to-memory 
trick, not by VB. Strange it made any 
difference for Steve.
Hope this 
helps,
Wolfgang Kienreich
NLS - 
Nonlinear Solutions
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/20/2001 1:12:45 PM:Mercior
This doesnt work in 32 bit color and 
for some reason my geforce aint giving 
me the option to use 24 bit color. any 
help?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/21/2001 7:38:51 AM:Mike Canejo
I got this to work and it is really 
great. Good job. Oh and for simon 
price, your directx 8 tutorial is very 
good! well, time to sleep ;]
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/21/2001 7:39:46 AM:Mike Canejo
reupdated my excellent vote ;]
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/22/2001 5:44:26 AM:Niall Mooney
Excellent GFX demo!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/23/2001 2:57:47 AM:Thushan Fernando
Non Linear Solutions always makes 
Awesome engines... Congrats.... YET 
AGAIN..!! Awesome!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/5/2001 10:01:31 PM:Terry Smith - Clarion Clipper and Visual Basic
Ok - it wont run in the ide with my NT 
sp 6 but it does run compiled when i 
set graphics up to truecolour... thanks 
for a fine bit o work
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/6/2001 3:56:05 AM:Xnipher
NLS, is the best when it comes to 3D 
Graphics Applications. The TrueVision3D 
is a no match to NLS. All of NLS Sample 
Codes is very easy to learn and 
actually works unlike the Samples of 
TrueVision which is definitely a 
non-working code and very complicated 
to learn. To NLS 5/5 Globes for you!!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/11/2001 6:08:05 AM:Alastair Vance
I get a "Subscript Out Of Range" on
' 
Translate into altitude
For L_lngIndex 
= 0 To UBound(I_bytAlt)
I_bytAlt(L_lngIndex) = 
L_bytTmp(L_lngIndex * 3)
Next
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/11/2001 6:10:24 AM:Alastair Vance
Forgot to mention, I'm using Windows 
2000 professional.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/23/2001 4:28:19 PM:Ryan
im running windows me and it doesn't 
work. got subscript out of range error
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/24/2001 9:38:51 AM:Phil
I think the problem with the NT4 O/S is 
because the program may be writing into 
areas reserved by NT4, so it depends on 
your NT4 setup. Works a beaut on '98 
2nd edition tho'.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/29/2001 3:26:35 PM:gridrun
yea dude. it wont work. subscript out 
of range while translating something 
into altitude data. its mentioned 
above.   *sup wif that dood???* =P
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/5/2001 3:40:22 AM:ADI BARDA
NO LESS THAN AMAZING!!! i program 
directx7 in c++ and i must tell your 
demo is just great! It works very good 
and the coding standard is very high. 
Cheers! adi barda israel
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/5/2001 7:13:28 AM:Coyote
Win 2K sp2 - VB6 sp5 - 32 bit Would not 
run for me. Crashed... HOWEVER- 
compiled it and it ran great..Until.. I 
noticed no way to end it except thru 
Task Manager.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/5/2001 9:05:28 PM:austin agarwal
it dont work under windows 2k sp2. It 
makes vb crash.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/22/2002 12:37:48 PM:Chad Bjorklund
Uhh, this is probably a bad idea but 
for those of you with the memory 
problems, if you want a quick glimpse 
of the program, just add "on error 
resume next" right above the line that 
contains the out of bounds error.  For 
me, the program ran a few seconds then 
vb went up in smoke but the little I 
saw was pretty cool.  Good luck.  
I 
wish I was as smart as NLS, then I 
would be cool
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/9/2002 11:41:47 PM:Akshay Peshave
I think Wolfgang is really a genius !
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.