Views: 19,991,519 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
04-18-24 11:16 PM |
Guest: |
Main - Posts by element3260 |
element3260 |
| ||
Normal user Level: 7 Posts: 1/7 EXP: 1174 Next: 274 Since: 04-13-13 Last post: 4018 days ago Last view: 3201 days ago |
I'm also working on continuing Thakis' work on a .bmd/.bdl loader. I'm fixed a few of his bugs/missing functionality, but I still have a ways to go. Right now I'm working on texture generation (where Thakis' support is super thin) and I've run into a jam. I can't quite figure out how the texture matrices (which are referenced by GX_TG_TEX0 or GX_TG_TEXCOORD0) are stored in the .bmd. Thakis seemed to think that they weren't stored as matrices, but as a pair of scales and offsets. I think this is incorrect. Does anyone have any experience in this area?
My code, which is DirectX/HLSL, is linked on my site here: http://realtimemike.wordpress.com/research/ P.S. blank: thanks for the GX_SetChanCtrl tips. I had originally implemented them as separate color and alpha, because of the /* chan id */ section of gx.h and because there are 4 chanCtrl indices in the mat section of a .bmd. Then I read somewhere on the net that the alpha and color were merged, so I changed it back. It broke some of my models so I thought that I had exposed more bugs, but it looks like I was right the first time. Thanks! |
element3260 |
| ||
Normal user Level: 7 Posts: 2/7 EXP: 1174 Next: 274 Since: 04-13-13 Last post: 4018 days ago Last view: 3201 days ago |
Sounds like a good start. I figured out a partially correct way to set up the 2x4 texture matrices. If you're familiar with Thakis' bmdviewer2 then this might look familiar:
TexMtxInfo mtx { mtx.scaleU, 0, 0, mtx.scaleCenterX, 0, mtex.scaleV, 0, mtx.scaleCenterY }; This produces correct results for WW Link's eyes and other models in that .rarc. I think/know there are more parameters that models are going to use. At least one model in that rarc wants a 3x4 matrix. With the info we have now it would be exactly the same as a 2x4, so there must be more! |
element3260 |
| ||
Normal user Level: 7 Posts: 3/7 EXP: 1174 Next: 274 Since: 04-13-13 Last post: 4018 days ago Last view: 3201 days ago |
Awesome. Thank you blank.
How can you generate a single texture matrix that can rotate a point around a center point? It seems like we would need at least two matrices to do it. Do they make use of the premultiply matrix in this way? Can you share any code on how to convert the TexMtxInfo structure to a matrix? I'm having trouble. |
element3260 |
| ||
Normal user Level: 7 Posts: 4/7 EXP: 1174 Next: 274 Since: 04-13-13 Last post: 4018 days ago Last view: 3201 days ago |
Excellent, thanks again blank! I'm working on Link's eyes, and I'm realllly close, but not quite there. The eyes are drawn three times. One pass has blending disabled, and lays down 0's for all 3 color channels and 1.0 for the alpha channel where the eye should be drawn (like an alpha mask). The second pass seems to do exactly the same thing, but with blending enabled. But since the first pass wrote 0's to the color channels, it blends with the 0's (which is how you get Zorro link). The third pass has blending enabled but the srcFactor is dstAlpha, so it uses the alpha mask laid down by the first two passes.
So I believe that the first pass is supposed to have color writes disabled, ala GxSetColorUpdate(false). I've been hunting for that boolean (and it's brother, the boolean for GxSetAlphaUpdate) in the .bdl/.bmd file but I haven't had any luck. Is it in there? Am I barking up the wrong tree? |
element3260 |
| ||
Normal user Level: 7 Posts: 5/7 EXP: 1174 Next: 274 Since: 04-13-13 Last post: 4018 days ago Last view: 3201 days ago |
Hmmm. Has anyone figured out how his eyes work? Maybe thakis is grabbing some incorrect blending information? |
element3260 |
| ||
Normal user Level: 7 Posts: 6/7 EXP: 1174 Next: 274 Since: 04-13-13 Last post: 4018 days ago Last view: 3201 days ago |
Blank, which tools did you develop? |
element3260 |
| ||
Normal user Level: 7 Posts: 7/7 EXP: 1174 Next: 274 Since: 04-13-13 Last post: 4018 days ago Last view: 3201 days ago |
Are they publicly available? I'd really like to get a look at the source. I'd like to tackle indirect texturing soon, and I don't think Thakis really solved it. |
Main - Posts by element3260 |
Page rendered in 0.015 seconds. (2048KB of memory used) MySQL - queries: 21, rows: 111/111, time: 0.008 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |