Go Back   AC3D Forums > General > AC3D General
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 26th October 2022, 12:37 PM   #1
SultanPoppa
Junior Member
Junior member
 
Join Date: Jan 2022
Posts: 6
Default Semi transparent textures when importing SKP

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
SultanPoppa is offline   Reply With Quote
Old 4th November 2022, 05:13 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Semi transparent textures when importing SKP

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)
Andy is offline   Reply With Quote
Old 7th December 2022, 01:23 PM   #3
SultanPoppa
Junior Member
Junior member
 
Join Date: Jan 2022
Posts: 6
Default Re: Semi transparent textures when importing SKP

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.
SultanPoppa is offline   Reply With Quote
Old 7th December 2022, 01:30 PM   #4
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Semi transparent textures when importing SKP

I'd suggest using the search and replace function in a good editor. I like notepad++.
Andy is offline   Reply With Quote
Old 7th December 2022, 04:37 PM   #5
SultanPoppa
Junior Member
Junior member
 
Join Date: Jan 2022
Posts: 6
Default Re: Semi transparent textures when importing SKP

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?
SultanPoppa is offline   Reply With Quote
Old 7th December 2022, 04:40 PM   #6
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Semi transparent textures when importing SKP

That looks like a geometry transformation matrix and nothing to do with the transparency.

look for rgb color definitions, it may be with that.
Andy is offline   Reply With Quote
Old 7th December 2022, 05:49 PM   #7
SultanPoppa
Junior Member
Junior member
 
Join Date: Jan 2022
Posts: 6
Default Re: Semi transparent textures when importing SKP

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?
SultanPoppa is offline   Reply With Quote
Old 8th December 2022, 06:53 AM   #8
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Semi transparent textures when importing SKP

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.
Andy is offline   Reply With Quote
Old 27th December 2022, 01:07 PM   #9
SultanPoppa
Junior Member
Junior member
 
Join Date: Jan 2022
Posts: 6
Default Re: Semi transparent textures when importing SKP

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
SultanPoppa is offline   Reply With Quote
Old 28th December 2022, 11:43 AM   #10
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: Semi transparent textures when importing SKP

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!
Andy is offline   Reply With Quote
Reply

Tags
material, transparency

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 05:27 PM.


AC3D Forum
(C) Inivis Limited 2020