Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
Serious bug with the CCB import option

j9907
Registered User
Quote
2018-10-09 21:02:45

Well, my project has some "smoke and mirrors" going on in order to accomplish certain things :) That would explain the rather high amount of nodes. That and there are tons of lights.


The way I'm making this level in particular is quite clever: The level itself is a 3-floor apartment building. What I did is I split up each floor (including a laundry room and furnace area) into separate models and I made the lighting as good as I could for each section (in separate CCB files), and, once done, I'd import the CCB into a new file and then work on sequencing the gameplay parts. This has 2 advantages: the first of which is if I need to tweak the lights, I can simply load the CCB for that area and fix it up / improve it after taking notes on how it looks in-game, and then export and reimport the area. That, and for 2 of the floors in the building I added some water surfaces and flattened them so it mimics floor reflections in the lobby and in the kitchen area! :) Oh, and when the player is on floor 1, it hides floors 2 and 3, and vice versa for all the others

I am also deleting any unused scene nodes where possible. So, for instance, when the game shows a hint and switches back to the main camera, I will have it delete that node since it won't be seen again by the player.


I plan on announcing the project either soon or near it's completion since I will feel overwhelmed if I announce it now and many people show interest and then I feel obligated to rush myself...


j9907
Registered User
Quote
2018-10-09 22:44:42

I just made a post on the announcements page, srfstudio :)


Also: I just figured out why the memory usage was so damn high: My textures. I compressed them and it went from 100 MB for one area to 13 MB


srfstudio
Registered User
Quote
2018-10-10 17:27:54

Yes, in most of my games nicely compressed images lower my game's weight by around 80% :)

Btw we are more-less implementing the same methods in our games :) The only differences are that I'm creating & than importing my geometry from Blender and using visible/invisible geometry just for animated models (my static geometry is brutally optimized so it has almost no impact on fps).

The only thing that I don't get is why are you destroying notifications & not just re-use them with different texts? But I guess they may be differently shaped depending on their function.


j9907
Registered User
Quote
2018-10-10 19:00:55

In regards to notifications: I am doing that because I want my textboxes to look really nice (I have a template for the dialog box and I am typing out the dialog on it in Gimp)


j9907
Registered User
Quote
2018-11-29 00:54:32

I found out why this occurs: If you import one CCB, it works as intended. Import 2 CCB's and then the second one and all future ones get ruined and mangled up!


j9907
Registered User
Quote
2018-11-29 01:01:02

wrote:
I'm not using CC native lightmapper & I could be a waaay off on this issue but...

When I calculated lightmaps for a 3d model with multiple textures, I've noticed that lightmaps (actual image files) are not shown in CC 'Texture' tab & that I can see them only through 'irrEdit - IrrLicht Properties' tab. Not only that but they are all stored internally with 'internal_lightmap1' path & name.

What may be happening is that, once you import one level into another level, the lightmaps paths, names & references become messed up.

I would suggest that you export lightmaps into accessible image files by running the level in WebGL mode. The images will be exported into 'copperlichtdata' folder and you can copy them into folder of you choosing. From that folder you can re-name & re-apply them onto your model in CC so that you can get a non-internal image path with unique image name in CC.

I could be way off but if you haven't tried it maybe it could solve the issues.



I think this is what's happening, and yes! Copying the lightmapped images and then manually applying them to the materials and setting the attribute to "lightmap" works like a charm. Thanks!

So, for reference Niko: This is what happens:

When you import a CCB with global illumination (and shadows too I think), it forgets what lightmap images were on which material and it scrambles them. Exporting as a WebGL project, copying the lightmap images and then re-assigning the materials to the correct internal lightmap image fixes it perfectly. Thanks a ton, srfstudio. This saved my project.


srfstudio
Registered User
Quote
2018-11-29 19:38:15

Good to hear that the problem was only about image references, cheers!


j9907
Registered User
Quote
2018-11-29 19:52:08

It's a long-winded solution but it works nonetheless. Now that I think of it: couldn't the lightmaps be altered in image editors now that you found a way to get them exported (not sure if it would be too logical, though I'm sure you could brighten it up)? Niko should make them visible in the texture list/


srfstudio
Registered User
Quote
2018-11-29 20:30:07

Sure, I used to change their Hue/Saturation/Lightness depending on what would fit better with the in-game room or make contrast higher/lower...

If lightmap UVs have a larger margins (at least 3-5 pixels) than you can also try applying blur, it gives a decayed/dirty look to geometry, good for some old machinery or walls :)


j9907
Registered User
Quote
2018-11-29 21:14:42

Wow! Great idea... Thanks for the tip.

In all honesty, the built-in lightmapper is excellent if you use the global illumination option and ignore the standard shadow mode, but my gosh it takes an ungodly amount of time to calculate! I split my levels up into different sections (as you know) and I typically wait a half hour to an hour just to calculate it with that mode. Heaven forbid if it's screwed up in one spot... ;) gotta calculate again!

A lot of my levels are in a factory so that blur tip could help a fair bit!


j9907
Registered User
Quote
2018-11-29 22:39:33

You know, I've come to the conclusion that CopperCube can do some good graphics if you do some crazy tricks :) I just want volumetric lighting via particles for my windows in the levels and then I'll be golden :)


srfstudio
Registered User
Quote
2018-11-29 22:52:36

Yes, that's what CC lightmapper was doing when I tried it on some simple test-geometry: over 1h for Global Illumination :) I thought it was my computer :)

In Blender it takes about 5min for 1024 lightmap, with 2048 (which I usually avoid) it takes longer, everything under 1024 is almost instant :) And you can render the scene before lightmapping to see if everything looks o.k. which takes from 5 to 20 seconds depending on a camera view.

You do have to prepare geometry, that's not a pleasant process. I always separate by material, that way i have less objects & easier way to subdivide them if generated lightmap UV seems 'overcrowded' :)


j9907
Registered User
Quote
2018-11-29 23:28:54

Yeah, it's kinda ridiculous... I can personally wait, but it's a pain. I wonder if the lightmapper uses more than 1 core... Probably not. Imagine if it could use 2 (or even more) cores to process the lighting... I'm thinking I might be splitting the levels into even smaller chunks just so I can have really low-res light settings (in the double digit ranges). As you may know, the lower the resolution, the sharper the detail. Well, the problem is it is very memory intensive! I'd guess if I could split the levels into very small chunks and then just hide them as you get near cubes under the floor (invisible of course), then I can do it that way. I want to push CC's graphical capabilities to the limits.


I wish I knew how to do shader programming. I know PBR shaders exist, but I don't know if any could be adapted for CC!


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "I?ternational" (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