Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Oh skysphere... where are you????

Author
Message
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 12th May 2008 01:43
No matter how hard I try, where I place it... How many existance checks I do... I can never ever SEE a sky sphere I load...

WHY WON"T IT WORK????



In the posted code I check if the sphere exists and it is in the screen and both the time DGDK says YES, when my eyes and brain say the contrary... AM I GOING MAD???

~~It's not who you are underneath, but what you do that defines you.~~
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 12th May 2008 01:54
In DBPro it works best with a sphere made with the built in commands, and if you specify a negative size (or scale it in the negative direction) it turns it inside out so your texture will show on the inside.

Also make sure your camera range is set far enough to see the sphere.

I think those two things are your current problem. Any texture there might be is showing on the outside of the sphere, and your camera range might be set to low.

Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 12th May 2008 02:03 Edited at: 12th May 2008 02:04
But I want to be on the inside of it... Oh whatever, there's enough sky"boxes" to go around I'll just us eone of those until if I rEALLY for some resaon need a skysphere...

THX for the reply anyhow...

~~It's not who you are underneath, but what you do that defines you.~~
JulesD
19
Years of Service
User Offline
Joined: 7th Feb 2005
Location:
Posted: 12th May 2008 04:31 Edited at: 12th May 2008 04:36
Like KISTech says the sphere needs to be inverted,if your using a 3d program to create your sphere, usually going to the sphere scale or size option, then put a "-" in front of the x,y, and z size should work.This a will allow you to texture the inside of the sphere.Do a search at the bottom for "SkyView". It's a little program I work on once in a while.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th May 2008 05:32
You post ss.x and the texture... or a texture.. so we can tell you definitialy your problem if its not the culling bit (Set object cull off solves - cheap but effective) you might still have a scalling issue with scale * 5000... in one app I had a skybox scaled * 70000!!!!!

Don't give! this isn't a bug... well... a flea anyways.. not a tarantula.

jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 12th May 2008 05:59 Edited at: 12th May 2008 06:11
The inverted DBO sphere is FAR better than using a model in my experience. I think you are still experiencing some troubles with paths, and not something else.

First, about the DBO sphere method. If you make a sphere, and like the others have said, scale it with a negative x, y and z value...you will be inside the sphere. I have a really nice one going that has an accurate star field, a sun, a moon, etc. (I'm working on clouds and weather, too.) You can rotate it to simulate the proper latitude, and then rotate it to simulate the earth's rotation. Better than using a box by a mile!

I think you would be better off checking that your function calls worked as close to where they exist as possible. Use MessageBox with a NULL handle to tell you immediately what the status is, rather than wait until the loop to do so.

You can start by verifying that you are in the directory that you think you are in. Try verifying if the file you want to load exists. You can use the checklist for this, or Windows has its own very capable and handy file and directory management functions.

The resaon I'm going on about this is that...you are going to need to do it eventually anyway and the functions you are using work, but they don't always tell you when they don't. There are plenty of GDK functions to verify, however. You could call dbObjectExist immediately after the load, for example. Then use MessageBox for yes or no, without even needing a buffer, just use a literal string.
e.g.
MessageBox(NULL, "It didn't load.", "MyGame", MB_OK);
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 12th May 2008 06:44 Edited at: 12th May 2008 06:47
OK... I attached the Skybox...err... sphere... (It's straight out of darkmatter model pack BTW...)...
Can someone try an dsee if they can get it to work... I could go ahead and try to texture my own sphere but I dunno how I'll do it...

~~It's not who you are underneath, but what you do that defines you.~~

Attachments

Login to view attachments
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 12th May 2008 07:49 Edited at: 12th May 2008 07:50
We all already have that, unless you modified it...plus, I'm not sure that posting DM models is exactly right from a legal standpoint, but...idunno.

I think that it is just a few more steps than you want to take at this point. I'm the same way. If I was able to, I'd code it up, and post it in C++ because I like it that much. Here is a DBPro version of the inverted sphere to get you started:

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th May 2008 07:58
Good stuff JinZai... I PERSONALLY might go that route.. I've been playing with "dome" and Sphere's... I have so many cool boxes though... I'd like to have a system that allows interchanging them... though I like the spheres for getting that "bigger" look!

Code2uu is actually having a scaling issue here. Here's a snip - the majic answer is scale 10 or 20 or whatevet.. but I made simple little key 1 and key 2 experiment keys to find it... I even think scaling to a negative value will flip the poly normal like the inverted sphere you made from scratch.



Best Regards,
Jason P Sage

(Time for bed... been coding like a banshee myself.... I think DarkGDK has messy user input now that I've really been hitting it... I mean keystate is great for w,a,s,d... but trying to get key combo's... like SHIFT+TAB... then follow that with checking for "END" key.. things seem arye... Jury still out.

Ugh. I Digress, I'm tired... tomorrow is monday... ugh.. Good Luck Code2uu, Night guys! See ya JinZai

Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 12th May 2008 08:12
WOWSA! Why can't TGC just follow one scale, instead of OVERSIZING one thing and undersizing the other... Oh well, thanks a bunch... It works...

~~It's not who you are underneath, but what you do that defines you.~~
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 12th May 2008 08:40
Spheres have no corners, that is what you will like the most about them. Then, when you are ready to do night/day cycles, you'll pat yourself on the back so much, you'll throw your shoulder out.

About scale...it is a key part of the overall process, and it really depends on alot of other things...like everything, for example.
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 12th May 2008 12:45
How to put in light? I have a skydome (jason, its from your OOP) thats very dark?

Niels Henriksen
www.tales-of-the-realms.com
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th May 2008 14:31
Niels... Look in jgc_sky.cpp, I have these small classes that load and set up a couple different skys ATM... Here is a snippet from the Dome one:



The reason for the messing about... was so I could get the decent uv scroll working. I think I needed to scroll the limb texture - so it had to be a limb. I know that particular DOME model has the poly normals facing out so I turn culling off.

Does this help?

Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 12th May 2008 17:27
jason - I have been reading your code (nice work) and here is my code




But its still very dark

Niels Henriksen
www.tales-of-the-realms.com
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th May 2008 18:29
Here Bro!



Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 12th May 2008 20:48
jason - You are a genious..... thanks

Niels Henriksen
www.tales-of-the-realms.com
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 13th May 2008 02:27
Quote: "Spheres have no corners, that is what you will like the most about them. Then, when you are ready to do night/day cycles, you'll pat yourself on the back so much, you'll throw your shoulder out."


That is why I do like spheres... Boxes are just too... umm... oh I dunno... "boxy" ... It takes one step of having to hide the seams away... And spheres just seem so right for a sky too...

~~It's not who you are underneath, but what you do that defines you.~~
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 13th May 2008 04:08 Edited at: 13th May 2008 04:28
The main issue I have with boxes is that on my hardware, it "tears". Its difficult to describe, but you'll know it when you see it. I think what is going on is that the rendering and the sync of the monitor are colliding, and you are getting most of the final output, but not all of it. (Usually, tearing on my system occurs at the sides.)

That's why I use VSYNC, and also why I use spheres, and try to eliminate having the seam between my terrain and the sphere visible...ever. (Also, my sphere is much larger than the terrain...you could go to the edge of the terrain, and jump off if that was your wont.)

Here is a number that will be useful to you when implementing day/night cycles using spheres:
#define ROTATION_EARTH 0.0041666666666666666666666666666667

Certainly, you don't need, and can't really use that much precision, I just use Calculator, and copy paste, so....

That is the Earth's angular displacement per second in degrees. (i.e. The amount of yrotate to add to the yangle per second.)

Don't forget to tilt the sphere to the correct angle of Earth, taking into account the latitude of the viewer. (Unless you don't give a RA, but your texture will just rotate around the horizon like the sun does in late summer in the Arctic Circle. Yes, I'm a BlueNose for those that know what that is.)
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 13th May 2008 05:25
Thanks for all the info Jinzai... I'll keep that in mind... And if I forget I'll search for this thread again...

~~It's not who you are underneath, but what you do that defines you.~~

Login to post a reply

Server time is: 2024-09-29 19:25:19
Your offset time is: 2024-09-29 19:25:19