| |
| |
| |
|
Page: 1 2
Comments:
<0> write dem cl***es or pay da prize <1> Run DMCA <2> why DMCA? <2> sing with me <1> :) <1> MDMCA, the party drug for legally obtained music <3> so they added a C an dnow its ok? :) <3> lol <1> :) <4> hellow <4> i have a texture with autogenerated mipmaps and DYNAMIC modifications, i enable modification of zbuffering modification for the DIRECT3D object, then i RectLock the texture and modifyed the returned pbits entry, then i unlock, this doesnt seem to do anything <4> im writing to pBits as a WORD <4> do i need to make a dummy texture then textureupdate from the dummy to the real one? <0> @_@ <3> sounds like you need a modifications
<5> hello <6> What would be the best format used for 2D Sprites in D3D? <6> The whole game is in 2D but is floating in 3D Space... so lots of sprites and stuff :P <6> semi 3D <6> :D <1> format? <6> Vertexformat <1> hm <1> declare what you need :) <1> IDirect3DVertexDeclaration9 <6> I heard that they use different vertextypes in 2D Graphics <1> well <1> i mean realistically, what do you need <1> x,y, probably z <1> texcoords <1> color <1> (with alpha) <1> that should get you far enough <6> I think yes, i hadn't time to discussa with the guy more that he would have told me what's the format he talked about :/ <6> I just got suspicious that i'm missing something :D <1> ok :) <1> nah <1> although, i use integer coordinates <1> thats the most unusual thing about my vertex format anyway <4> sup <4> i have a texture that im trying to change the z cordinate on <4> the verticies are setup for it to be a square texture <4> do i need to add additional verticies by hand <4> or can i change the z cordinates in the texture? <6> i was just wondering, if i make this object let's say player, and he has his own 2 triangles that create his vertex wich i can then put an texture for... <4> its mipmaped <1> wkr4k4r? z coordinate of the texture? <6> *vertexes <4> yes <4> i want to make waves <4> for an ocean <4> or large lake <4> basically <4> i have a double height buffer system <1> Icchan^, i dont know what youre saying :P <4> and im trying to map the height buffer to the texture <6> i'm not finished yet :D <4> do i need to setup the texture registers completely? <4> or am i going about this wrong and need to change the verticies? <6> and i use the ortographic projection on the camera. does the distance of the camera effect for the size of the square that i see? or can i somehow standardize/transform my coordinate system that i can be sure that is my vertexes make 128x128px square on screen? or is the a nother solution? <1> wkr4k4r, uh well you can perturb the texture lookups <1> but only if you use pixel shaders <1> if you do, you have to realize that there is no Z coordinate when looking up a 2D texture <1> so you need to translate the Z change to an X,Y change <1> in essence, this is "parallax mapping" <6> *orthogonal camera.. not orthographic ;D <1> Icchan^, orthographic sounds right <4> ok <4> thanks <6> okay. i'll use that then :) <1> Icchan^, the distance doesn't matter right <1> it only defines your available z range <1> along with the near/far clip plane distances etc <1> as usual <6> yes <1> but there is no perspective in an ortho projection
<1> so things stay the same size on screen <1> wkr4k4r, so if you google for parallax mapping you'll find some interesting ideas/code probably <4> ok <4> thanks <1> np <6> i'm little confused about screen cordinates stuff atm. <6> because i'm quite new to the direct 3D <1> let me paste you my ortho set up <1> basically this: <1> D3DXMatrixOrthoOffCenterLH( &projMatrix, 0, screenWidth, screenHeight, 0, -10, 1000.0); <1> that gives me 0,0 as the top left corner <1> and integer pixel coordinates over the screen <1> that doesnt take care of pixel:texel 1:1 mapping though <1> so you need to subtract 0.5 pixels in x and y from the *vertex position* <1> http://rafb.net/paste/results/nfV58h91.html <1> this is what i use <1> along with integer vertex positions in the VB, it gives me perfect results <6> i use c++. but i think this helps me too. i'll check it out :P <1> (you can set up a view matrix to do this) <1> instead of a vertex shader <6> is the best way to do animation in semi 2D: load all frames, swap texture used in each tick of animation. :P <6> *load all frames means, load all images (or textures if you prefer) <1> depends <1> you could also set up a grid of frames inside a bigger texture <1> and move the texcoords between frames <1> but thats more of a vertex shader trick <1> trickier to set up without <6> yes that's allso true. <1> if you have a ridiculous amount of frames or animations, this is probably nicer <1> i cant tell you which is better in general though <6> i was just thinking, soes the texture change need more computer time and/or memory than one big texture that is just moved around :P <1> well <1> if you have lots of objects on screen using the same animation <6> *typos... i'm le tired! :D <1> then if the frames are in a single (or a few) textures, thats better <1> beacuse you get fewer texture changes *between draw calls*, which is a thing to look out for <6> i thought it too <6> so like in some rts the coordinate chage is better. <1> well, or a space shooter for explosions <1> etc etc <1> you should start using vertex shaders btw <1> you can do all sorts of little tricks <6> i'm not very good at 3d yet, so i'll take my time to get used to this first :D <6> i need to make that transformation cl***, that i can have exact coordinates. <1> well i'm recommending it because "the old way" (fixed function pipeline) is VERY outdated <1> and very different from the modern way of doing things (shaders) <6> Let's see, if i have fixed resolution, it's easier to do the transformation right? <1> what transformation? <1> -0.5 pixels? <6> you are trying to say, that if my 3D plane (lets call it the plane for now on) is in pos 5.5 1.0 it needs to convert it to 6.0 1.0? :P <1> erm <1> think in pixels to begin with <6> i try to get it ;D <1> with the ortho setup i posted above, you can specify your vertices in screenspace pixels <1> so if your rectangle is between 0,0 and 10,10 <1> you must change that to -0.5,-0.5 and 9.5,9.5 <1> that will ensure that pixel centers fall exactly <1> and that the texture mapping also falls exactly in place <1> the texcoords should be 0/texwidth,0/texheight and 10/texwidth,10/texheight <6> aav, darn i'm dumb :D <6> I just didn't understand thing as simple as that you told me :DD <6> Even you told me ;D <6> now i got it i mean :D <6> But i just didn't get it right away ;) <6> hmmh there's some ready mage cl***es for 2D graphics in 3D environment on D3D <2> ID3DXSprite <6> pulse-amo, yep <6> but one document says that it has lot's of bugs and stuff, i'm going to still try it. it may help me to get the functionality i need :) <6> it's funny, after you have built the main loops, windows, inititializations.. you don't write much code. you'll just read and learn and plan what's the best way of doing the things you need. <6> i have 1 week now just figured out different functionality of D3D... not writed about 15 lines of code :D <6> *and writed <2> written <2> rr <2> didnt write; wrote;
Return to
#directx or Go to some related
logs:
#solaris #politics #hardware #battle #politics #nintendo getURL mainframe problem flash 8 ptsc earnings yearly
#politics pomeapple
|
|