Light intensity
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Re: Light intensity
I think you don't even need the alpha=0 border.
Just set the node with alpha mode to wrap to black and you're done.
Just set the node with alpha mode to wrap to black and you're done.
Re: Light intensity
In your image in the previous post the rock keeps repeating and the character listening to music has no alpha channel.
One other thing,is it normal behavior in the imagemap node the wrap modes(clamp,white,black) to only work with the default channel?
In any other case of channel the texture keeps repeating.
One other thing,is it normal behavior in the imagemap node the wrap modes(clamp,white,black) to only work with the default channel?
In any other case of channel the texture keeps repeating.
Re: Light intensity
It was a bug that is now fixed in LuxCore. You need to recompile to get the fix.
Yes, both is like it should be. The rock is set to repeat and the character has a blue background, only the edge pixels have alpha=0.
It is an example, you can change lots of settings (or the 2D mappings of the textures) to make it look like you want.
Re: Light intensity
Is it possible that this isn't working anymore? I'm setting "scene.textures.texture1.wrap = clamp" but it still works like "repeat"
Re: Light intensity
It seems to still work here, can you post your test scene ?
Re: Light intensity
Hmm, you're right it is working, but not as I expected. I guess my issue is that I'm loading textures from memory and not from files. I noticed that "DefineImageMap" accepts wrapping type and when I set it there it works!
The way I work with textures is:
I use
Code: Select all
DefineImageMap("myimage", ...)
Code: Select all
scene.textures.texturename.type = imagemap
scene.textures.texturename.file = myimage
scene.textures.texturename.wrap = clamp
Is this usage wrong? If I use DefineImageMap, can this image map only be used with wrapping specified when defining it? Is there a reason why image map cannot be used with differrent wrap types in different textures?
Re: Light intensity
Mmmm, I'm checking the code: https://github.com/LuxCoreRender/LuxCor ... he.cpp#L83valenn wrote: ↑Thu Nov 21, 2019 9:14 am Hmm, you're right it is working, but not as I expected. I guess my issue is that I'm loading textures from memory and not from files. I noticed that "DefineImageMap" accepts wrapping type and when I set it there it works!
The way I work with textures is:
I useand then use it asCode: Select all
DefineImageMap("myimage", ...)
(wrap is ignored here and what was passed to DefineImageMap is used)Code: Select all
scene.textures.texturename.type = imagemap scene.textures.texturename.file = myimage scene.textures.texturename.wrap = clamp
Is this usage wrong? If I use DefineImageMap, can this image map only be used with wrapping specified when defining it? Is there a reason why image map cannot be used with differrent wrap types in different textures?
You should get an error in the case you described because:
1) The image cache checks if the image has been defined. The warp mode is part of the cache key so it is not found (you have defined "myimage" with a different wrap mode). File name, gamma, selection type, storage type, wrap type are all part of the cache key.
2) The cache entry "myimage" is not found so the image cache try to load a file with name"myimage".
3) You should get a file not found error (I assume the "myimage" doesn't exist).
Aren't you receiving an error ?
Re: Light intensity
I see no errors. Console output looks like this (relevant part)Dade wrote: ↑Thu Nov 21, 2019 9:41 am
Mmmm, I'm checking the code: https://github.com/LuxCoreRender/LuxCor ... he.cpp#L83
You should get an error in the case you described because:
1) The image cache checks if the image has been defined. The warp mode is part of the cache key so it is not found (you have defined "myimage" with a different wrap mode). File name, gamma, selection type, storage type, wrap type are all part of the cache key.
2) The cache entry "myimage" is not found so the image cache try to load a file with name"myimage".
3) You should get a file not found error (I assume the "myimage" doesn't exist).
Aren't you receiving an error ?
Code: Select all
[SDL][121.907] Define ImageMap: image_0
[SDL][121.954] Texture definition: texture_0
[SDL][121.954] Material definition: material_0
[SDL][121.969] Scene objects count: 1
If correct usage is to define 2 image maps (with different names) in the event I want to use it with both clamp and repeat in different textures, I'll just do that
Re: Light intensity
Yes, it should be an effective workaround. Anyway I will try to reproduce the problem here and check why you don't get an error.
Re: Light intensity
I was wrong this is the correct list of steps:Dade wrote: ↑Thu Nov 21, 2019 9:41 am Mmmm, I'm checking the code: https://github.com/LuxCoreRender/LuxCor ... he.cpp#L83
You should get an error in the case you described because:
1) The image cache checks if the image has been defined. The warp mode is part of the cache key so it is not found (you have defined "myimage" with a different wrap mode). File name, gamma, selection type, storage type, wrap type are all part of the cache key.
2) The cache entry "myimage" is not found so the image cache try to load a file with name"myimage".
3) You should get a file not found error (I assume the "myimage" doesn't exist).
Aren't you receiving an error ?
1) The image cache checks if the image has been defined by a DefineImageMap(). Only the name is part of the cache key. If it is found, the stored image map is used, regardless of the asked gamma, wrap mode, etc.
2) If it is not found, the image cache checks if the image has been loaded from a file. File name, gamma, selection type, storage type, wrap type are all part of the cache key. If it is found, the stored image map is used.
3) If it is not found, the image cache try to load the image from file.
4) If it is not found, an image not found error is thrown.
This explain the behavior you were observing. So to recap: if DefineImageMap() is used, only the name does matter and the DefineImageMap() parameters wins over the properties one.
I agree, this is a bit not unexpected and counter intuitive but it is required to have some mechanic related to "AUTO" setting to work (like automatic storage type).