ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperLicht
forum topic indicator Possible to generate content on the fly?
person icon
maddogx
Registered User
Quote
2010-02-10 21:57:33

Hi there!

I'm new to CopperLicht, stumbled over a news article about it today - and I've got to say I'm impressed. I tried a few of the tutorials, using the trial version of CopperCube with the latest Firefox dev build and it's pretty amazing.

Now, the main reason for my interest in CopperLicht is that a few friends and I are developing a browser based space strategy game (similar to Sins of a Solar Empire). Much of the basic server backend and UI are working and I've spent some time creating and testing rudimentary unit control interfaces with the 2D functions of the HTML5 canvas element. This sort of works, but not as well as I had hoped.

After testing CopperLicht I'm thinking it could be right up our alley. The thing is, the galaxy in our game is generated completely on the fly. Solar systems can be pretty complex, each one is unique. Each planet is visually unique (currently only a 2D image is generated, but we would obviously switch to generating 3D maps for spheres), so the scene for each solar system would have to be generated on the fly by adding planets and applying the pre-generated texture files.

I guess what I'm trying to say is, is it somehow possible to generate a CopperLicht scene without having to manually create it in CopperCube? Now I'm aware that CopperCube is the main commercial product here and I don't expect to create scenes for free. Does CopperCube perhaps have an API that could be accessed from PHP or Python in order to generate scenes?

Any help would be appreciated.

person icon
niko
Moderator
Quote
2010-02-10 22:31:57

Yes, this is completely possible, quite easily. You can use CopperLicht also without CopperCube, btw.
Take a look at the third and fourth tutorial, it shows how to use the engine for example without any editor. In that way, you can also create star or galaxies on the fly. Texture loading etc is also possible during runtime.

person icon
maddogx
Registered User
Quote
2010-02-10 22:43:18

Thanks for the quick answer. emoji icon_smile

I was actually just reading through the later tutorials and discovered the part on creating scenes without the editor (in the custom scene nodes tutorial). I feel kind of stupid for coming here and asking when the answer was right there, if I had just been more patient.

This seems to be exactly what we need. I'm excited as hell emoji icon_grin. Thanks for creating this awesome product!

Once we've got some proof of concept material I'll be sure to come by here and post some of it.

person icon
niko
Moderator
Quote
2010-02-11 07:10:05

Ok, nice :)
One tip: You could also create your scene in the editor if it is a more complex one, with some planets etc, and use those planet or star models in the scene as templates: Simply clone and reposition them, and change their positions to make the scene look as you need.
Could be easier than just generating everything on the fly.

person icon
maddogx
Registered User
Quote
2010-02-15 11:08:25

I considered that, but after some initial trial and error I was able to generate stars, planets and moons on the fly. This method also allows for LOD adjustments, which is a big plus. The API is indeed a very powerful thing. :)

There are some things I'm missing from the API documentation though. For one, I can find nothing on lights. So far my generated scenes are globally lit, making the suns look rather useless. How can I add radial lights?

Another thing I've been trying to find out is how to use the copperlicht.createMaterialType functionality, as I would like to use specular maps. This function is referenced under Materials, but not explained anywhere.

person icon
niko
Moderator
Quote
2010-02-15 16:58:33

Hi,
dynamic light is not yet supported, it's the first alpha version after all. But it is planned to add this feature very soon. Same for the createMaterialType functionality.

For the dynamic light: You could try to use static lightmaps or textures with painted lighting as workaround for the moment.

person icon
maddogx
Registered User
Quote
2010-02-15 17:17:38

Okay, no worries. Dynamic lighting can wait. emoji icon_smile

Is there any way to help you out with development, bug reporting or somesuch? I found a bug with the AnimatorFollowPath class and was able to find and fix it in the CopperLicht code, but I thought it might be good to get stuff like that back to you. emoji icon_blink

person icon
niko
Moderator
Quote
2010-02-15 18:01:07

Yes, sure, you could help by sending in bugs you found, like the one with the FollowPath-Animator you mentioned. Simply send them per mail or the contact form and I'll try to fix them.


Create reply:










 

  

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


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






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