It is currently Wed Oct 23, 2019 7:50 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: yes, next step, next problem, WorldShadows()
PostPosted: Mon Jul 15, 2019 6:01 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 06, 2010 10:16 am
Posts: 560
Location: Belgium
Yes, next problem

Without using WorldShadows(), the program works fine.
When I use this ...

Code:
WorldShadows(#PB_Shadow_Additive, 10000, $202020)
or
WorldShadows(#PB_Shadow_Modulative, -1, RGB(255, 0, 0))


The program quits, without any error message ?

I use WIN 10 - PB5.71B1x64


marc

_________________
- every professional was once an amateur - greetings from Pajottenland - Belgium -
http://www.marc-systems.be
PS: sorry for my english I speak flemish ...


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Mon Jul 15, 2019 8:32 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 29, 2012 10:33 pm
Posts: 736
Location: United States
Do the world shadows work in any of purebasic's example shadow programs? Have you tried opengl and directx?
Do you have a very high poly entity in your example? That could be causing the internal 16 bit vertex/index buffers to be out of bounds when stencil shadows are enabled.


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Tue Jul 16, 2019 1:35 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 06, 2010 10:16 am
Posts: 560
Location: Belgium
hi Samuel,

When I test the PB examples, they works very well ...
And with my robot meshes noting is working.

And yes, all my meshes of the robot are very high poly entity's ...
So, thank you, now I know why PB is not working at all.

Is this a OGRE problem or a PB problem ?
And can this be updated ?

marc

_________________
- every professional was once an amateur - greetings from Pajottenland - Belgium -
http://www.marc-systems.be
PS: sorry for my english I speak flemish ...


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Tue Jul 16, 2019 2:28 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5837
Location: Wales, UK
Hi Marc

....potentially, the OpenGL Gadget would work better with large meshes - that is one reason why most of the CAD-CAM community is using OpenGL.

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Tue Jul 16, 2019 3:16 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 06, 2010 10:16 am
Posts: 560
Location: Belgium
Hi IdeasVacuum,

This are my compiler settings

Image


What I want to know now, is this PB limit problem or OGRE limit problem ?

thanks,
marc

_________________
- every professional was once an amateur - greetings from Pajottenland - Belgium -
http://www.marc-systems.be
PS: sorry for my english I speak flemish ...


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Tue Jul 16, 2019 3:46 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 21, 2011 9:11 am
Posts: 606
Location: France
Hello Marc

Use InitEngine3D(#PB_Engine3D_DebugLog) and look at the file Ogre.log

The subsystem OpenGL is a solution (Water creation does not work with the OpenGL subsystem).
You can also install DirectX9c end user. This is what I did with Windows10 :wink:

_________________

➽ Windows 10 - PB 5.62 & PB 5.70 LTS

Sorry for my bad english and the Dunning–Kruger effect.


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Tue Jul 16, 2019 3:53 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 06, 2010 10:16 am
Posts: 560
Location: Belgium
Hello falsam,
thanks for the tip ... go to try it in a second.

@IdeasVacuum
do you mean I need to learn OpenGL to use the OpenGL gadget ? :evil: :twisted:

marc

_________________
- every professional was once an amateur - greetings from Pajottenland - Belgium -
http://www.marc-systems.be
PS: sorry for my english I speak flemish ...


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Tue Jul 16, 2019 5:47 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 29, 2012 10:33 pm
Posts: 736
Location: United States
marc_256 wrote:
When I test the PB examples, they works very well ...
And with my robot meshes noting is working.

And yes, all my meshes of the robot are very high poly entity's ...
So, thank you, now I know why PB is not working at all.

Is this a OGRE problem or a PB problem ?
And can this be updated ?

Hmm, sounds like you are exceeding the limit. The PB team could change the buffers to 32 bit internally. It should solve the crashing. The problem would be that stencil shadows aren't meant for high poly meshes. Performance wise you'll be getting major slowdowns the larger the mesh.
Instead you could try breaking up your robots into smaller entities which should allow the stencil shadows to work. Try keeping each entity at or below 30000 vertices/faces.

You could also try texture shadows which are faster than stencils but then you are limited to entities being casters or receivers. They can't be both at the same time. Reason being is these texture shadows are using a simple technique with no depth system which is way self shadowing is not possible.


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Tue Jul 16, 2019 8:04 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 06, 2010 10:16 am
Posts: 560
Location: Belgium
To find out where the problem is,
I eliminated almost all parts except some ...

here the result

Image

Seems to work well, with a very limited number of entity's.
Quote:
The PB team could change the buffers to 32 bit internally.

So yes, need 32 bits ...


marc

_________________
- every professional was once an amateur - greetings from Pajottenland - Belgium -
http://www.marc-systems.be
PS: sorry for my english I speak flemish ...


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Tue Jul 16, 2019 8:34 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5837
Location: Wales, UK
....and 64bit buffers on 64bit OS?

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Tue Jul 16, 2019 11:41 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5837
Location: Wales, UK
Quote:
do you mean I need to learn OpenGL to use the OpenGL gadget ?


Well it's similar - especially in terms of how confusing and difficult it can be to get materials to look real :mrgreen:
However, there is a lot of OpenGL information online, because it is so popular. It's possibly more appropriate for your project as the sub-set of Ogre that PB supports is more in the direction of Games rather than Engineering.

I do wish Fred had added a raft of functions at the time the OpenGL Gadget was introduced. One thing in it's favour is the seamless movement of the mouse between the OpenGL gadget and any other gadget, without requiring extra code to track the mouse. If only there was an Ogre Gadget........

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Tue Jul 16, 2019 11:53 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 29, 2012 10:33 pm
Posts: 736
Location: United States
IdeasVacuum wrote:
....and 64bit buffers on 64bit OS?

That might be a bit overkill. 32 bit buffers alone would increase the count from 65536 to 4294967296 per entity.

@marc_256
Did you model those entities using an external software like blender? If you have the xml exports of them you can manually change the use32bitindexes="false" to "true". That might solve the stencil shadow issues you are having.
With my custom exporter I've imported meshes into PB/OGRE that had a couple hundred thousand polys. I don't remember if I ever tried them with stencil shadows though.


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Wed Jul 17, 2019 1:24 am 
Offline
User
User

Joined: Mon Sep 03, 2012 8:52 pm
Posts: 66
Have the option to use 16 or 32 bit buffers for a entity would be nice to have depending on what the project needs.


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Wed Jul 17, 2019 4:51 am 
Offline
Addict
Addict

Joined: Sun Jun 25, 2006 7:28 pm
Posts: 1375
try MeshLab tool
there are options to reduce the number of vertices and faces, look this option:
Filters -> cleaning and repairing -> merge close vertices
Image
but this page is better: https://www.shapeways.com/tutorials/polygon_reduction_with_meshlab since they don't accept more than 1 million polygons for 3D printing, they describe how to reduce it in detail
it is possible that blender also can reduce the number of vertices and faces, search for "how to reduce number of vertices in blender"
i have an old 32bit version of meshLab, but in their site seems they provide only 64bit version
http://www.meshlab.net/


Top
 Profile  
Reply with quote  
 Post subject: Re: yes, next step, next problem, WorldShadows()
PostPosted: Wed Jul 17, 2019 8:39 am 
Offline
Enthusiast
Enthusiast

Joined: Thu May 06, 2010 10:16 am
Posts: 560
Location: Belgium
Samuel wrote:
IdeasVacuum wrote:
....and 64bit buffers on 64bit OS?

That might be a bit overkill. 32 bit buffers alone would increase the count from 65536 to 4294967296 per entity.

@marc_256
Did you model those entities using an external software like blender? If you have the xml exports of them you can manually change the use32bitindexes="false" to "true". That might solve the stencil shadow issues you are having.
With my custom exporter I've imported meshes into PB/OGRE that had a couple hundred thousand polys. I don't remember if I ever tried them with stencil shadows though.



Did some tests, can be me but it seems, not the polys per entity is the problem,
but the total amount of polys of all entity's together !!!
I will do some extra tests ...

1) I use a CAD program to build and develop the mechanical parts, and export them via COLLADA

2) I import them in BLENDER to position, and give them a material, and export them via OGRE exporter.
and get a Geometry.mesh.xml file. Who I convert to a vertices / face data file.

3) I integrate this file in to my PB program.


marc

_________________
- every professional was once an amateur - greetings from Pajottenland - Belgium -
http://www.marc-systems.be
PS: sorry for my english I speak flemish ...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye