MrIslomaniac Posted February 25, 2010 Share Posted February 25, 2010 Got a little problem here guys. I see the edge of an invisible cube through the shadows of my model, any clues? #include "engine.h" int main(int argc, char** argv) { Initialize(); //Create a graphics context Graphics(800,600); //Create a world if (!CreateWorld()) { MessageBoxA(0,"Error","Failed to create world.",0); goto exitapp; } CreateFramework(); //Create a camera TEntity cam=CreateCamera(); CameraClearColor(cam,Vec4(0,0,1,1)); PositionEntity(cam,Vec3(0,2,-10)); //Create a light TEntity Map = LoadScene("abstract::TestSystem.sbx"); TLight miau = CreatePointLight(100,0); PositionEntity(miau,Vec3(0,0,0)); //Create a render buffer TBuffer buffer=CreateBuffer(800,600,BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); int move=0; int strafe=0; TVec3 camrotation=Vec3(0); float mx=0; float my=0; //Main loop while(!AppTerminate()) { //Camera look if (MouseDown(1)){ HideMouse(); mx=Curve(MouseX()-GraphicsWidth()/2,mx,6); my=Curve(MouseY()-GraphicsHeight()/2,my,6); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); camrotation.X=camrotation.X+my/10.0; camrotation.Y=camrotation.Y-mx/10.0; RotateEntity(cam,camrotation); } else if (!MouseDown(1)){ ShowMouse(); } RotateEntity(cam,camrotation); //Camera movement move=KeyDown(KEY_W)-KeyDown(KEY_S); strafe= KeyDown(KEY_D)-KeyDown(KEY_A); MoveEntity(cam,Vec3(strafe/10.0,0,move/10.0)); UpdateFramework(); RenderFramework(); //Swap the front and back buffer Flip(0); } exitapp: return Terminate(); } here are the files you need: http://rapidshare.com/files/355513076/Test.rar.html Thank you =) Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 25, 2010 Share Posted February 25, 2010 DL'd your files and used your above code, cant seem to see what it is you refer to can you post a screenshot, all I get is a white sphere ... Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
MrIslomaniac Posted February 25, 2010 Author Share Posted February 25, 2010 thats exactly what should happen... But fly around it and look at the shadow edges heres a picture: Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 25, 2010 Share Posted February 25, 2010 Nope I have flown all round it .. up down left right back forward ... can't get that to happen. I am using your code as is except for a RegisterAbstractPath to my SDK directory, and the model and sbx you supplied. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
MrIslomaniac Posted February 25, 2010 Author Share Posted February 25, 2010 Thank you for trying mg! Maybe it is something with my graphics card... Nvidia gforce 9600 GT can you or someone else try this? it's the compiled version: http://rapidshare.com/files/355699112/Shadow_Test.zip.html Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 25, 2010 Share Posted February 25, 2010 Would no have thought (in this case) it was as we seem to have the same card. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
macklebee Posted February 25, 2010 Share Posted February 25, 2010 i get the same thing with your example... but was unable to get it to occur in my own example scene... or on any thing I have used around point lights... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
MrIslomaniac Posted February 25, 2010 Author Share Posted February 25, 2010 hmm weird... which version of the engine are you guys using? i am using 2.31 Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 25, 2010 Share Posted February 25, 2010 have you sync'd lately as I can get the issue with your compiled .exe but if I change the DLL's ect to the ones I currently have from the latest sync it seems to fix it. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
macklebee Posted February 25, 2010 Share Posted February 25, 2010 2.31... perhaps it has something to do with the new shadow casting options... i notice that you do not have the "castshadows" key in your sbx file... EDIT- agree with MG. you appear to be using an old shaders.pak... i replaced your pak with my current one and i cannot get that shadow error Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
MrIslomaniac Posted February 25, 2010 Author Share Posted February 25, 2010 My version is up to date... Can you look at the dll filesize? are they different? EDIT Yes that was it now it works for me too =) Thank you guys so much =) appreciate it Dustin Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 25, 2010 Share Posted February 25, 2010 Your welcome glad that little mystery is solved for you Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
MrIslomaniac Posted February 25, 2010 Author Share Posted February 25, 2010 When I change the pointlight line to this: TLight miau = CreatePointLight(1000,0); it happens again ... I know that in the editor you can only set it to 100 but i need it to light for a distance of 15000000 LE units ... Solar system ftw ^^ Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 25, 2010 Share Posted February 25, 2010 15000000 LE units ? Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
MrIslomaniac Posted February 25, 2010 Author Share Posted February 25, 2010 Well the distance between the sun and pluto is 5913520000 km. I already divide every value by 4.000.000 and take the result for the engine in Units ... So for pluto that would be 1.478.380 meters, since you can set the camera view range to 3.000.000 i thought that would work ... Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 25, 2010 Share Posted February 25, 2010 you are not going to manage to scale the solar system very well to LE units I dont think. You may well have to fake it along the way. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
MrIslomaniac Posted February 25, 2010 Author Share Posted February 25, 2010 I just did another calculation, i could make the scale much smaller but I don't know what would happen if i load an object that is 0.1137 meters and i zoom very close... of cause i need to slow down the camera and say that it should not stop rendering whats in front of it ... i'll try that later today, hopefully it will work =) Thanks again Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 25, 2010 Share Posted February 25, 2010 No probs... good luck Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.