#Wash out texture when import

74 messages ยท Page 1 of 1 (latest)

rain apex
#

Here's the code dealing with the texture import part

#
loader = new THREE.CubeTextureLoader();
texture = loader.load([
  `./panorama/${environmentType}/skybox_0.png`,
  `./panorama/${environmentType}/skybox_1.png`,
  `./panorama/${environmentType}/skybox_2.png`,
  `./panorama/${environmentType}/skybox_3.png`,
  `./panorama/${environmentType}/skybox_4.png`,
  `./panorama/${environmentType}/skybox_5.png`
]);
scene.background = texture;
#

Note: The ${environmentType} is just a selection thing, don't care much about it

agile geyser
#

set texture.colorSpace=THREE.SRGBColorSpace for each texture
and if you are using ACESFilmic encoding it'll make it look different too

rain apex
#

So like this

#
texture.colorSpace=THREE.SRGBColorSpace
texture = loader.load([
  `./panorama/${environmentType}/skybox_0.png`,
  `./panorama/${environmentType}/skybox_1.png`,
  `./panorama/${environmentType}/skybox_2.png`,
  `./panorama/${environmentType}/skybox_3.png`,
  `./panorama/${environmentType}/skybox_4.png`,
  `./panorama/${environmentType}/skybox_5.png`
]);```
#

Hmm

#

Uncaught TypeError: Cannot set properties of undefined (setting 'colorSpace')

agile geyser
#

mmm no , it has to be added on each THREE.Texture instance

what does 'texture=' variable contain ? its an array of THREE.Textures ?

rain apex
agile geyser
#

before dealing with textures

are you using renderer.toneMapping = ACESFilmicToneMapping ?

rain apex
#

Doesn't seem like it

#

But

#

I have these thing

agile geyser
#

oh , try commenting that ReinHard line and make the exposure value 1

worthy needle
#

I believe texture in your code is an array of Texture objects. You'd have to set the color space on the individual texture objects in the array, and do it after you load.

rain apex
#

Bruh

#

Thank you so much

#

@agile geyser

#

You're the best

#

๐Ÿ™Œ

agile geyser
#

ah ! ๐Ÿป

rain apex
#

LOL

#

!close

glacial breachBOT
rain apex
#

@agile geyser

#

Remove ToneRemapping fix the Background texture

#

But it messes up my Model

#

Is there a way to exclude ToneRemapping effect on the scene.background?

agile geyser
agile geyser
#

Oh yeah try the skybox

rain apex
#

I've never touched skybox

#

Hmm

#

Can I project 6 images onto a sphereGeometry?

#

Or I need to merge them first into 1 finalized texture and project it onto sphere?

rain apex
#

I think I overloaded it

#

LOL

rain apex
#

@agile geyser

#

Im done with the Skybox

#
let skyboxGeo = new THREE.BoxGeometry( 2000, 2000, 2000);
let skybox = new THREE.Mesh( skyboxGeo, materialArray );
scene.add( skybox );
#

How can I stop the ToneRemapping again?

agile geyser
#

What does material array contain?

For each material add

toneMapped=false

rain apex
# agile geyser What does material array contain? For each material add toneMapped=false
let materialArray = [];
let texture_ft = new THREE.TextureLoader().load( './panorama/nether/skybox_0.png');
let texture_bk = new THREE.TextureLoader().load( './panorama/nether/skybox_1.png');
let texture_up = new THREE.TextureLoader().load( './panorama/nether/skybox_2.png');
let texture_dn = new THREE.TextureLoader().load( './panorama/nether/skybox_3.png');
let texture_rt = new THREE.TextureLoader().load( './panorama/nether/skybox_4.png');
let texture_lf = new THREE.TextureLoader().load( './panorama/nether/skybox_5.png');
  
materialArray.push(new THREE.MeshBasicMaterial( { map: texture_ft }));
materialArray.push(new THREE.MeshBasicMaterial( { map: texture_bk }));
materialArray.push(new THREE.MeshBasicMaterial( { map: texture_up }));
materialArray.push(new THREE.MeshBasicMaterial( { map: texture_dn }));
materialArray.push(new THREE.MeshBasicMaterial( { map: texture_rt }));
materialArray.push(new THREE.MeshBasicMaterial( { map: texture_lf }));
   
for (let i = 0; i < 6; i++)
  materialArray[i].side = THREE.BackSide;
   
let skyboxGeo = new THREE.BoxGeometry( 2000, 2000, 2000);
let skybox = new THREE.Mesh( skyboxGeo, materialArray );
scene.add( skybox );
#

So each texture_face, I need to set toneMapped = false?

#

Thanks

agile geyser
#

also try

texture_ft.colorSpace=THREE.SRGBColorspace

for each texture

rain apex
#

Yeah I know

#

Hmm

#

In THREEJS is there a framework to change texture Saturation?

agile geyser
#

no

put the image through a html canvas

or use postprocessing (which will affect everything )

rain apex
#

Hmm

#

I will try HTML canvas method then

#

Thanks Vis! You're the best!

#

๐Ÿ™Œ

rain apex
#

Hey @agile geyser

#

You know the "Closest neighbour" option in scaling?

#

How can we apply that in THREEJS?

rain apex
#

I found the answer using ChatGPT lol

hollow ember
#

Threejs can make a skybox with only this texture ?

worthy needle
hollow ember