|
tweakbox
|
 |
« on: April 26, 2006, 07:07:46 PM » |
|
I got bored this morning at work and decided to start from scratch to get Zak's HLSL sky shader demo running in VB.NET. I've gotten 4 or so PM's about people asking if I had this done yet, and I hadn't really even been working on it. But anyway, here it is. I realized that before I was going about it all the wrong way, trying to convert Zak's entire project over from C# to VB.NET, and that was a dumb idea. So, what I basically did here was wrap the sky math class into a dll, just leaving it C# exactly how Zak had it, except for switching all of the xyY stuff to xyE stuff since VB has a fit about y and Y being the samething (don't ask why I chose E, I really don't know  ) Then I just took the sky class and did essentially a line by line conversion from C# to VB.NET. I also tossed in a few of the other things that were needed for it to work that were in other classes. It's just a plain example. The idea was to just get the workings of the sky stuff in a running VB.NET project. It's up to you to dig through it now and make it work for you  So, without further delay, here's the download. You will need the latest managed dll as well as the directx 29 library. Everything else should be there for you. The media is in the debug directory. If you have any problems with it, go bug Zak :twisted: http://www.ashenbrook.com/VB.NET HLSL Sky Shader.rarEDIT: There seems to be something wrong with the forum's URL tag. It doesn't work :?
|
|
|
|
|
Logged
|
I want to make a puzzle with like 40,000 pieces, and when it's done, it says "Go Outside"
|
|
|
|
|
|
tweakbox
|
 |
« Reply #2 on: April 26, 2006, 08:39:36 PM » |
|
Oh, oh well :lol: At least it still works either way, just with a little extra effort the first way.
|
|
|
|
|
Logged
|
I want to make a puzzle with like 40,000 pieces, and when it's done, it says "Go Outside"
|
|
|
|
Zaknafein
|
 |
« Reply #3 on: April 26, 2006, 09:32:42 PM » |
|
Nice work!! Thanks for making that, and sharing it...! It's funny really, because someone emailed me saying that's he'll make ports of most of my C# demos to VB.Net, and send them to me in a week or so... I'll keep you informed, but in the meantime this is a great conversion 
|
|
|
|
|
Logged
|
|
|
|
|
tweakbox
|
 |
« Reply #4 on: April 27, 2006, 07:02:55 AM » |
|
Nice work!! Thanks for making that, and sharing it...! It's funny really, because someone emailed me saying that's he'll make ports of most of my C# demos to VB.Net, and send them to me in a week or so... I'll keep you informed, but in the meantime this is a great conversion  No problem  And at least now that I have a pretty decent understanding of what the heck all is going on, I can mess with it some more and see what kinds of pretty things I can come up with!
|
|
|
|
|
Logged
|
I want to make a puzzle with like 40,000 pieces, and when it's done, it says "Go Outside"
|
|
|
|
Taneas
|
 |
« Reply #5 on: April 28, 2006, 01:54:07 AM » |
|
Woot You rock tweak 
|
|
|
|
|
Logged
|
|
|
|
|
Taneas
|
 |
« Reply #6 on: April 28, 2006, 04:36:46 AM » |
|
took awhile for me to remove zak's old sky stuff from my game and put in this new one  Just got it somewhat working, The sun/moon billboard arent working  .. and I get a CRAPLOAD of 04-28-3906 05:34:36 | MATERIAL MANAGER : Couldn't find the material 's' in the material list 04-28-3906 05:34:36 | MATERIAL MANAGER : Couldn't find the material 's' in the material list It was doing that before, but only twice. Now it does it like 50 times *Edit* Oh ya, and it doesnt render my shadows anymore 
|
|
|
|
|
Logged
|
|
|
|
|
tweakbox
|
 |
« Reply #7 on: April 28, 2006, 07:06:56 AM » |
|
Well, on the machine I tested it with, Zak's original demo gave those material 's' not found errors too. I know the sun and moon are not working, but I don't really know why right now  I really don't have a clue what the material 's' things are about anyway, because to the best of my knowledge, I never created nor requested any material s in that demo. As far as shadows not working, well, you've got me there as well :lol:
|
|
|
|
|
Logged
|
I want to make a puzzle with like 40,000 pieces, and when it's done, it says "Go Outside"
|
|
|
|
|
|
Taneas
|
 |
« Reply #9 on: April 28, 2006, 05:04:50 PM » |
|
I got the moon billboard to render by removing the clouds and the skymesh from the render loop....
weird...
|
|
|
|
|
Logged
|
|
|
|
|
tweakbox
|
 |
« Reply #10 on: April 28, 2006, 05:41:42 PM » |
|
actually, that would make sense. By having the sky re-rendered in the main render loop, it probably over-wrote what happened inside the sky's render function.
But yea, I don't know what could have hapened to your shadows. Maybe you did something with the view scene's frustum when you changed things over?
|
|
|
|
|
Logged
|
I want to make a puzzle with like 40,000 pieces, and when it's done, it says "Go Outside"
|
|
|
|
Taneas
|
 |
« Reply #11 on: April 29, 2006, 06:50:19 PM » |
|
I got shadows to work again..
But they only work at night.. (weird)...
Now,
04-28-3906 23:00:10 | MATERIAL MANAGER : Couldn't find the material 's' in the material list
Shows up like 20 times a second in the debug.log file...
It spams the hell out of it, so i had to disable the engine log....
Any idea what it could be?
|
|
|
|
|
Logged
|
|
|
|
|
Zaknafein
|
 |
« Reply #12 on: April 29, 2006, 10:50:05 PM » |
|
Don't mind the 's', it's probably some material getting/setting that tweakbox left in his code from the conversion, and which doesn't have its place.
|
|
|
|
|
Logged
|
|
|
|
|
darqSHADOW
|
 |
« Reply #13 on: April 29, 2006, 11:29:11 PM » |
|
It looks to me like we missed a % in the debug call, as well.  It should be printing the material name. DS
|
|
|
|
|
Logged
|
TrueVision3D Project Manager The fast and simple way of 3D development.
|
|
|
|
SylvainTV
|
 |
« Reply #14 on: April 30, 2006, 04:33:41 AM » |
|
Actullly no the % isn't missing but...
AddLog("MATERIAL MANAGER : Couldn't find the material 's%' in the material list", cMaterialName);
|
|
|
|
|
Logged
|
|
|
|
|
Taneas
|
 |
« Reply #15 on: April 30, 2006, 04:11:25 PM » |
|
Don't mind the 's', it's probably some material getting/setting that tweakbox left in his code from the conversion, and which doesn't have its place. I cant just not mind it lol. Cause if i turn on the debug.txt file, all it is , is spam of that cant find material s thing... and it lags the hell out of the game client cause it adds it several hundred times a second. It was in the original sky demo too... both vb and vb.net
|
|
|
|
|
Logged
|
|
|
|
|
Taneas
|
 |
« Reply #16 on: May 09, 2006, 01:15:59 AM » |
|
well.. least that was solved with the new dll  Now, If only shadows could work correctly..... firstly, the lights in this dont seem to want to cast shadows off foamys rancor... but it casts off everything else.. Also the shadows only work at night... lol...
|
|
|
|
|
Logged
|
|
|
|
|
Taneas
|
 |
« Reply #17 on: May 09, 2006, 01:55:17 AM » |
|
Ok Update... Got the shadows to work during all times now, This: Lights.EnableLight(number, color.a! = 0.0F); Is supposed to be this: Lights.EnableLight(number, True) So now that that works, Theres a new issue  lol Heres a pic: http://img213.imageshack.us/my.php?image=wtflol0se.jpgCheck the area circled in red. I have no idea what that is and where its coming from. Its not there with the shadows at night, and ive never seen it before.[/url]
|
|
|
|
|
Logged
|
|
|
|
|
Zaknafein
|
 |
« Reply #18 on: May 09, 2006, 10:12:44 AM » |
|
|
|
|
|
|
Logged
|
|
|
|
|
Taneas
|
 |
« Reply #19 on: May 11, 2006, 01:50:58 AM » |
|
*edit*
had to change
Math.TVVec3Scale(moonPosition, moonPosition, -9000.0F)
to
Math.TVVec3Scale(moonPosition, moonPosition, -7000.0F)
|
|
|
|
|
Logged
|
|
|
|
|