subabrain Posted January 31, 2018 Share Posted January 31, 2018 Hello together,i have a question to you again :PSo now i try to make a "chrome" effect material on a shape in torque 3d.Ive read some things but i dont get the key to work. So i have to use shaders but how can i do that - there is no good tutorial about that.Would be nice if you could help me :)Thanks a lot!GreetingsRobert Quote Link to comment Share on other sites More sharing options...
Duion Posted January 31, 2018 Share Posted January 31, 2018 Two options:1: Wait for 4.0 with PBR which will more accurately simulate material effects by default. -Takes long and is difficult.2. Use a cubemap for reflections, this will simulate something being metallic and use lots of specular. -This is fast and easy.Also remember that to use cubemap reflections you need an alpha channel in the diffuse texture, that will determine how reflective somehing is. I don't know if more transparency made it more reflective or less reflective, but you can just try it out, it was a weird system, but don't invest too much into it, since I think it will get replaced relatively soon or at least it should. Quote Link to comment Share on other sites More sharing options...
subabrain Posted January 31, 2018 Author Share Posted January 31, 2018 Hello Duion,Thanks a lot! I think ill try it with the cubemap - but theres one strange thing.If i try to modify the cubemap i cant select the cubemap - its not visible to see the cubemaps - but only with the precompiled version its shown - why that?I dont know what to do - maybe you can help me?Thanks!GreetzRobert Quote Link to comment Share on other sites More sharing options...
Duion Posted January 31, 2018 Share Posted January 31, 2018 Maybe you broke it, you would have to document the exact steps you did to find out what went wrong.The cubemap editor is known to be a bit complicated.Try just adding the default skybox cubemap to a material to see if it works, without messing with cubemaps at all. In the material settings you can just apply an existing cubemap for reflections, just pick one there, do not edit them. Quote Link to comment Share on other sites More sharing options...
Johxz Posted January 31, 2018 Share Posted January 31, 2018 (edited) The dev branch have a broken GUI for the cubemap.You can still use it with TorqueScript perfectly.1) define a material, 2) define a cubemap. singleton Material( DesertSkyMat ) { cubemap = DesertSkyCubemap; materialTag0 = "Skies"; }; singleton CubemapData( DesertSkyCubemap ) { cubeFace[0] = "./cubemap/skybox_1"; cubeFace[1] = "./cubemap/skybox_2"; cubeFace[2] = "./cubemap/skybox_3"; cubeFace[3] = "./cubemap/skybox_4"; cubeFace[4] = "./cubemap/skybox_5"; cubeFace[5] = "./cubemap/skybox_6"; }; Edited January 31, 2018 by Johxz Quote Link to comment Share on other sites More sharing options...
subabrain Posted January 31, 2018 Author Share Posted January 31, 2018 hi,thank you very much - now i know that i'm not alone ;)and of course thanks for the answer!ill try :)Thx and greetzRobert Quote Link to comment Share on other sites More sharing options...
JeffR Posted January 31, 2018 Share Posted January 31, 2018 Yeah, the cubemap editor UI being buggy was noted by Bloodknight. I've looked into it and started fixing it up, but I'm not quite done yet.For now, defining it in script as @Johxz said is a good workaround. Quote Link to comment Share on other sites More sharing options...
subabrain Posted January 31, 2018 Author Share Posted January 31, 2018 hi there,ok i think there are more bugs in the gui - f.e. to delete some elements in the scene, to delete it with the options menu (right click) isnt working ... but the good answer is that it works good with reflection :) singleton CubemapData( DesertSkyCubemap ) { cubeFace[0] = "./art/skies/Desert_Sky/cubemap/skybox_1.png"; cubeFace[1] = "./art/skies/Desert_Sky/cubemap/skybox_2.png"; cubeFace[2] = "./art/skies/Desert_Sky/cubemap/skybox_3.png"; cubeFace[3] = "./art/skies/Desert_Sky/cubemap/skybox_4.png"; cubeFace[4] = "./art/skies/Desert_Sky/cubemap/skybox_5.png"; cubeFace[5] = "./art/skies/Desert_Sky/cubemap/skybox_6.png"; }; ...i did this - thanks a lot!GreetzRobert Quote Link to comment Share on other sites More sharing options...
Duion Posted January 31, 2018 Share Posted January 31, 2018 An additional tip, the default skybox may not fit your scene for reflections on your objects, but what you can do is make a generic cubemap without much detail, that way it still looks like metallic reflections, but you no longer notice that much that the cubemap does not fit the environment. Quote Link to comment Share on other sites More sharing options...
Timmy Posted January 31, 2018 Share Posted January 31, 2018 It should be pointed out that if you are using the development branch i added support for dds cubemap files singleton CubemapData( MyCubemap ) { cubeMap = "path/to/my/cubemap.dds"; }; I totally forgot to post about this before, i can post further instructions if anyone is having trouble creating the cubemap file. Quote Link to comment Share on other sites More sharing options...
Duion Posted February 1, 2018 Share Posted February 1, 2018 I had problems using dds for skyboxes, since there are compression artifacts and they become very obvious if they cover the whole sky and even if it is just one pixel it still ruins all.Skyboxes often have a very smooth gradient and dds formats somehow cannot render this properly.Does anyone know which compression to use to avoid those problems? Quote Link to comment Share on other sites More sharing options...
Timmy Posted February 1, 2018 Share Posted February 1, 2018 If bc3 (dxt5) still has artefacts just don't use compression (use a regular uncompressed RGBA8 format), i have also added in floating point support for dds formats so you can use hdr images for the skybox cubemap too. Make sure whatever tool you use is not generating mipmaps. Quote Link to comment Share on other sites More sharing options...
Duion Posted February 1, 2018 Share Posted February 1, 2018 Is there then still a benefit in using dds compared to just using pngs? Quote Link to comment Share on other sites More sharing options...
Timmy Posted February 1, 2018 Share Posted February 1, 2018 Is there then still a benefit in using dds compared to just using pngs? apart from floating point support, no not really, just neater having a one liner in the material file and one file per sky. Going a bit off topic now, there is also support in dev branch for BC5 (aka 3Dc or ati2n) normal maps. As you can see i am not very good at documenting stuff :D Quote Link to comment Share on other sites More sharing options...
Duion Posted February 1, 2018 Share Posted February 1, 2018 So just use pngs. Quote Link to comment Share on other sites More sharing options...
Timmy Posted February 1, 2018 Share Posted February 1, 2018 Well if you prefer having 6 files instead of one, slower load times (sorry forget to mention that one) and no floating point support than sure ;) Quote Link to comment Share on other sites More sharing options...
Duion Posted February 1, 2018 Share Posted February 1, 2018 Oh I misread that, yes having 1 files may actually be a benefit, but I have yet to see an example how such file will look like and about floating point I have no idea what it does at all. Quote Link to comment Share on other sites More sharing options...
Johxz Posted February 1, 2018 Share Posted February 1, 2018 Oh I misread that, yes having 1 files may actually be a benefit, but I have yet to see an example how such file will look like and about floating point I have no idea what it does at all. not problem using dds, look pretty good as usual.http://forums.torque3d.org/viewtopic.php?f=17&t=214&p=9196#p9196 Quote Link to comment Share on other sites More sharing options...
Timmy Posted February 1, 2018 Share Posted February 1, 2018 Oh I misread that, yes having 1 files may actually be a benefit, but I have yet to see an example how such file will look like and about floating point I have no idea what it does at all. When i get chance over the weekend i'll start a new thread (i have hijacked this one enough :D ) and post a few examples and explain it all properly. Quote Link to comment Share on other sites More sharing options...
Duion Posted February 2, 2018 Share Posted February 2, 2018 Oh I misread that, yes having 1 files may actually be a benefit, but I have yet to see an example how such file will look like and about floating point I have no idea what it does at all. not problem using dds, look pretty good as usual.http://forums.torque3d.org/viewtopic.php?f=17&t=214&p=9196#p9196That has not a gradient, try an mostly empty sky with a very fine gradient, that is where the compression often fails, if it is all fizzy, then you do not notice the artifacts. Which format did you use? Quote Link to comment Share on other sites More sharing options...
Bloodknight Posted February 2, 2018 Share Posted February 2, 2018 If compression is causing problems stop using compression after all this is why in general we stopped using jpegs, and DDS files come with uncompressed options. Compression is only one of the handful of different advantages you get from using DDS it will still likely be a net gain using uncompressed DDS over PNGs.I suspect that given the interest in reflections with a chrome effect then quality probably trumps performance in this particular case, its been a while since I read about DDS skymap formats, but i seem to recall there being a number of benefits to using them anyway. I'll see if I cant refind the page... I probably bookmarked it :) Quote Link to comment Share on other sites More sharing options...
subabrain Posted February 3, 2018 Author Share Posted February 3, 2018 Hello again :Pi just want to ask if the gui bug is fixed?thanks a lot!edit: okay i tried but its not fixed yet :/ - but no problem - i just use the script way ;)greetzRobert Quote 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.