Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Point Lights behave like Spotlights

dinf
Registered User
Quote
2022-12-16 17:35:09

Hi there, another question ...

Same project "water tank", most of the baked pointlights show a behaviour like a spotlight. Here's another picture where one can see the effect: this light is shining in Z-direction. Not all of them are doing, but minimum 8 of 14, and they came in in the middle of process. I already exchanged one and deleted the original, same.

I have already recalculated all geo normals and then frozen scaling and normalized normals. Then it asked for calculating, now it is 40 lightmaps, before it was 12 materials.
Nearly same effect. The floor of one tank is lit now, thats all.

🔎︎


Again, any idea? Many thanks for every help!


veganpete
Registered User
Quote
2022-12-19 08:00:54

A few things you can try which may help....

You could could try just_in case's "custom point-light" plugin (hosted on itchio and neophytes websites) which allows better lighting of a scene...

https://neophyte.cf/ccb_shader_create_point_light.html[/url]

Or, a few other things I can think of....

Depending on the scale of your scene, try increasing the radius of the light - make sure it has a positive value (eg: +100). It could be that the light-source simply isn't large enough to fill the entire scene.

I think Coppercube supports lighting with up to 4 point-lights, I'm not sure not sure if that means it can calculate up to 4 lights per-texture/material - or if you can only calculate 4 point lights in a scene.

Also make sure that the materials are set to "static light mapped" or "dynamic" otherwise they wont be lit by the light.

Also check that "occludes light" is not set on an object close to the light source as it will stop the light passing to other textures (great for creating creepy shadows).

If you have irrlicht settings enabled, check thatthe light source is "point light", in case it has been set to "spot light".

Try just try adjusting the light position in case it's being occluded by the model - if the light source os too close to a surface, it can affect rendering.

Finally, adjust the scale of your model again - even though you froze scale and normalized normals - when an imported model is black, I find increasing the scale (a lot) and freezing sccale/normalising again often fixes it.

Try inverrting the model (use a minus value on the models x axis) and set the textures to "double-sided" just in case the model has been inverted when it was exported.

Try "remove vertex colours" in case the model has black vertex colours for some reason.

Lastly - if you have used the polygon editor to edit the model in side of coppercube at all- I recommend that you export the model from coppercube, import to another 3D app (such as "meshlab"), export from meshlab, and re-import to coppercube - in case you can reset the normal-tangents of the model (I use ultimate-unwrap for this) - editing a model in coppercube separated the surfaces so the textures don't map properly - you need to weld/join the surfaces outside of coppercube to fix it.

If you're willing to share the scene, I don't mind spending some time on it to see if I can get it to work with point lights (probably other members would do the same and eventually get it working for you).


veganpete
Registered User
Quote
2022-12-19 08:17:05

...also, if you;re using RTL, check that the spotlights are not fighting with realtime lighting (eg: turn off real-time lighting) to test if it's creating problems in the scene. Realtime lighting can sometimes make parts of the scene look black.


veganpete
Registered User
Quote
2022-12-19 08:23:26

..one last thing... you can adjust the entire scene's ambient light from "black" to (example) "30,30,30" to brighten any dark areas and effectively balance the contrast between all the light and dark areas.


VP
Guest
Quote
2022-12-19 11:32:20

Also, something I haven't tested yet but just noticed now is - maybe original axis of model makes a difference to lighting. When I imported a model, it was not x/y/z oriented - it was on its side. I rotated by 90 degrees to make it flat. When I light the scene with static light, the lighting is odd. One side of the model is lit, the other side is dark. Maybe if I re-export with the y axis corrected, it will point-light differently?


dinf
Registered User
Quote
2022-12-19 11:53:34

Hi veganpete, wow, thanks alot!!

Thats a lot of stuff. I'll first try some of your hints and tricks. I can (hopefully) exclude some things.
E.g. some of the point lights worked well, one can see it in some of the screenshots. In the very first tests everything was ok with the lights but the black triangle stuff metioned in the other thread.
The lights were all cloned from the first one. Dark areas are ok, even black, if the rest will do :) Lights are all but the sun set to point. I didn't know that I can check this in irrlight settings, thanks for the hint!
There aren't any dynamic lights in there, static baked light would be perfectly fine in this case.
I'll check the 'pure' import again, maybe it is working better then. Freezing was one of my last trys so I think thats not the main thing. Nevertheless I'll switch it off. The model size is due to the fly-thru camera, i scaled the model to fit the cam size (and then scaled the player cage down ^^).

I would also appretiate very much if you could have a look at the scene, but I don't want to post it online. Maybe you may give me your email, would that be possible?
Again, thanks alot!


FYI: The model comes from C4D wich is not well known for preparing game engine stuff (like: missing tools for manipulating vertex-normals, UDIMs and more). But I think it is me who does not know enough about game engine preparing, especially the UV stuff mentioned in the other thread.


Edit:
"When I imported a model, it was not x/y/z oriented - it was on its side."
Thats right, it was on its side. But some of the lights are working well, thats confusing me.


veganpete
Registered User
Quote
2022-12-19 13:31:02

Sure thing, you can send it to vp@altmails.com and it should forward it to my email. If you can't send the actual file via email, maybe upload it to dropbox and send the link via email. I'll try to export it from ultimateunwrap pro to see if it fixes the lighting. If it does, I'll do a quick tutorial for you. If not, I'll keep trying.


VP
Guest
Quote
2022-12-19 14:46:59

Another thing I just noticed is if you child a light to a node (especially a camera), it doesn't render properly.


Guest
Guest
Quote
2022-12-19 17:01:49

One thing I didn't see VP mention (he may have), is that you need to have a certain level of geometry on your model to get good results. CC's lights are vertex-based, so without the vertices it has nothing to calculate. Your light issue above seems to me to be that you have a plane for the ceiling with very little geometry. Try subdividing the plane for better results. You can do this in CC or in something like Blender. This will be a pain if your level is many pieces. You may want to merge them all together first into one mesh and then subdivide. Of course this means you won't be able to move the pieces around if your level is modular. One final thing: it's general practice to do lighting as one of the last steps in game design. Make sure you're not getting too far ahead of yourself.


Dinf
Guest
Quote
2022-12-20 12:01:12

Thanks a lot!
Yes you are right, it is a big polygon but divided on one spot (small Tunnel to escape). I decided to do so after getting shadow lines on the ground plane which was divided. But if this will make things better, I’ll give it a try and get back to more subdivisions.


dinf
Registered User
Quote
2023-01-19 00:14:46

First let me say thank you all for your help so far! Sry for lately coming back here but I was busy with other stuff and now it is going on with that thing.
Maybe a "happy new year" will still do also :)

Second, I got a solution for the strange shadows and turned lights as well. Therefore I a) turned all axis in Cinema 4D so the model is now right and up after importing. For b) I devided all large Polygons in 2 or 4 smaller polys in C4D. This came up while testing a simplified scene wich gave me a warning after importing and calculating lights. After that, calculating light in the original scene was ok so far. I have to do some corrections and hopefully this was it.

So the shadow thing seems to be all right now. Now I'm hanging a bit with that plugin stuff. Thanks to the hint, I found and bought JIC's "Light Shader v3.4" on his neophyte site but did not get it to run so far. What I want to do is get some metallic and specular looking stuff in the scene as well. After correcting the scene I'll go for that and will have a closer look.


Robbo
Guest
Quote
2023-01-19 02:30:38

Glad you found a solution.

I recently found a problem I have been doing for a long time that will cause strange and uneven shading issues bit like mentioned above - is when I decimate a high poly mesh, the normals get all stuffed up by default. If you import into CopperCube will then show strange shading issues. If you recalculate tangents and binormals in CC typically fixes this but then the nice shading goes away and you get blocky looking mesh instead so not much better so dont use that anymore.

To fix this after decimating in Blender or elsewhere, you need to apply 'Weighted Normal' modifier (Blender) to fix the shading issues (ensure auto smoothing is running @ 60 degrees). This alone will fix a tonne of normal/shading issues. You can also apply 'keep sharp' if you prefer more flatter sections but not always needed. If your using bevelled edges then also can use 'face influence' to better smooth that also.

This will fix all the wrong normal angles and hence wrong shading look. Of course as above you have to have a reasonable amount of polygons to work with so in some cases subdivide (add more polygons).

Hope this helps.


just_in_case
Moderator
Quote
2023-01-19 07:17:08

@dinf, Thanks for the purchase, Can you tell me what is preventing you from running the shader. what issue are you facing, Please let me know so that I can fix it or provide you a solution


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact