• Welcome to PiBoSo Official Forum. Please login or sign up.
 
May 05, 2024, 12:27:35 AM

reflective gauge lens

Started by h106frp, February 25, 2016, 04:54:30 PM

Previous topic - Next topic

Hawk

Quote from: h106frp on February 27, 2016, 06:24:54 PM
Starting to think its something to do with the way that blender/fbx file handles material. Managed to get it shiny lenses once by accident but could not repeat the effect on purpose  :(

Just as a test - Try deleting all your construction history before you export from blender to .fbx, but make a backup copy of your work first before you delete the construction history.

I've had strange things happening with my textures not rendering properly in GPB when I've exported from Maya to .fbx without deleting my construction history first before using the FBX2EDF Exporter, but when I deleted my construction history everything rendered as it should - Not sure whether to report that as a bug yet because I'm still not sure what was causing the rendering issues.  :-\

Hawk.

h106frp

February 27, 2016, 11:18:56 PM #16 Last Edit: February 28, 2016, 12:14:40 AM by h106frp
Finally worked something out something,

I was moving the export fbx file to another folder with the fbx2edf converter in it and the shader files were in the same folder.

After having the thought of reading through an ascii fbx i noticed that all the textures are referenced to the original folder i used to load them into blender.  ::)

So moving the shader files to the original folder (but still running fbx2edf in another folder) and hey presto i have shininess in game so at least i know how that bit works now. Would have realised hours earlier if the fbx2edf had some log output for shader processing.

Still do not have the reflection model but at least i know how to get shader processing working now so a bit more confident on texturing
the rest of the model.


Did it  :) Looks very cool with reflection and shininess - much more convincing, just need to work on the maps and effect balance but i can leave that for later now.

Hawk

Quote from: h106frp on February 27, 2016, 11:18:56 PM
Finally worked something out something,

I was moving the export fbx file to another folder with the fbx2edf converter in it and the shader files were in the same folder.

After having the thought of reading through an ascii fbx i noticed that all the textures are referenced to the original folder i used to load them into blender.  ::)

So moving the shader files to the original folder (but still running fbx2edf in another folder) and hey presto i have shininess in game so at least i know how that bit works now. Would have realised hours earlier if the fbx2edf had some log output for shader processing.

Still do not have the reflection model but at least i know how to get shader processing working now so a bit more confident on texturing
the rest of the model.


Did it  :) Looks very cool with reflection and shininess - much more convincing, just need to work on the maps and effect balance but i can leave that for later now.

So you did all that through exporting via the FBX2EDF Exporter? You didn't have to create shader.shd text files?

Hawk.

h106frp

No, still need the shader files, the problem was directory referencing - the shader files needed to be in the same folder as the original texture files that i imported into blender even though i could run fbx2edf from a different folder containing the fbx model file.

I wrongly assumed the shader files needed to be in the same folder as fbx2edf but all textures reference to their original folder.

Need to experiment a bit with the maps but have managed to get some accidental nice effects on the windshield - actually looks like clear acrylic  :)

Steven

From PiBoSo's Track Creation Rules:
"Shaders are linked to textures. To apply a shader to a texture, create a text file with extensions SHD in the same directory and the same name of the texture file."  ;)

h106frp

I had all the textures, model file, shaders and fbx2edf in the same directory ;) ....

It just was not the directory i had used when i first created the model in blender  and it was only looking at the ascii fbx file i realised that the texture paths are hard coded in the export file and not relative to the current file location.

I guess this makes the fbx file 'non-portable' in many ways.

Steven

February 29, 2016, 02:34:03 PM #21 Last Edit: February 29, 2016, 02:39:25 PM by Steven
Ah ok, didn't sound like that.

If you had to make it portable for some reason, change "Path Mode" to "Copy" and tick the button to the right to embed the textures into the fbx (FBX 7.4 binary and textures applied with materials only) or leave it unticked to have a new folder with the textures next to the fbx.

Hawk

Quote from: h106frp on February 29, 2016, 02:07:38 PM
I had all the textures, model file, shaders and fbx2edf in the same directory ;) ....

It just was not the directory i had used when i first created the model in blender  and it was only looking at the ascii fbx file i realised that the texture paths are hard coded in the export file and not relative to the current file location.

I guess this makes the fbx file 'non-portable' in many ways.

To export "media"(textures) with your fbx export you need to set your fbx export options to save as binary file not ascii. The fbx export will then generate a folder .fmb with all your textures and media inside addressed relatively to you model.  The fbx format was specifically designed to be portable between most digital media applications. ;)

Hope this helps mate.  :)

Hawk.

h106frp

Normally i use the binary, it was only to try and problem solve that i exported an ascii.

Thanks Steven, i now understand what some of the options are for in the binary exporter.

Learn a little more each day  ;)