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 / Problem with Dynamic Cube Map

Author
Message
Diablo 3D
21
Years of Service
User Offline
Joined: 23rd May 2005
Location:
Posted: 11th Jul 2013 16:51
Hi guys

Got a problem with Dynamic Cube Maps. When I run this code:


I get this (see attached image).

I've removed all non-essential code from my game in order to make this run.

I've exported a sample from Dark Shader which has dynamic cube maps, and it works fine, but as soon as I copy the code into another program, it messes up...

Any ideas what's going on?

Self Destruction Computer Entertainment
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 12th Jul 2013 00:20
I believe its the same problem here too..

http://forum.thegamecreators.com/?m=forum_view&t=197929&b=1

https://soundcloud.com/toraktu
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 12th Jul 2013 02:26
This works - as in the Dark Shader example you thought you were using. Too late to elaborate now.

Diablo 3D
21
Years of Service
User Offline
Joined: 23rd May 2005
Location:
Posted: 12th Jul 2013 12:25
Hi Jack

I've read through that forum, but it doesn't address why I get that error message.

I've tried everything I can think of, even commenting out this line of code:



As soon as it tries to run this code, it crashes.

Self Destruction Computer Entertainment
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 12th Jul 2013 17:01
Could you post the code that works for you - there might be a clue there when we compare the two.

In the meantime you could try putting the following at the top of your code - it's needed by some Dark Shader commands whenever there's a screen mode change (and certain project settings seem to trigger that):



If I recall correctly you'll need that every time you use set display mode as well.
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 12th Jul 2013 17:28
I am starting to think its a problem with DBPro itself when it comes to that command "Dynamic Cube Map". Bug maybe ?

https://soundcloud.com/toraktu
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 12th Jul 2013 17:36
What's the problem exactly?
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 13th Jul 2013 16:00
Quote: "What's the problem exactly?"


The problem is that it crashes your program when you try to use that command. I myself have had this exact problem. I pointed out another link in an earlier post to explain that this is an unsolved problem.

https://soundcloud.com/toraktu
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Jul 2013 18:33
I saw that thread and wasn't sure what the problem was in this case. I need to see code. Could you be specific?

Quote: "The problem is that it crashes your program when you try to use that command."


Yes I know it crashes in some circumstances but as I said before it doesn't crash for me when it's used properly. So, as usual, code pleae.
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 13th Jul 2013 18:41 Edited at: 13th Jul 2013 18:55
Quote: "So, as usual, code pleae."


He has already posted the code.. Its in the first post of this thread.

https://soundcloud.com/toraktu
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Jul 2013 18:49
And I've already corrected it and as I implied before I need to see the whole project and he hasn't replied:

Quote: "(and certain project settings seem to trigger that):
"


Just get on with it and post a complete short project. Then we can make progress on this. Do I really have to spell out every little detail for a simple request such as this?
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 13th Jul 2013 18:56 Edited at: 13th Jul 2013 18:58
The problem here is there is no information on this command. And I see in your code you change from a 1 to a -1 like so :



But what is that ? Where can I see full documentation on this. There is nothing in the HELP file of DBPro.

And yes, I tried it with your code, it comes up, but it's nothing more then a grey square. Nothing more. Is that all I am supposed to see ? Maybe I am just not getting what this function does. That might be my problem. Because I can just make a cube that is grey. So I do not understand why this is different.

https://soundcloud.com/toraktu
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Jul 2013 01:03
Unless you put something interesting in the scene the cube maps will be empty and you need to apply the cube map to something.

It's just a cube map image and like any other image you need to apply it to something. The original poster said he'd removed all the irrelevant stuff so he could show the crash simply - which he did and I fixed. I assumed he knew what to do with it.

Anyway, have a look at the attached zipped project prepared by Lee and myself some time back. I thought it was in the Snippets project folder but it isn't - it might be in the Newsletter. The demo shows two ways of applying cube mapping to an object, i.e. to the statue in the demo. I've set the demo to use the Dark Shader method in this line:



I think the Dark Shader method is simpler (it's certainly more flexible) - the pure DBPro solution works in this demo but has its own bug in other situations (reported in the Annoying Bugs thread).

The cube map consists of six camera shots of the entire scene and is used to give the statue a dynamically changing reflection.
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 14th Jul 2013 18:29
Is there any documentation on this ?

And thanks for the help. Your one of the Pillars of this community here.

https://soundcloud.com/toraktu
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Jul 2013 18:35
Thanks.

Quote: "Is there any documentation on this ?"


Not really. It's one of the more arcane aspects of DBPro.

If you have specific questions I (and others of course) can often help.
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 14th Jul 2013 21:00
I would just like to know every possible function and parameter of this. Because I never was able to use it do to lack of info, not to mention, never getting it to work before now.

https://soundcloud.com/toraktu
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Jul 2013 22:11
Quote: "I would just like to know every possible function and parameter of this."


So would I.

There's a file around somewhere which gives the parameters for each Dark Shader command. I'll see if I can find it. It's not on the machine I'm using right now.
Diablo 3D
21
Years of Service
User Offline
Joined: 23rd May 2005
Location:
Posted: 15th Jul 2013 10:22
Hi sorry for being a ghost all weekend...

This code works for me:



Thank you Green Gandalf

Self Destruction Computer Entertainment
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 15th Jul 2013 13:10
Quote: "There's a file around somewhere which gives the parameters for each Dark Shader command. I'll see if I can find it. It's not on the machine I'm using right now."


OK sounds good. Thanks.

https://soundcloud.com/toraktu
thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 15th Jul 2013 15:12
Here, posted by Green Gandalf in this thread, I bet this is the file you're talking about.



Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 15th Jul 2013 16:33
That's the one. Thanks.
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 15th Jul 2013 16:43
That's exactly what I needed !! TY TY TY

https://soundcloud.com/toraktu

Login to post a reply

Server time is: 2026-07-07 08:19:23
Your offset time is: 2026-07-07 08:19:23