Skip to main content
gamedev.net
🔒 Locked

RenderMonkey World/Proj Matrices

Started by AndyTX 3 replies 2.8k views
Original Post
AndyTX
AndyTX
Is it just me or are RenderMonkey''s matrices backwards from what works in the Microsoft Effects Editor? Ie. the standard vertex shader transform in RenderMonkey is:
Out.Pos = mul(view_proj_matrix, In.Pos);
While in Effect Edit it is:
float3 P = mul(float4(Pos, 1), (float4x3)WorldView);
Out.Pos  = mul(float4(P, 1), Projection);
Or equivalently:
Out.Pos = mul(float4(P, 1), WorldViewProjection);
Alhough it seems that the world matrix is always the identity in this program (for obvious reasons), so we could simply use ViewProjection like in the RenderMonkey version. Now the problem of course is the order of multiplication which is simply not compatible between the two... in fact when I export an FX file from RenderMonkey, it simply does not work for this (and other) reasons. Has anyone else notices this? Any way to get around it? I know a pile of people use RenderMonkey for shader development (it''s a great tool!) but this seems to be an obvious impass... solutions please? Thanks in advance.
EverIce
EverIce
Yeah, i ran this problem a few weeks ago. Effectedit only knows view, worldview, proj matrices. And rendermonkey view, viewproj, invview. So conversion is not working. Solution : don''t use effectedit, it''s a hack. Write your own effectloader.

u.i: when will be released Rendermonkey 1.5?
AndyTX
AndyTX
Fair enough. Can you still use the D3DX functions to load FX files and have them work correctly though?
circlesoft
circlesoft
quote:
Original post by AndyTX
Fair enough. Can you still use the D3DX functions to load FX files and have them work correctly though?
Rendermonkey''s FX Exporter is not perfect, so it doesn''t always work. However, Nvidia''s FX Composer does export perfectly, so I''d check it out. Oh yea, and FX Composer totally kicks rendermonkey in the butt in every other aspect, too


Dustin Franklin
Mircrosoft DirectX MVP
AndyTX
AndyTX
Actually I think it''s a problem with the Effect Editor, as all of the examples in the books that I have list the matrix calculation agreeing with RenderMonkey. Writing my own FX file from HLSL code is trivial enough anyways. As I''ve heard though, RenderMonkey 1.5 has a much improved FX exporter as well.

I''ve also used NVIDIA''s tool, and it is nice in some aspects. However, it does not organize different effects in the nice way that RenderMonkey does (and I''m not the only one who thinks this... to my knowledge the latter is more popular). Also it seems very NVIDIA-specific, while RenderMonkey remains quite company-neutral.

Either way I think I''ll use the best tool for the job, which is why I have both

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.