| |
| |
| |
|
Page: 1 2 3
Comments:
<0> I'm currently learning Managed DirectX 9 and HLSL. Can anyone tell me the pros/cons of using multiple p***es in an HLSL FX file? <1> anyone have experience with dev-c++ im having a problem with directsound <0> it's best to just post your question and hope you get an answer. ;) <1> well, dx works fine up until directsound got initialized. now in dev-c++ it says error on compile from dxstdafx.h <1> "the sample framework requires a unicode build." <1> searched their forums, and irc channel, no one really quite knows whats up <0> I'm not familiar with dev-c++ ... I ***ume this is a different IDE from MS Visual Studio? <1> exactly <1> dx worked great up until i included all the other libs for directsound <2> Im having a hell of time trying to wrap my head around adding texture to a indexed buffer terrain.. anybody have some experience there? <0> Rhay... dunno but I'll dig on the web for a min for ya <1> anything is appreciated <0> Nugget is it a .X mesh? <2> Dazed: actually its a heightmap based mesh as opposed to an .x file <2> i may be doing it in a way that wont support adding textures the way I want <2> cuz i just cant grasp how i would do it with the vertex set i have
<0> Is it a uniform grid with the verts merely displaced vertically? <2> yeah <0> A square grid? <2> yup, sure is.. 128x128 <0> Did you model it in a modeling app, or generate it programmatically? <2> basically i just scan a bitmap (grayscale) i made in adobe for height data <2> so you could say programmatically <0> Rhay... there might be something helpful here: http://www.gamedev.net/community/forums/topic.asp?topic_id=267627 <1> i'll take a look <2> but im thinking the fatal flaw is that since the verts are aligned that way, i cant do U/V properly <2> wondering if there is some magic trick, or if im missing something <0> The data in the bitmap is irrelevant. You just have to make sure the UVs are correct. <2> thats the hard part.. since its an indexed buffer, the verts will be shared tho <2> so one quad's left side is a shared right <0> Are all the verts uniformly spaced along the XZ plane? <2> yeah <2> im wondering if i need to abandon the indexed deal <0> Well it's perfectly fine for the verts to be shared between polygons unless you are trying to create a shading discontinuity or separate UV islands. <2> just use a big fat vertex buffer <2> im basically just trying to texture each quad in a tile like way <2> as opposed to stretching it over the whole matric <2> c/x <0> using separate image files for each quad? <2> eventually yeah.. but at the moment id just be happy to tile one texture over the whole m*** <0> Rhay... here's the only other stuff I found... don't know if it's helpful: <0> http://forum.games-creators.org/archive/index.php/t-585.html <0> Well it should be easy to fit one texture over the whole grid... you can create a programmatic loop to fill the UV coordinates from 0 to 1 in both the U and V directions. <2> yeah, that part i was able to do ok.. but at 128x128, its huuuuuuuuuuuuuuuge (and fugly) <2> i think im just gonna have to get rid of the index crap <0> I don't know what you mean by huge. <0> when rendered, or takes up a lot of disk space? <2> 128x128 units, scaled high.. its for terrain... .. when rendered.. <2> looks great! just uhhh, smooth as a shaved butt et al. <0> lol <3> damn, happy days in this channel again <0> The actual geometry is rough, or the texture is pixelated? <0> :) <2> texture is pixelated, since im stretching it so far.. thats why i wanted to tile er up <2> well not pixelated <2> but void of detail <0> Ok well there are certainly ways to tile the texture programmatically. <3> nugget: you trying to do heightmapping or something? <2> slade: yes sir.. which i managed to get right (some how).. just having trouble implemeting tiled texture with an indexed buffer <0> Nugget are you using an HLSL FX file to implement the map? <4> if you need to have different textures or different texcoords between geometry tiles, you cannot share those vertices <2> Dazed: no.. very basic really.. I just get an 8 bit bmp, (of the same dimensions) and use gray scale data to build Y <2> aav: gooootcha... no shortcuts eh? <3> the shortcuts end up being longer <2> so it may be just better off to build it triangle by triangle eg <2> eh <0> Nugget so you modify the vert Y coordinates directly in your code from the map? <3> are you changing texture every square? <2> Slade: id definitely like that ability in the long run, yeah <0> He just wants to tile the same texture multiple times <4> Dazed oh ? <4> are you sure <0> That was my understanding <2> that would work for now too <0> Nugget so you modify the vert Y coordinates directly in your code from the map? <3> nugget: you need to make whats called a texture atlas
<2> Dazed: yup <2> Slade: texture atlas eh... sounds interesting... <3> nugget: basically you make a huge texture and you copy all your little textures onto the big texture and adjust the uvs of your mesh <2> havent ran across that yet.. have been googling for 2 days haha <2> gotcha.. isnt there limitations to that? <3> http://developer.nvidia.com/object/texture_atlas_tools.html <-- that is offline i think <3> nugget: not really if you plan on using small textures inside big ones. you might have to use multiple big textures tho <2> oh cool, ill check that out, thank ya <3> the reality of the situation is you want to 'swap' textures as few times as possible <3> rendering quad by quad will make you extremely slow <2> very true <3> you may wanna consider this instead of tiling as well http://www.cbloom.com/3d/techdocs/splatting.txt <2> of all the things to stumble on, i never thought it was going to be the texture <3> i think we use a modified version of that in our engine <2> now that looks very interesting <2> lol <2> info is good <2> so basically what this guy is saying is to break it up into sub tiles <2> so i can keep the indexing, but not for the whole terrain field.. makes sense <3> it helps for culling too <2> im a little suprised directX api doesnt have something for saying "tile this texture to this mesh, love brian" <3> now are you trying to make natural looking terrain, or blocky terrain? <2> as natural as possible <3> ah ok <3> uh, thats not hard to do. you can tile a texture instead of stretching pretty easily <2> its not hard to do....as long as you dont share vertices. <2> which is looking more and more like my root problem <3> or you use 2 sets of texcoords <2> how would that help me? <3> well your issue is you want to use the same verts to render 2 different textures right? <2> negative...just to tile one at the moment <3> then whats the issue? <2> the problem comes up when the shared vertex has a static U/V <2> i save vertices, but totally hose myself for texturing in a tiled way <3> you have an x,y loop that ***igns the textcoords right? <2> yes <0> Well wrapping does seem to be supported. Here's one doc, although it says it's archived. I'm trying to find something more current: <3> nopaste the loop <0> http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c_dec_2004/directx/graphics/ProgrammingGuide/GettingStarted/Direct3DTextures/texturewrapping.asp <2> nopaste? <3> nugget: google for nopaste and hit i'm feeling lucky <2> gotcha <2> oh sweet <3> nugget: the issue is you are going to render the same texture multiple times, but you want it facing the same direction, however, if you dont mind em going whichever way (since its fully tiled it shouldnt matter) i'll show you soemthing <2> http://rafb.net/paste/results/wQd0OO69.html <3> basically on the x you to 0 1 0 1 0 1, on the y you do the same <2> thats the vertex setup loop <3> not only is it .net but its vb :( <4> agh <2> whats VB? <3> your ocde <3> code <4> no wait, that's Delphi isnt it? <2> haha no.. thats delphi <3> oh yea you're right <2> VB, eeek <2> and not .NET either <3> not as bad. but.. damn :p <2> C++ overkill for windwos ;) <4> not for games it's not <3> c++ is where its at. tho these days for most thigns you can get away with .net i think <2> you can still do raw message loop processing in delphi too <2> same as you would in C++.. its the VCL that gives it the weight <2> which can be eliminated all together <3> and the interfacing with libs ;P <3> WOOP <-- wtf? :p <4> well in that case, why not just learn c++ and join the crowd? :P <2> I know C++ :) <4> ah <2> slade: thats my area of evils.. :) <4> hm yeah i'm wondering what Slade's wondering <3> nugget: for .U and .Y use x mod 2 and y mod 2
Return to
#directx or Go to some related
logs:
#beginner annoypriv quick riz #mirc mjau mjau mp3 player #computers #gentoo 9ale7 shhab
#netbsd #politics
|
|