![]() |
#1 |
Junior Member
Junior member
Join Date: Jan 2022
Posts: 6
|
![]()
Hello,
I'm using AC3D as a DirectX bridge between Sketchup and a game. A new problem happened today, where the opaque textures came in semi-transparent (most), and the materials set as semi-transparent came is opaque. Being a noob, is there a simple setting for the material transparency? If so, what menu would it be accessed? Attached is a screenshot from the game, where it is more apparent. https://app.box.com/s/kapvel3un7fet1o4w037hnjg5or0yxqt Last edited by SultanPoppa; 26th October 2022 at 12:38 PM. Reason: add attachment |
![]() |
![]() |
![]() |
#2 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,541
|
![]()
It might be best to use (Wavefront) OBJ as an interchange format but if you right-click on a palette button, you can edit the transparency.
In this case it may be best to work out a text editor search/replace to fix the transparency in the model file (if it's a text file) |
![]() |
![]() |
![]() |
#3 |
Junior Member
Junior member
Join Date: Jan 2022
Posts: 6
|
![]()
Thanks Andy, I do see some similar problems related to transparency when importing a model from a .OBJ or a .X file. Semitransparent materials somehow all come into AC3D as maroon. Is there a description on how to use a text editor to fix those?
Examples: Before Import: https://app.box.com/s/kavrs0448s69ey8rkiwvef67c07h7wus AC3D: https://app.box.com/s/z9xrw1e9m557up64oe1vg72o7k9ayy4n Last edited by SultanPoppa; 7th December 2022 at 01:30 PM. |
![]() |
![]() |
![]() |
#4 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,541
|
![]()
I'd suggest using the search and replace function in a good editor. I like notepad++.
|
![]() |
![]() |
![]() |
#5 |
Junior Member
Junior member
Join Date: Jan 2022
Posts: 6
|
![]()
Hi Andy, yes, but I do not see how to reset the color number or transparency. For example, here is what I see in the X file for this material:
Frame Translucent_Glass_Blue { FrameTransformMatrix { 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0;; } So I do not see where I can control the color or transparency value. Any suggestions? |
![]() |
![]() |
![]() |
#6 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,541
|
![]()
That looks like a geometry transformation matrix and nothing to do with the transparency.
look for rgb color definitions, it may be with that. |
![]() |
![]() |
![]() |
#7 |
Junior Member
Junior member
Join Date: Jan 2022
Posts: 6
|
![]()
I did a search in the file for the RGB definition for this color (324b77) which did not appear in the file. I've tried looking for the hex conversion as well, (50,75,119) again without luck.
Is there a tutorial for how to edit colors and transparency from a text editor? |
![]() |
![]() |
![]() |
#8 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,541
|
![]()
Thinking about this, the easiest way to handle it is to save the ac3d .ac file and edit that.
Each material has a line at the beginning of the file e.g.: MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.2 0.2 0.2 shi 128 trans 0 whatever number follows "trans" is the transparency. Set it to "0" and that will make it non-transparent. |
![]() |
![]() |
![]() |
#9 |
Junior Member
Junior member
Join Date: Jan 2022
Posts: 6
|
![]()
Thanks Andy, I think I'm making some headway now. For semi-transparent materials such as glass, what do I want to set that at? For example what range of settings is there for transparency 0 to 1? I see "trans 1.10703e-43" on just about all the materials.
Also the area in the attached image shows a darker rendering when exported to DirectX. The light area around the name should match the rest of the light cream color as the hull surrounding it. https://app.box.com/s/ge4sg6f3fgiloqjf4i4xxyx68akv2glr The texture that is too dark is called "Name_Texture_1" and the settings are: MATERIAL "NAME_TEXTURE__1_" rgb 0.611765 0.47451 0.388235 amb 0 0 0 emis 0 0 0 spec 0.2 0.2 0.2 shi 128 trans 1.10703e-43 The surrounding area is called "EF_House_Texture_1" and the settings are: MATERIAL "EF_House_Texture_1" rgb 0.941176 0.929412 0.894118 amb 0 0 0 emis 0 0 0 spec 0.2 0.2 0.2 shi 128 trans 1.10703e-43 Thanks for the help - SP |
![]() |
![]() |
![]() |
#10 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,541
|
![]()
You need the trans value to be 0 to switch off transparency.
The texture may not have the correct transparency setup. PNGs are probably the best format to use. Lovely model BTW! |
![]() |
![]() |
![]() |
Tags |
material, transparency |
Thread Tools | |
Display Modes | |
|
|