I've a bit of a conundrum. Perhaps you guys can help shed some light on it?
See, I'm trying to change the way the map renders the sky background. Currently, it renders it by pasting a texture onto a cylinder thats wrapped around the room. This causes a few issues, namely that it warps the background and the 'polygons' of the cylinder become very noticeable depending on the room size. The latter i know can be fixed by changing the number of steps variable in its argument, but it doesnt really fix the big warping issue. So I had a thunk. What if i use a similar method to how the hud is spawned and render the background as a sprite? Its doesnt have any details that would move or would need to rotate as you look around, so I'm wondering if making it a drawn sprite would work. Issue is is that I can't quite seem to get it to work...Everytime i try to render it using the same style as the hud, the room ceases to render in 3d. and i'm left with a sprite covering a big chunk of the view.
For reference:
Cylinder type
Mock up of what i'm trying to do
(all textures are placeholders and/or tests of course)
The cylinder spawns via:
and how I THINK the bg would be rendered is:
I'm not sure if thats enough context to help relay the problem, I can give more if needed. Does anyone maybe have an idea of whats gone wrong?
See, I'm trying to change the way the map renders the sky background. Currently, it renders it by pasting a texture onto a cylinder thats wrapped around the room. This causes a few issues, namely that it warps the background and the 'polygons' of the cylinder become very noticeable depending on the room size. The latter i know can be fixed by changing the number of steps variable in its argument, but it doesnt really fix the big warping issue. So I had a thunk. What if i use a similar method to how the hud is spawned and render the background as a sprite? Its doesnt have any details that would move or would need to rotate as you look around, so I'm wondering if making it a drawn sprite would work. Issue is is that I can't quite seem to get it to work...Everytime i try to render it using the same style as the hud, the room ceases to render in 3d. and i'm left with a sprite covering a big chunk of the view.
For reference:
Cylinder type
![[Image: DnkpP3O.png]](http://i.imgur.com/DnkpP3O.png)
![[Image: KyUSZmJ.png]](http://i.imgur.com/KyUSZmJ.png)
The cylinder spawns via:
Quote:d3d_draw_cylinder(x-1024,y-1024,global.bg_z2,x+1024,y+1024,global.bg_z1-300,sprite_get_texture(global.bg_spr_tex,floor(bg_frame)),global.bg_hr,1,-1,16);
and how I THINK the bg would be rendered is:
Quote:d3d_set_projection_ortho(0,0,global.range_x,global.range_y,0)
draw_spritxt(spr_bg_tex1,image_index,0,0,image_xscale,image_yscale,image_angle,image_blend,image_alpha)
I'm not sure if thats enough context to help relay the problem, I can give more if needed. Does anyone maybe have an idea of whats gone wrong?