Author Topic: default object transparency  (Read 5181 times)

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
default object transparency
« on: January 11, 2011, 07:37:49 pm »
i set Config.glTransparencyMul to a low value (0.001) for finer control over transparency. but then some of my objects became invisible. seems as Loader.load3DS(InputStream, scale); sets transparency to 100 and in my case this makes my objects almost invisible.

it may make sense if Loader sets transparency to -1.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: default object transparency
« Reply #1 on: January 11, 2011, 08:15:06 pm »
Actually it sets them to whatever the 3ds file says. I don't remember the exact formula that i'm using to convert 3ds' transparency value to jPCT's, but if the object in the file has no transparency set, the loader shouldn't set one either.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: default object transparency
« Reply #2 on: January 11, 2011, 08:36:05 pm »
i see. but that's strange indeed. the objects in question are constructed via 3d Max's primitives and nothing has been set for transparency. maybe 3ds exporter's behaviour changed over time

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: default object transparency
« Reply #3 on: January 11, 2011, 08:43:53 pm »
There's a setting in Config for using the old importer. Have you tried that one, and could that help?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: default object transparency
« Reply #4 on: January 11, 2011, 08:47:46 pm »
i see. but that's strange indeed. the objects in question are constructed via 3d Max's primitives and nothing has been set for transparency. maybe 3ds exporter's behaviour changed over time.
Didn't we had a similar issue with some sky dome in Karga after implementing that feature in the loader? Everything went darker, because the dome now had a transparency set?

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: default object transparency
« Reply #5 on: January 11, 2011, 09:00:45 pm »
So again, does using the old loader solve it?

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: default object transparency
« Reply #6 on: January 11, 2011, 09:03:04 pm »
There's a setting in Config for using the old importer. Have you tried that one, and could that help?
now i tried it but didnt help.

Didn't we had a similar issue with some sky dome in Karga after implementing that feature in the loader? Everything went darker, because the dome now had a transparency set?
to tell the truth, i can't remember

i have a solution, setting transparency to -1. but still seems to me this transparency cames from nowhere ;)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: default object transparency
« Reply #7 on: January 11, 2011, 09:04:35 pm »
It comes from the file. No idea why, but if the loader loads it, it's in there...

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: default object transparency
« Reply #8 on: January 11, 2011, 09:08:58 pm »
agreed. i meant i came from nowhere to file  ;)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: default object transparency
« Reply #9 on: January 11, 2011, 09:10:29 pm »
I'll try to find that skydome issue later...maybe that helps to find out where it comes from.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: default object transparency
« Reply #11 on: January 11, 2011, 09:57:39 pm »
thanks. seems as the same issue as you said. i had found that sky dome from web so i dont how it's exported. so this leads us us to where ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: default object transparency
« Reply #12 on: January 11, 2011, 09:59:03 pm »
Nowhere, i suppose... ;)

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: default object transparency
« Reply #13 on: January 11, 2011, 10:13:42 pm »
Is the current problem related to a sky dome? We have a SkyBox class now on jpct...

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: default object transparency
« Reply #14 on: January 11, 2011, 10:16:18 pm »
no, most of the objects i exported from 3dMax comes with this strange transparency. i just couldnt figure out how they got into 3ds file.

not a real problem indeed. setting transparency to -1 solves the issue.