# Slaaitjuh

Members

32

130 Neutral

• Rank
Member
1. ## Texture matrix from triangle

I am sorry for replying this late, I did not notice there was a reaction. Thanks for that.    Your first assumption is correct. The problem is that we are performing CSG on these planes, which creates sub vertices etc etc. A way to recalculate the texture coordinates ( in my head, that is) was to produce a uniform texture matrix that somehow preserves the original intention of the texture map. This would be a matrix per plane. I guess I have to agree with you that it would be impractical, maybe even impossible.    I considered barycentric coordinates (remember which plane had which vertices / uv, and do the math) yet the results were often _not spot on_. A lot of vertices got little offsetted texture coordinates which looks unnatural.    Another way was to do planar world mapping, but I wanted to avoid that since that only results in something nice on a box. Mapping a sphere or cone with this is not pretty.   The previous version I was working on involved creating the planes, looking up the texture coordinates and interpolate them along with the vertex data. The problem I have with this, is that it requires a lookup table from the original model to the CSG model. This is a weak link, which I'd like to avoid.   Do you have any tips/ideas I did not try yet?   Thanks again for your clear explanation.
2. ## Texture matrix from triangle

Hello,   I was wondering if there's anyone that can help me with the following idea. I am currently working on a CSG library. I made a function to import models. The models get converted to planes, and later on rebuild to vertices. For material editing I am using texture matrices per plane. I would like to continue this, but I am facing a problem/idea:   When reading an existing model, I can get the position, normal and texture coordinates for a given vertex/triangle. Since I can get the three vertices and texture coordinates of a triangle, I was wondering if there is a way to construct a Matrix from those parameters to recreate the texture coordinates after the CSG process. This would mean that the matrix would be able to calculate texture coordinates by transforming the vertex position.   The reason I would like for this to work, is that I can reuse the texture coordinates in the models, making the initial model look much better.   I would prefer examples in C# if I have a choice, but any language will do :-) Idea's are very welcome as well. Any clarification can be provided also.   Thanks,
3. ## Game developers survey

something went really bad! clicky thanks for reporting so early!
4. ## Game developers survey

Hello GameDev! I am currently doing my final teases for my university, and have to do a survey + results along with that. My intrest is to find habbits and needs for different kind of game companies, and to research what kind of financial support and games are used and created. The purpose of this research is not for sale and will not be sold. It is only used for a schoolproject. The data will be analysed and a result will be made and used in my final report. Don't hesitate to fill it out, I am looking for any kind of company that released games. If you released a game but aren't a company, fill it in as well! I hope you can find some spare time to fill it, I am hoping for hundreds and hundreds of replies of course It's a Google form, which makes it easy for both you and me to find, fill and analyse it. The link: Click here... Kind regards! [Edited by - Slaaitjuh on April 27, 2010 7:48:02 AM]
5. ## Small game industry research survey

Hello GameDev! I am currently doing my final teases for my university, and have to do a survey + results along with that. My intrest is to find habbits and needs for different kind of game companies, and to research what kind of financial support and games are used and created. The purpose of this research is not for sale and will not be sold. It is only used for a schoolproject. The data will be analysed and a result will be made and used in my final report. Don't hesitate to fill it out, I am looking for any kind of company that released games. If you released a game but aren't a company, fill it in as well! I hope you can find some spare time to fill it, I am hoping for hundreds and hundreds of replies of course :-) It's a Google form, which makes it easy for both you and me to find, fill and analyse it. The link: Clicky Kind regards! Jan ps. you might see this post on some other forums as well, sorry for spamming, but i need to find some reach...
6. ## Calculate bounding sphere based on minimum screen size

Hey Guys, I have (at least for me) a bit of a tough time figuring something out. I want to create a bounding sphere around an object, based on the minimum size it has to have on the screen. I have all camera parameters at hand, screen size at hand and the size of the bounding volume of the object itself, i just need to somehow calculate the distance towards the object in world space where the object starts to come into the field of possibly beeing 10% of screen size. Of course if the object is rotated somehow the area might be less then 10% even though the area is calculated right, but when the viewer comes into that area i can spend more expensive calculations. I made an image that might give some more visual idea to the "problem", and i was hoping someone might give me some hints, tips or solutions to the problem... Thanks in advance
7. ## Performance & flexibility: Drawing multiple objects in one or in multiple drawcalls?

maybe you can combine batches with texture atlasses and vertex deformation to make everything have a bit of different appear + form
8. ## Shader per object or?

so would it be a good idea to for example use preset register for some values (like view, projection)? also i was thinking about using texture atlassing at some point someday. As i read so far the most cosly operation is texture switching(chaning redner target is bad to as i heard), so i figured that by grouping objects and putting their textures in 1 big texture, i'd be able to skip the constant texture swapping. Also by rendering multiple shadow maps to one big texture might save some render target switching. But this is very offtopic maybe, and also maybe providing even more problems + performance hit... thanks for the advices btw!

i just copied the original map to a rendertarget of the same size and same format and then the wrapping and stuff works great. This is confusing to me, sincei just load the texture by Texture.Load(device,byte[]); This is the offsetmap, which contains all positions for the actual vertices. does anyone know how this can be working but not directly from that map?

i read about problems around texture sizes beeing a multiply by two, but i don't think this is the problem. The rendertarget is 128x64 and the map where it should read from is 64x64.