3D Python Camera

Post your own tutorials, guides and demos.

Post » Sun Aug 28, 2011 3:53 pm

"It's a bug, easy fix though. Just delete the original (Had to click it on the tool bar or Construct would crash). Then make a clone of the other blocks, container it with the blue map blocks, paint the 3d one as you please, and you should be good."

Sorry....still having problems.

1, I deleted the WWall2(3dbox) by right clicking on it in the object list and choosing delete). Then i deleted and all the mwall2(sprites), but when i run the cap it crashes?.

2, "Had to click it on the tool bar" Whats the toolbar?

I am probably missing something simple...but i dont know what.

B
19
S
6
G
7
Posts: 1,204
Reputation: 7,296

Post » Sun Aug 28, 2011 4:26 pm

i think pythons causing this to be slower if anything, or at least your implementation of the code, because i made this with events, well something highly similar (yaw pitch 3d camera with boxes and stuff), and with 3 times the objects and high poly 3d objects im getting like 800 fps, vs 80 with yours. ill post it up in a bit.QuaziGNRLnose2011-08-28 16:27:31
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sun Aug 28, 2011 4:32 pm

Sorry, my bad, I meant the object bar.

You didn't have to delete MWall2s. The WWall2 was the problem. The instruction I gave were to replace it. Mind you, you are going to get error if a map or world object doesn't have a counterpart. Are you sure you deleted all the blue blocks?

Anyway, I've fixed the cap. So just redownload it.
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Sun Aug 28, 2011 5:54 pm

[QUOTE=Yarfapet] Sorry, my bad, I meant the object bar.

You didn't have to delete MWall2s. The WWall2 was the problem. The instruction I gave were to replace it. Mind you, you are going to get error if a map or world object doesn't have a counterpart. Are you sure you deleted all the blue blocks?

Anyway, I've fixed the cap. So just redownload it.[/QUOTE]

I probably deleted the wrong stuff...anyway,Iv'e download the new cap and its sorted now, thanks.

Going back to your first post:
"I'm concerned with the speeds I'm getting, wondering if it's just my computer, Construct itself, the 3DBoxes themselves, python, or just my own bad programming killing speeds. Right now I'm doing 60-80fps, and taking away all but a few objects only yields about a 40fps gain"

I change a few textures and moved stuff around and it went from 55/60 fps(0.850 vram) to 160 fps(0.290 vram).

I did delete some of the sprites, but had over 20 objects on screen.



If you want a copy of my cap let me know.
B
19
S
6
G
7
Posts: 1,204
Reputation: 7,296

Post » Mon Aug 29, 2011 11:00 am

By all means post it
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Mon Aug 29, 2011 12:11 pm

[QUOTE=Yarfapet] By all means post it[/QUOTE]

cap

(using Yarfapets 3D python example)


I changed the layout and window to 800x600, so it might be a bit slower?
B
19
S
6
G
7
Posts: 1,204
Reputation: 7,296

Post » Mon Aug 29, 2011 11:14 pm

[QUOTE=chrisbrobs] [QUOTE=Yarfapet] By all means post it[/QUOTE]

cap

(using Yarfapets 3D python example)


I changed the layout and window to 800x600, so it might be a bit slower?[/QUOTE]

Nice, a few simple changes can do so much. Even with the resolution bump I'm still getting more than 2.5x the speed I was getting before (200-250fps average).

One quick note though, the formulas used are resolution dependent.

WorldObj[n].X=WorldObj[n].X+320 (Should be half the horizontal res)
WorldObj[n].Y=WorldObj[n].Y+272* (Should be half the vertical res)

In this case
WorldObj[n].X=WorldObj[n].X+400
WorldObj[n].Y=WorldObj[n].Y+300

*Yeah, I just realized I screwed that up too
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Sat Sep 03, 2011 10:37 pm

Yarfapet

If i add a 3d model(.obj), the cap shows an error.
Any way to stop this?
B
19
S
6
G
7
Posts: 1,204
Reputation: 7,296

Post » Sun Sep 04, 2011 9:28 pm

Rename 3dobject so that it's name doesn't start with a number. Python doesn't work with names that start with numbers.
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Sun Sep 04, 2011 10:01 pm

[QUOTE=R0J0hound] Rename 3dobject so that it's name doesn't start with a number. Python doesn't work with names that start with numbers.[/QUOTE]


The cap still wont run wont run?

1, I opened the cap, created a 3d object (called 'crates.obj')
2, Gave it a texture.
3, Ran the cap
4, Crashed, with the following errors:



B
19
S
6
G
7
Posts: 1,204
Reputation: 7,296

PreviousNext

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest