ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Feature requests and bug reports
forum topic indicator request to sven
person icon
swordmaster
Guest
Quote
2025-03-30 01:09:33

Guest to apply color in all mesh or all materials from one dinamic mesh node, is necessary add the action equal the number of materials you want affect manually, I made here in my tests and work perfect, I think only detail is necessary for the action works right in this way I wrote, is puting set all buffers off from each actions used to apply colors in each materials select from one dinamic mesh node.
But don t worry about this, for what I want the action works perfectly.

person icon
guest
Guest
Quote
2025-03-30 01:20:36

i will look at it tomorrow and see. i think the animated meshes can be fixed if you manually input the buffer count. we shall see. yes i willl do the others, too. cheers. now i go play duke3d.

person icon
swordmaster
Guest
Quote
2025-03-30 01:39:11

I problaby know this game, problaby is duke nukem 3d one first person shooter, I played this game I loved the criogenic weapon, To be sincerely I played many games from this series started from duke nukem 2d one and two plattaform game; I played too the duke nukem mahanthan project 3d plattaform game; I only not played yet the duke nukem forever 3d modern first person shooter. Good duke3d for you

person icon
guest_guest
Guest
Quote
2025-03-30 16:50:37

yeah i am big fan of old school shooters. i've not even played duke forever. didn't look as good as the retro one to me. shame, too. here i simplified the script.
/*
<action jsname="action_swordmaster" description="swordmaster">
<property name="Node" type="scenenode" />
<property name="Material" type="int" default="0" />
<property name="Type" type="string" default="solid" />
<property name="Ambient" type="color" default="ffffffff" />
<property name="Emissive" type="color" default="ff000000" />
</action>
*/

action_swordmaster = function () {};

action_swordmaster.prototype.execute = function () {
var node = this.Node;

var decToRGB = function (color) {
var r = (color & 0xff0000) >> 16;
var g = (color & 0x00ff00) >> 8;
var b = color & 0x0000ff;
return new vector3d(r, g, b);
};

var hexCode = function (rgb) {
var hex = Number(rgb).toString(16);
if (hex.length < 2) {
hex = "0" + hex;
}
return hex;
};

var ambient = decToRGB(this.Ambient);
var emissive = decToRGB(this.Emissive);

ambient =
hexCode(ambient.x) +
hexCode(ambient.y) +
hexCode(ambient.z);
emissive =
hexCode(emissive.x) +
hexCode(emissive.y) +
hexCode(emissive.z);


ccbSetSceneNodeMaterialProperty(node, this.Material, "Type", this.Type);
ccbSetSceneNodeMaterialProperty(node, this.Material, "Ambient", ambient);
ccbSetSceneNodeMaterialProperty(node, this.Material, "Emissive", emissive);
};


the issue with setting all the buffers is changing the type on them all is going to cause issues with animated meshes since some of them are solid and other transparent, i guess. let me know what you think. i will do the light next.

person icon
guest
Guest
Quote
2025-03-30 17:15:46

hmm it doesn't appear i can get the irrlicht properties for the lights with code. all i seem to be able to change is the color, radius, direction. you can change the ambient color in the root node. one issue is type returns just light, not point/spot/directional... so i can't even distinguish them from one another. well, let me know what you think.

person icon
swordmaster
Guest
Quote
2025-03-30 20:35:51

Guest about old or retro games, I like many of them, normally and big number of this game need to run in dosbox, and these old fps make confuse if is real 3d engine or 2d raycasting 3d simulation.
You would try if you didn t this game made in coppercube follow the old fps style game except by the camera system.

https://andgameplay.itch.io/hunter-shooter

The andgameplay have others interesting fps game, but retro I think is only this.

This other game is good too, this game only have one problem there is no health item to restore life of character:

https://www.ambiera.com/forum.php?t=10594
https://samgamesio.itch.io/duzakh-beta

Other option if is windows user and have doom 2, is use the gzdoom that allow play many amazing mods, and many is completely diferent from original doom 2, examples is brutal wolfenstein, hd heretic, hd hexen, and one that today is considering very loved total chaos.

https://zdoom.org/downloads
https://www.moddb.com/mods/total-chaos

About the action dinamic color mesh node, I belived this limitation problaby would happen, I think is associated to the fact the coppercube in this color system apply color for each material slot and how you said each material slot have it own proprieties, belive or not is very positive because this allow more freedom to apply light and color effects over one model, create constrast effect for example.
At moment I wrote this post I didn t test your new script version specially because after I read your message I was gone to read the api coppercube documentation trying find some extra information before write this message. But don t worry like I said, the action work perfect for what I want to do in coppercube.

person icon
swordmaster
Guest
Quote
2025-03-30 20:36:44

Guest about the light, is one very interesting thing about this is in the api we can t find nothing to allow acess this others proprieties from IrrEdit - Irrlicht, I made one strong search and read, and I think too possibilities; first possibility is the Niko didn t have create none way to acess these proprieties using API from coppercube; the second possible answer is he didn t put these informations in API document because he didn t considered relevant, since this proprieties comes from the IrrEdit older program, at I understand Niko use the Irrlicht to create IrrEdit (one graphic editor for 3d levels to used in fork applications like game engines made with irrlicht system like core system), then he used IrrEdit like base to create coppercube game engine; some function present in last version of IrrEdit was replaced, erased or others forgotten by Niko, is little complicate for me have one real and substancial answer about this because I read in some posts here in forum about things like instance
variables if I am not wrong (I don t have certain, I made one search in the forum but ate this post I didn t find one reference), in this case he didn t documented the existence and how to acess the instance variable. examples of things not documented:

https://www.ambiera.com/forum.php?t=7569
https://www.ambiera.com/forum.php?t=12877

Then the most problably answer is Niko didn t put one direct command to acess some function of mecanism (specially from IrrEdit - Irrlicht), because he problably didn t considery relevant in that moment, at I could saw the big part of work of Niko in the last small version have been bug fix, small improvements and certally ways for more easy customization and possible advance of new thinks to be implemented by the coppercube users, is little like one '' do your self kit'', this don t mean he is work in massive new improvements and new tools and resources for coppercube editor and official tool from this program, but if this things is being developed will only discovery when he releases coppercube version 7 or 8.
I could write one post making one question for niko but he problaby will not answer me (laughts), he select with much detail what posts and e-mail he will answers or not answers (I am not making one real negative critic, I only posting one observation about his behavior, no jugament here please).

Guest my sugestion for more sad can be for me is, make what you can and what is possible for you do, I will be happy (like I am happy with the action vertex color mesh node, and action dinamic color material mesh node) with the possible result, unfortunately the life is not the way I want, then I need adapt my resources to make what I want inside the possibilities. Do the light action with the proprieties you can acess, if later we find one another solution we try to apply the solution
Thanks the attention

person icon
guest
Guest
Quote
2025-03-31 16:42:17

yeah i am a big fan of boomer/2.5 shooters (wolfenstein, doom, blood, duke, etc). not just the gameplay, but the tech that was used behind them at the time. groundbreaking stuff. today i will look into getting some sort of light extension working. emoji icon_smile

check out this site if you get a chance:https://gamesnostalgia.com/

a lot of good old stuff.

person icon
guest_guest
Guest
Quote
2025-03-31 18:07:55

/*
<action jsname="action_swordmaster3" description="swordmaster3">
<property name="PointLight" type="scenenode" />
<property name="Color" type="color" default="ffffffff" />
<property name="Radius" type="int" default="50" />
</action>
*/

action_swordmaster3 = function () {};

action_swordmaster3.prototype.execute = function () {
var node = this.PointLight;

var decToRGB = function (color) {
var r = (color & 0xff0000) >> 16;
var g = (color & 0x00ff00) >> 8;
var b = color & 0x0000ff;
return new vector3d(r, g, b);
};

var color = decToRGB(this.Color);

ccbSetSceneNodeProperty(node, "Color", color.x, color.y, color.z);
ccbSetSceneNodeProperty(node, "Radius", this.Radius);
};

/*
<action jsname="action_swordmaster4" description="swordmaster4">
<property name="DirLight" type="scenenode" />
<property name="Color" type="color" default="ffffffff" />
<property name="Direction" type="vect3d" default="0.0, -1.0, 0.0" />
</action>
*/

action_swordmaster4 = function () {};

action_swordmaster4.prototype.execute = function () {
var node = this.DirLight;

var decToRGB = function (color) {
var r = (color & 0xff0000) >> 16;
var g = (color & 0x00ff00) >> 8;
var b = color & 0x0000ff;
return new vector3d(r, g, b);
};

var color = decToRGB(this.Color);

ccbSetSceneNodeProperty(node, "Color", color.x, color.y, color.z);
ccbSetSceneNodeProperty(node, "Direction", this.Direction);
};


person icon
guest
Guest
Quote
2025-03-31 18:17:06

/*
<action jsname="action_swordmaster5" description="swordmaster5">
<property name="AmbientLight" type="color" default="ff000000" />
</action>
*/

action_swordmaster5 = function () {};

action_swordmaster5.prototype.execute = function () {
var node = ccbGetRootSceneNode();

var decToRGB = function (color) {
var r = (color & 0xff0000) >> 16;
var g = (color & 0x00ff00) >> 8;
var b = color & 0x0000ff;
return new vector3d(r, g, b);
};

var color = decToRGB(this.AmbientLight);

ccbSetSceneNodeProperty(node, "AmbientLight", color.x, color.y, color.z);
};


person icon
guest
Guest
Quote
2025-03-31 18:18:41

3 actions. 1 for the point light, 1 for the direction light, and 1 for the ambient light of the root scene node.

person icon
swordmaster
Guest
Quote
2025-03-31 22:37:48

Guest thanks for the three new extensions, I will test here and I will give one return about then soon.
About the new version '' action_swordmaster '', that you change small things in script, I didn t find none diference between the new version with compare with the old version, Did you made some polish in script or add some internal function that I didn t discovery?

About old games creation styles I recomend you give one look in raycast method to simulate the 3d first person shooter, the wolfstein 3d first game used this system to simulate 3d, the doom use one 3d simple engine. Some engine liko PICO-8 we can find applyied the raycast system to create old game 3d style.

https://freds72.itch.io/poom
https://tommulgrew.itch.io/trial-of-the-sorcerer

Other system to create fake 3d old games style is one effect called mode 7, was used to create car games.
I don t have none game in this style to show or recomend, but I am talk about the system.

I have some content to create this kind of system in some game engines (the most of these engines is 2d engines), but I normaly don t use these methods, I good reason is the speed of the render, in the moderns engines these methods create normaly slow games, then is necessary one strong work to make these games more speed. The raycast and mode 7 is too much speed in hands of good programmers specially because them will create using there methods without no game engine, and problaby in C++ , but the methos is very interesting and vert usable if you have enough time and one good knowledge of programming languade (specially the languade the game engine you will use to create your game).

person icon
swordmaster
Guest
Quote
2025-03-31 22:38:35

The fps game creator is not exact full old school or retro game style but is one free game engine that will allow you create one old 3d fps with directx 9 (or directx 10 if you update the program with the free upgrade), If you want to test the game engine the link is:

https://www.thegamecreators.com/product/fps-creator-classic-open-source
https://github.com/TheGameCreators/FPS-Creator-Classic

Some resources from this game engine remember to much coppercube tools, this engine have suport to screen space shaders, and one interesting curiosity is this game engine use the dark basic mechanism (one another program to create games using the languade basic) in it system. unfortunately the fps game creator at I know only work and export for windows.


Guest I don t have words to say thanks suficiently for all the extensions you made and your generous attention with my request and problems, you help me a lot to advance in in built graphic improvement with coppercube development, and I have certain you helped to any other user that see this topic and test the actions, I will test the new actions and after the tests I will post talk about the tests and results.

person icon
guest
Guest
Quote
2025-04-01 16:09:49

for the swordmaster extension, i removed the type conversion and doing more than one material at once. the issue with it was it would force you to only use one type of material on a mesh when you used it which would break anything that doesn't use 1 type of material. animated meshes use solid and transparent materials, for example, so the extension would change them to 1 type only. if you need one that changes the type of a material, you can add that part back in by looking at the previous extension. test the actions and let me know. you're welcome. emoji icon_grin

person icon
swordmaster
Guest
Quote
2025-04-01 21:09:42

Guest, after you explain, I understood the diferences; in my tests here with first version work well if you add action many times with each material number, but the new makes sense considering how coppercube process material types and number of materials (I will save and use the boths, thanks for the extensions).
About the three new light action, I tested here in many ways and all of them work very well. Thanks for all the extensions.
I didn t test wet the buffers from vertex color (I am a curious with the buffers will allow apply vertex color over each material if there are more the one material; the system to apply vertex color in editor only apply vertex color in all mesh node, independent if there is more the one material in one mesh model).
I will try to send one message in coppercube forum to Niko to see if there is one to acess some proprieties from IrrEdit - Irrlicht and others things not documented in coppercube api.
Thanks the actions, all the actions are amazing and do what I want, Thanks, thanks, thanks


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 |