Author Topic: Reflection efect  (Read 30483 times)

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Reflection efect
« Reply #30 on: June 21, 2007, 09:10:56 am »
Hi, this is the link of the new version. Please can you post it con the download section, maybe removing the old version from there, or maybe keeping it as an old version. I dont know.

this version has the enviroment map applied, a better car model, and is better deployed. Maybe I will add an enviroment like a garage or something, but later.

www.soft-ec.com/Demos/CarView.zip
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Reflection efect
« Reply #31 on: June 21, 2007, 05:44:41 pm »
Ok, i've updated the download with the new version.

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Reflection efect
« Reply #32 on: June 21, 2007, 07:44:02 pm »
Hey Egon, I tested it on a P4 2.67, 512 MB, GeForce4 64 MB and worked fine. Tested also on a P4 3.2 HT, 512MB, Via C3 32MB and worked but the reflection effect doesnt appear.


I could understand that is due to the bad quality of the video card via c3 but, it used to shown the enviroment map on the official version of jpct, but with the new beta you made it didnt. I mean that the video card showed the reflection that was undesired but not the desired one.
Nada por ahora

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Reflection efect
« Reply #33 on: June 22, 2007, 06:31:19 am »
Another issue with this. Can I have the original Texture and the reflection at the same time. When I set enable the enviroment map the texture does not apply correctly, when using full color textures its okay, but now I want to put some images on my textures, not only color. Can that be done?
Nada por ahora

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Reflection efect
« Reply #34 on: June 22, 2007, 07:14:21 am »
BUG1:When more than 2 textures are applied to the TextureInfo, the enviroment issue got disabled or something (dont reflect anything).

BUG2:When another texture is added the number of polygons increase! Each texture stage means painting all the polygons again? when added 3 stages some polygons were not visible, I needed to increase the amount in Config.maxPolysVisible! Is this normal?
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Reflection efect
« Reply #35 on: June 22, 2007, 08:50:22 am »
The GeForce4MX is a Geforce2 derivative, which means that it has only 2 texture stages (the renderer should state something like this when initializing). That means that 2 textures can be processed in one pass, which is what jPCT does. When adding another texture, jPCT falls back to multiple passes, i.e. rendering each triangle multiple times, which is why the size increases and rendering slows down significantly. This is not a bug, it's a feature.
The first problem is related to this (or so i think), because when adding another texture, the preconditions mentioned in the Config-setting aren't met any longer, i.e. enviroment map isn't on stage 2 anymore, which basically means that in this case, you would have to revert the envmap to stage 1 again. But the application has to do this, i can't do it automatically.

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Reflection efect
« Reply #36 on: June 22, 2007, 03:54:30 pm »
Ok, I guess I should do some combination of the textures to have it as only one Texture and then apply it. Can you put on the class Texture an add method to do this, to put 2 textures and combine then into one single texture, maybe by adding the colors or something.
« Last Edit: June 22, 2007, 04:09:04 pm by Melssj5 »
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Reflection efect
« Reply #37 on: June 22, 2007, 04:09:18 pm »
Can you give an example of what you mean exactly (screenshot)?

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Reflection efect
« Reply #38 on: June 22, 2007, 06:01:14 pm »
mmmmm I am at the office but I mean for example:

Texture t1=new Texture ("Name1", "path1");
Texture t2=new Texture ("Name2", "path2");

Texture T=Texture.add ("Name3", t1, t2);

Like in the TextureInfo but joining it into a new one. On that way multi textures can be put using only 2 stages. one for the env and one for the base texture.

ok here are the shots.

T=t1+t2

=+

http://www.soft-ec.com/Demos/T.JPG
=
http://www.soft-ec.com/Demos/t1.jpg
+
http://www.soft-ec.com/Demos/t2.jpg
« Last Edit: June 22, 2007, 06:16:16 pm by Melssj5 »
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Reflection efect
« Reply #39 on: June 22, 2007, 09:19:32 pm »
Ok, i see...well, actually i don't see, because i can't access the images (forbidden!) but anyway. If needed, i can add that albeit i'm not sure that it is. Java's capabilities should be more than sufficient to blend two images together. However, i don't really care...if you still want it, i'll add it for the next release.

Offline hytparadisee

  • int
  • **
  • Posts: 86
    • View Profile
    • http://peterhi.com
Re: Reflection efect
« Reply #40 on: June 23, 2007, 04:49:34 am »
Just a bit worried -> ??? Would that affect any other aspects of jpct (especially performance-wise)?
Today I finally found a problem to my soluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuution

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Reflection efect
« Reply #41 on: June 23, 2007, 10:46:50 am »
Would that affect any other aspects of jpct (especially performance-wise)?
The change for environment mapping? No. Or were you talking about something else?

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Re: Reflection efect
« Reply #42 on: June 25, 2007, 05:22:01 pm »
ok I better made this:

http://www.soft-ec.com/Demos/

http://www.soft-ec.com/Demos/

This is the result I need, on that way the multiTexture efect doesnt need to be applied to a whole Object but can be aplied replacing a texture. Many objects loaded has more than one texture. And the env can be applied with just 2 stages.
Nada por ahora

Offline Peter Dym

  • byte
  • *
  • Posts: 24
    • View Profile
Re: Reflection efect
« Reply #43 on: July 10, 2012, 05:55:17 pm »
Hi Egon,

I know, this is the old thread, but related to my actuqal problem. I was asked in my office to show a simple window with one rotated object. I piece of cake.
I am familiar with jpct so no problem. And I spent 2 days or more to do it in the reasonable quality and - no way. It should be very realistic and I'm missing the bacis reflection feature. And have no idea how to do it. I'm not total beginer (see my Airdroid project http://www.jpct.net/projects.html ) but to create an usable specular reflection is too much. I'm not restricted by Android OS or by performance because it should be an applet with one rotated object (which I have already done but - I have nothing to show actually). I need something like http://www.esko.com/en/Products/overview/studio/visualizer-gallery . Is there a way how to do that? I was so despaerate that I started with jMonekyEngine, which looks good but every step was and is accompanied with very exotic exceptions like "Your object does not contain faces" or "Expected version of something is lover that provided" :-) . So I would rather stay wit our cute jpct. Any suggestion?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Reflection efect
« Reply #44 on: July 10, 2012, 09:23:50 pm »
"Amazing" applet, that visualizer thing...it seems to use native code to create the slowest software renderer that i've even seen. Anyway, i'm not 100% sure what you want and what the problem is. Do you mean a basic (albeit faked) reflection effect like this one:



?? That's actually pretty simple to do. You need the basic texture map and a spherical enviroment map (examples: http://www.codemonsters.de/home/content.php?show=spheremaps). You create a TextureInfo with the enviroment map as first and the actual texture map as second texture (blending mode depends on the textures...i would start with MODE_ADD), assign that your object and enable environment mapping by doing

Code: [Select]
obj.setEnvmapped(Object3D.ENVMAP_ENABLED);
obj.setEnvmapMode(Object3D.ENVMAP_CAMERASPACE);