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.

DarkBASIC Professional Discussion / Object not appearing when camera created

Author
Message
CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 4th Feb 2011 00:30
Hello World,

I have a cube, textured in blender using 2 textures, 1 on top, and 4 on the other sides. The file is saved to the desktop exported as a .x file.
When I dont make a camera at all, the background is black but i can see my object fine, and perfectly textured.
When I add a camera, no matter where i position it, the object doesnt appear (or appears really far away) and the background is green no matter how i color it. whats wrong??



Always program as if the person maintaining your program is a psychopath that knows where you live
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 4th Feb 2011 00:53
Why are you using camera 1? Camera 0 already exists

Yodaman Jer
User Banned
Posted: 4th Feb 2011 00:59
This just happened to me too.

I've never had a problem with it before, and suddenly whenever I create another camera, I can't see the object in its viewport. Which is REALLY weird because it used to work just fine.

Sorry that I can't help you CocaCola. I've been trying to find a solution to it and there doesn't seem to be one. What version of Windows are you using?

CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 4th Feb 2011 01:31
I know that mad nightmare, i was using it, but i tried making a new one incase that was the problem.
And CoffeeCoder, is it working for you now?

Always program as if the person maintaining your program is a psychopath that knows where you live
Sixty Squares
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 4th Feb 2011 02:44
That's odd; your code works for me when I use MAKE OBJECT SPHERE or load Miko.x (a model that comes with DBPro).

As for the background problem, it is possible to specify a camera number in the COLOR BACKDROP command. So if you put your COLOR BACKDROP after the second camera is created and set the optional camera number parameter to 1, then your backdrop should be colored properly on camera 1.


Guns, cinematics, stealth, items and more!
CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 4th Feb 2011 03:01
Very wierd, after specifying the camera in the color backdrop it works.. thanks!


Always program as if the person maintaining your program is a psychopath that knows where you live
Yodaman Jer
User Banned
Posted: 4th Feb 2011 04:41
It kind of works for me. I've discovered it seems to be related to the Set Camera View (CamNum) command...odd.

Screen shot of non-working program:


Working screen shot:


My setup routine code:


Still have no idea why it doesn't work.

CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 5th Feb 2011 00:10
CoffeeCoder, add the "backdrop on" just to make sure.

Always program as if the person maintaining your program is a psychopath that knows where you live
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 5th Feb 2011 00:13
I apologize, I misunderstood the problem.

Yodaman Jer
User Banned
Posted: 6th Feb 2011 22:39
@CocaCola:

That didn't work. I am totally stumped.

Another odd thing is that it seems to be on this project only, not any other ones. So maybe it's a setting somewhere?

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Feb 2011 18:23
It sounds to me like you can see the object with camera 0 due to autocam, but can't see it in camera 1 because that's created afterwards.

Also, you need to make sure that your camera screen coordinates don't overlap, or you may get some strange results.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 7th Feb 2011 19:48
CocaCola + CoffeeCoder

Is this what you intended?



Camera 0 is a long way away from the object - reduce it's y coordinate to make it closer.
Yodaman Jer
User Banned
Posted: 8th Feb 2011 00:09 Edited at: 8th Feb 2011 00:20
Thanks Green Gandalf, that worked! I can see everything perfectly!

I totally forgot about the "autocam off" command. That should have been my first thought.

Oh, and the camera is far away from the object because I need a "level map" and had to position it far away enough to show a decent amount of objects.

Login to post a reply

Server time is: 2026-07-16 04:36:33
Your offset time is: 2026-07-16 04:36:33