Yeah, Simsilica was nice because it’s not game specific but can easily be ‘game invoking’. It means ‘simulated sand’ so worked well with my initial ambitions but was abstract enough not to feel tied to them. (I figure it I ever make porn apps I’ll spin off Simsilicone for that. ;))
Simsilica was also nice because the molecule looks interesting enough to use as a logo.
…which even better is a screen shot of a JME model I created and so can be included at runtime as a 3D rotating model even.
What happens with this guys posts ???
Hacked ?
The translation of the edited text seens to be in latin, I could not translate right, hope its not offensive of something…
@wagfeliz@Cervantez I’m so very sorry, I had this depression-infused self hate rage episode yesterday. Its safe to say that my posts on this forum aren’t the only thing I tried to ruin/delete, good thing that a lot of sites have a limit to doing that. Well I’m mostly back to normal-ish today and repairing the stuff I’ve broken - which extends to my apartment too
I think I’ve recalled most of the the post withdrawals, and I’m restoring the OP posts now.
Wow, sorry to hear that. Glad you are back on track now.
@Topic:
I used this method in my space game and tweaked it a little bit:
Coloring
My nebulas have two colors (I use gray images as textures and color them via code)
The first quad I create is small and has the first color
From then on each quad is a bit larger than the last and its color is slighty shifted towards the second color. So the last and largest quad I create has the second color I defined
This way I can e.g. create magenta nebulas with a cyan core, which looks awesome
Motion
My quads slowly rotate in a random direction (clockwise or counterclockwise) at a random speed
They are also slowly “pulsing” in scale using a sine curve to periodically rescale them vom e.g. 95% to 105% with random speeds
Doing this the nebula look a bit more “alive”, because you cannot tell the different quads apart if each of them rotates and pulses at different speeds and in different directions.
But it is very important to keep the speeds low, otherwise they just look goofy. I set the speeds to a level, where you don’t notice the movement when flyting by, but can enjoy it when standing still and watching the nebula closely.
Ok, I just flew around until i found a good one (my quads are not centered at the same point and now some nebulas have their quads just too far scattered to be presentable ):
And yes, I only have cyan/magenta nebulas right now
I have to check that. Actually I never went inside my nebulas since I implemented the movement
OMG! Lightning strikes!
I wanted to do those, too, but didn’t find a way that looked nice enough.
My first idea was to have a white cloud-quad in the nebula, which is culled. Then at random intervals I’d uncull it and cull it again a few millis afterwards. But that didn’t look good.
How did you do it?
In the most resource-consuming and straightforeward way possible.
Node lightning = new Node();
@Override
public void update(float tpf) {
if(distanceToPlayer < someArbirtraryValue)
{
if(FastMath.nextRandomInt(0, 25) == 0)
{
float rand4 = FastMath.nextRandomFloat()/5-0.1f;
float rand5 = FastMath.nextRandomFloat()/5-0.1f;
float rand6 = FastMath.nextRandomFloat()/5-0.1f;
String name = "light"+Integer.toString(FastMath.nextRandomInt(1, 2)) +".png";
Material starmat = MakeWorld.nebula.get(0).clone();
starmat.setTexture("ColorMap",CPU.game.getAssetManager().loadTexture("assets/celestial/nebula/"+name));
starmat.setTexture("GlowMap",CPU.game.getAssetManager().loadTexture("assets/celestial/nebula/"+name));
starmat.setColor("Color", new ColorRGBA(template.r+rand4,template.g+rand5,template.b+rand6,2f));
Quad side = new Quad(nebulasize/8,nebulasize/8);
Geometry plate = new Geometry("lightning",side);
plate.setMaterial(starmat);
plate.setQueueBucket(Bucket.Transparent);
plate.setLocalTranslation(Methods.randomVector3f().mult(size/1.5f));
plate.setShadowMode(ShadowMode.Off);
Node n = new Node();
n.attachChild(plate);
n.getLocalRotation().fromAngleAxis(FastMath.nextRandomFloat()*36, Methods.randomVector3f());
n.setName("12");
lightning.attachChild(n);
}
}
for (Spatial spark : lightning.getChildren()) {
if(Integer.parseInt(spark.getName()) > 0)
spark.setName(Integer.toString(Integer.parseInt(spark.getName())-1));
else
lightning.detachChild(spark);
}
}
}
And afterwards I smiled like an idiot when it worked pretty well
The problem is that these strikes only appear for 12 frames and that makes it very very hard to take a picture of one. This also reminds me that this isnt framerate independant //TODO